Giter Site home page Giter Site logo

kvieta1990 / addie_jackson_tmp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from neutrons/addie

0.0 0.0 0.0 27.18 MB

ADvanced DIffraction Environment - GUI for Reduction of Neturon Time-of-Flight Total Scattering Diffraction Data

License: GNU General Public License v3.0

Shell 0.05% Python 99.55% HTML 0.36% Batchfile 0.03%

addie_jackson_tmp's Introduction

CI Release Other
GitHub Actions Anaconda-Server Badge MIT License
Anaconda-Server Badge

ADDIE

ADDIE stands for ADvandced DIffraction Environment, a data reduction application for total scattering powder diffraction data.

The name came about from being developed for the Diffraction Group at SNS located at ORNL (and previously known as the Advanced Diffraction Group).

This "reduction" entails taking raw neutron counts from detectors in the diffraction experiment and turning them into the reciprocal-space structure factor patterns, F(Q) or S(Q), and applying a Fourier Transform to real-space to give the pair distribution fuction, PDF.

ADDIE is a front-end GUI for total scattering that hopes to support multiple diffractometers performing total scattering measurements. The back-end that uses the Mantid Framework is the mantid-total-scattering project.

Install

Setup conda environment to install ADDIE into:

conda config --add channels neutrons
conda config --add channels mantid
conda config --add channels conda-forge
conda create -n addie-env
source activate addie-env

Install ADDIE in the conda environment:

conda install -q -y -c conda-forge nexus==4.4.3
conda install -q -y -c mantid poco==1.7.3
conda install -q -y -c mantid mantidworkbench
conda install -q -y -c neutrons mantid-total-scattering-python-wrapper
conda install -q -y -c neutrons addie==${ADDIE_VERSION}

The install steps above have been found to create a reproducible install. If not done in this order, conda can identify different configurations that are NOT in a working state.

NOTE: You may need to ensure some packages are not imported from the defaults channel. As above, add them prior to installing ADDIE where the channel is set explicitly

Uninstall

conda deactivate
conda remove -n addie_env --all

Launch

To launch ADDIE, run the following from the command line:

addie

If you need to specify the path to Mantid build, use:

MANTIDPATH=/path/to/mantid/build/bin PATH=$MANTIDPATH:$PATH PYTHONPATH=$MANTIDPATH:$PATH addie

Development

Installation development environment using Conda

conda env create
source activate addie
python setup.py install

Uninstall

conda deactivate
conda remove -n addie --all

Notes

If you have an error (see below for example) related to the libGL library, you may not have it installed for the Mantid Framework to work. See instructions here for installing the necessary libraries for different OS

Example error:

ImportError: First import of "._api" failed with "libGL.so.1: cannot open shared object file...

Testing

The test suite can be run using pytest with the pytest-qt plugin.

$ pytest tests

Developing using a local Mantid install

If you normally develop using virtualenv or friends, you can develop addie that way as well. After creating the virtual environment, run

<MANTIDBUILDDIR>/bin/AddPythonPath.py

which will add a file, mantid.pth to your environment with the location of mantid. Then you need to setup for development:

python setup.py develop

will put the rest of addie into your environment so you only need to edit files and type addie.

As an extra reference, use direnv to manange your virtual environments. For a python2 virtual environment the .envrc file should contain

layout python2 -- --system-site-packages

so the system wide packages installed for mantid are found.

or with pipenv (which will use Pipfile), first setup the directory and then add the .envrc file:

cd addie
pipenv --two
echo layout_pipenv > .envrc
direnv allow

Creating RPMs

Python generated srpm are not as flexible as they should be. To generate one that is run buildrpm and look for the files in the dist directory.

$ ./buildrpm

The rpms are available on copr.

addie_jackson_tmp's People

Contributors

jeanbilheux avatar marshallmcdonnell avatar peterfpeterson avatar wdzhou avatar kvieta1990 avatar ahalgh avatar danolds avatar granrothge avatar wesleyjak avatar rosswhitfield avatar dependabot[bot] avatar quantumsteve avatar

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.