Giter Club home page Giter Club logo

web_reflectivity's Introduction

TRAVISCI DOI codecov readthedocs

Web Interface for Reflectivity Fitting

This application provides a user interface to generate a REFL1D script and run it on a remote node.

Documentation is available at https://web-reflectivity.readthedocs.io/.

Introduction

This application provides a web interface to perform modeling of reflectivity data. This Django application gives users forms to set up their model and submit fitting jobs. To do so, it generates a python script to be executed either locally or on a remote compute resource. The generated script launches REFL1D, which does the actual minimization.

Job management is done using a Django remote submission package. It manages remote jobs using the Celery distributed task queue and provides real-time monitoring of remote jobs and their associated logs. Celery uses message brokers to pass messages between the Django application and compute nodes. The Redis in-memory data structure store is used as the message broker. The script executed on the compute node sets up and executes the REFL1D fit, then gathers the output data.

Test installation

The information below describes how one would deploy the application in production. For a simpler test deployment, see the instructions to run a test server. Those instructions will walk you through a basic installation process and will give you a list of dependencies you'll need.

Production configuration and installation

Production dependencies

A basic set of requirements for the application can be found in requirements.txt. This is only recommended if you are installing more than a test environment and will be deploying your own database and adjusting your configuration yourself. It will not be sufficient for testing (see the test installation section above). Depending on which database and authentication solution you choose, your dependencies may change.

You will also need to install redis-server.

Database installation

The Django application will need a database. It was developed using PostgreSQL, but can be used with any database. You can enter your database details in the web_reflectivity/web_reflectivity/settings.py file.

Authentication

The application supports both users local to the application or users authenticated through LDAP. To use LDAP, the authentication settings should be entered in web_reflectivity/web_reflectivity/settings.py. For that purpose, openssl should be installed.

Once a user is logged in, the application will submit jobs to your compute resources on the user's behalf, through celery. An ssh key should be generated and placed in the apache user's .ssh directory. It should also be copied in the celery user's .ssh directory.

Apache configuration

The application was developed using apache and mod_wsgi, although it could be served by other methods compatible with Django. An example apache configuration is available in apache/apache_django_wsgi.conf. This file can be modified with your SSL details and put in /etc/httpd/cond.d.

Redis configuration

Redis can be run with default configuration.

Celery configuration

On a production system, you will want to run celery as a service. To do this, copy the web_reflectivity/web_reflectivity/celeryd file into /etc/default/celeryd

Install the application

The application installs in /var/www/web_reflectivity.

sudo make install

Starting the application

Start Redis

sudo /sbin/service redis start

Start celery

sudo /sbin/service celeryd start

Start apache

sudo /sbin/service httpd restart

To contribute or report a problem

To report a problem, please create an issue using the "Issues" tab above. If you would like to suggest changes, please either create an issue or a pull request.

Citing this software

Please cite the following when using this software:

web_reflectivity's People

Contributors

mdoucet avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

web_reflectivity's Issues

Problem with corefinement

  • Set up a co-refinement and tie parameters.
  • On one or both data sets, overload the model by applying another saved model.
  • Clicking fit will now fail because the constraints (tied parameters) for the simultaneous fit problem are tied to layers that are no longer part of this fit problem.

To solve this issue, we need to delete all constraints when loading a new model.

Cannot load data because of Unicode "Angstrom" sign

I set up an instance according to the test/README.md - everything was installing fine and I could log in. Only difference is that instead of conda, I used a "normal" virtualenv to install the dependencies.

When trying to load some data, I always get an error due to failed encoding of the Angstrom sign that is added to the plot in https://github.com/neutrons/web_reflectivity/blob/master/web_reflectivity/fitting/view_util.py#L755 - if I replace that with "AA" it works.

Are you by chance operating in an environment with sys.setdefaultencoding("utf8")?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.