-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
542a47d
commit c890fae
Showing
4 changed files
with
104 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
===== | ||
About | ||
===== | ||
From total scattering functions, we have reciprocal-space structure factors and real-space pair distribution functions that are related via a Fourier transform. PyStoG is a package that allows for: | ||
|
||
1. Converting between the various functions used by different "communities" (ie researchers who study crystalline versus amorphous or glass materials). Conversions are for either real-space or reciprocal-space. | ||
2. Perform the transform between the different available functions of choice | ||
3. Fourier filter to remove spurious artificats in the data (ie aphysical, sub-angstrom low-r peaks in G(r) from experiments) | ||
|
||
.. image:: ../../images/sofq_to_gofr.png | ||
|
||
The name **PyStoG** comes from the fact that this is a *Pythonized* version of **StoG**, a ~30 year old Fortran program that is part of the RMCProfile_ software suite. **StoG** means **"S(Q) to G(r)"** for the fact that it takes recirpocal-space S(Q) patterns from files and transforms them into a single G(r) pattern. The original *StoG* program has been developed, in reverse chronological order, by: | ||
|
||
* Matthew Tucker (~2009) | ||
* Spencer Howells (~1989) | ||
* Jack Carpenter (prior to 1989) | ||
|
||
A current state of the **StoG** program is kept in the `fortran` directory of this package. | ||
|
||
This project was initially just a "sandbox" for taking the capabilities of **StoG** and migrating them over to the Mantid_ Framework. With more and more use cases, **PyStoG** was further developed as the stand-alone project it is now. Yet, migration to the Mantid Framework is still a goal since it feeds into the ADDIE_ project. | ||
|
||
|
||
PyStoG is not a Python replica of StoG but has the same goal as StoG. Yet, has capabilites that surpass StoG such as multiple input/output real and reciprocal space functions, diagnostic plotting with matplotlib, and modules allowing for re-construction of the workflow for processing total scattering data. | ||
|
||
.. _RMCProfile: http://www.rmcprofile.org/Main_Page | ||
.. _Mantid: https://github.com/mantidproject/mantid | ||
.. _ADDIE: https://github.com/neutrons/addie |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
============ | ||
Installation | ||
============ | ||
|
||
Requirements | ||
============ | ||
|
||
* Python (2.7, 3.6, 3.7 are tested) | ||
* matplotlib_ | ||
* numpy_ | ||
* pandas_ | ||
|
||
|
||
.. _matplotlib: https://matplotlib.org/ | ||
.. _numpy: http://www.numpy.org/ | ||
.. _pandas: http://pandas.pydata.org/ | ||
|
||
|
||
|
||
Using PyPI | ||
========== | ||
|
||
Installation is available via `pip`. | ||
|
||
.. code:: sh | ||
pip install pystog | ||
or for a local install | ||
|
||
.. code:: sh | ||
pip install pystog --user #locally installed in $HOME/.local | ||
Using python setup.py | ||
======================= | ||
|
||
A setup.py is available to install but it is recommended to do | ||
this in a virtual environment. For system install, use `PyPi` instead. | ||
|
||
.. code:: sh | ||
python setup.py install | ||
Development | ||
=========== | ||
|
||
For a development environment, you can use virtualenv_ to setup an isolated environemnt, namely `ENV`: | ||
|
||
.. code:: sh | ||
python -m virtualenv /path/to/ENV | ||
source /path/to/ENV/bin/activate | ||
pip install pystog | ||
Also, direnv_ is a useful and recommended way to manage the virtual environment. You can simply use an `.envrc` file which contains `layout python<version>` where `<version>` == 2 or 3 for the python version you would like (3 is recommended). | ||
|
||
Then, once inside the development directory, just install via `pip` as described above. | ||
|
||
.. _virtualenv: https://virtualenv.pypa.io/en/latest/ | ||
.. _direnv: https://github.com/direnv/direnv | ||
|
||
Tests | ||
===== | ||
|
||
From the parent directory of the module, run: | ||
|
||
.. code:: sh | ||
python tests/runner.py | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.