Skip to main content

A Pytorch-based package for the analysis of reflectometry data

Project description

Reflectorch

PyTorch NumPy SciPy Matplotlib YAML Hugging Face

Python version CI workflow status Repos size

Jupyter Book Documentation Documentation Page

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 PyPi 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

Documentation Page 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/.

Interactive Notebook We provide an interactive Google Colab notebook for exploring the basic functionality of the package: Explore reflectorch in Colab

Hugging Face Configuration files and the corresponding pretrained model weights are hosted on Huggingface: https://huggingface.co/valentinsingularity/reflectivity.

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

reflectorch-1.3.0.tar.gz (307.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reflectorch-1.3.0-py3-none-any.whl (120.0 kB view details)

Uploaded Python 3

File details

Details for the file reflectorch-1.3.0.tar.gz.

File metadata

  • Download URL: reflectorch-1.3.0.tar.gz
  • Upload date:
  • Size: 307.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.5

File hashes

Hashes for reflectorch-1.3.0.tar.gz
Algorithm Hash digest
SHA256 73ab3b44ab0a993495f523a41780567e4adabcb8c9e497c4a693f42bb572c308
MD5 af870551ce8054415f59b7db39db34a6
BLAKE2b-256 0591a7c326f60af70e6d20624d9b6344f86f186856aae12b8ef7f803deec7b9b

See more details on using hashes here.

File details

Details for the file reflectorch-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: reflectorch-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 120.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.5

File hashes

Hashes for reflectorch-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e069cbe2593bf4208030c4fa985d061e32719d2d32918eecaa2bfe00a4c9cd6
MD5 aadc6fc8d0a342ef7e858772581a6675
BLAKE2b-256 21c5d1f47bbad3b62a300a1791410d1082e976ae085f84be63b1713ba88a05f1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page