A Pytorch-based package for the analysis of reflectometry data
Project description
Reflectorch
Reflectorch is a machine learning Python package for the analysis of X-ray and neutron reflectometry data, written by Vladimir Starostin & Valentin Munteanu at the University of Tübingen. It provides functionality for the fast simulation of reflectometry curves on the GPU, customizable setup of the physical parameterization model and neural network architecture via YAML configuration files, and prior-aware training of neural networks as described in our paper Neural network analysis of neutron and X-ray reflectivity data incorporating prior knowledge.
Installation
Reflectorch can be installed from via pip
:
pip install reflectorch
Alternatively, one can clone the entire Github repository and install the package in editable mode:
git clone https://github.com/schreiber-lab/reflectorch.git
pip install -e .
For development purposes, the package can be installed together with the optional dependencies for building the distribution, testing and documentation:
git clone https://github.com/schreiber-lab/reflectorch.git
pip install -e .[tests,docs,build]
Users with Nvidia GPUs need to additionally install Pytorch with CUDA support corresponding to their hardware and operating system according to the instructions from the Pytorch website
Get started
The full documentation of the package, containing tutorials and the API reference, was built with Jupyter Book and Sphinx and it is hosted at the address: https://schreiber-lab.github.io/reflectorch/.
We provide an interactive Google Colab notebook for exploring the basic functionality of the package:
Configuration files and the corresponding pretrained model weights are hosted on Huggingface: https://huggingface.co/valentinsingularity/reflectivity.
Docker images for reflectorch will be hosted on Dockerhub.
Citation
If you find our work useful in your research, please cite as follows:
@Article{Munteanu2024,
author = {Munteanu, Valentin and Starostin, Vladimir and Greco, Alessandro and Pithan, Linus and Gerlach, Alexander and Hinderhofer, Alexander and Kowarik, Stefan and Schreiber, Frank},
journal = {Journal of Applied Crystallography},
title = {Neural network analysis of neutron and X-ray reflectivity data incorporating prior knowledge},
year = {2024},
issn = {1600-5767},
month = mar,
number = {2},
volume = {57},
doi = {10.1107/s1600576724002115},
publisher = {International Union of Crystallography (IUCr)},
}
Project details
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
Hashes for reflectorch-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e473a191338f86f2b53391cfb8d885c3e37e338ddfb99818d0b2c482cb64058 |
|
MD5 | 7540d5c8a7c38370f888c27aaf8b21ff |
|
BLAKE2b-256 | c8f28dcf50708b7eb4dc626c49cde229c1a977754541258ad1a870560bd8732d |