Python package for analysis of neutron backscattering data
Project description
nPDyn
nPDyn is a Python based API for analysis of neutron backscattering data.
The API aims at providing a lightweight, user-friendly and modular tool to process and analyze quasi-elastic neutron scattering (QENS) and fixed-window scans (FWS) obtained with backscattering spectroscopy.
nPDyn can be used in combination with other software for neutron data analysis such as Mantid.
An important feature of nPDyn is the modelling interface, which is designed to be highly versatile and intuitive for multidimensional dataset with global and non-global parameters. The modelling in nPDyn is provided by builtin classes, params.Parameters, model.Model and model.Component. nPDyn provides also some helper functions to use lmfit as modelling backend. See Fit data section in documentation for details.
Eventually, some plotting methods are available to examine processed data, model fitting and optimized parameters.
Installation:
Prior to building on Windows, the path to Gnu Scientific Library (GSL) should be given in setup.cfg file (required by libabsco)
If not, the package can still be installed but paalman-ping corrections won’t work.
Unix and Windows
For installation within your python framework:
with pip:
python3 -m pip install nPDyn
with source code:
git clone https://github.com/kpounot/nPDyn npdyn
cd npdyn
python3 setup.py install
Full documentation
Support
A google group is available for any question, discussion on features or comment.
In case of bugs or obvious change to be done in the code use GitHub Issues.
Contributions
See contributing.
Getting started
The nPDyn API is organized around a Sample class. This class inherits from the NumPy ndarray class with some extra features added, such as neutron scattering-specific attributes, binning, data correction algorithm, automatic error propagation and data fitting.
In a neutron backscattering experiment, there is not only the measurement of samples but also some calibration measurements like vanadium, empty cell and solvent signal (often D2O). Some methods of the Sample class can be used to perform normalization or absorption correction using the dataset corresponding to vanadium or empty cell, respectively. These calibration dataset can be used also in the fit function to automatically add a background or perform a convolution with the resolution function.
Details regarding importation of data are available in the dataImport section of the documentation.
Importantly, nPDyn provides versatile tools for model building and fitting to the data. See the section dataFitting for details.
Finally, a plot method is provided for easy visualisation of the data and the fit results.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file nPDyn-3.0.0.tar.gz
.
File metadata
- Download URL: nPDyn-3.0.0.tar.gz
- Upload date:
- Size: 22.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53844fb68cec7b46e537c2f68baf8db6104b37ff1380afe780dc510e32b1786e |
|
MD5 | 06e0bec45c7a48191277e4801f62fd90 |
|
BLAKE2b-256 | 3a45020d77297e4623a8c2912837b734d2a4450581519886b085b747ff046f91 |
File details
Details for the file nPDyn-3.0.0-cp39-cp39-any.whl
.
File metadata
- Download URL: nPDyn-3.0.0-cp39-cp39-any.whl
- Upload date:
- Size: 150.1 kB
- Tags: CPython 3.9
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 374597c95746a048dea3387c397130649f27bfde0a7dec9dcdbec40a852f74f8 |
|
MD5 | 98cc0f854c203d3fb4c4909e7013f840 |
|
BLAKE2b-256 | ee619f63e0af656ec3f06986d9ef8c1305499287cfc3d76dbab6b691f8f24cd5 |