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 CodeFactor 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.

Docker 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

reflectorch-1.2.1.tar.gz (239.2 kB view details)

Uploaded Source

Built Distribution

reflectorch-1.2.1-py3-none-any.whl (106.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for reflectorch-1.2.1.tar.gz
Algorithm Hash digest
SHA256 7d6520a80f91df7428a9929a45f67dec038a5ba72e541820881d9ec9f07d4830
MD5 aa1e5de46897ac2a542aef14971a97ca
BLAKE2b-256 0b93226c95d405a0e2f5f917d007379984a5f10152b8ec08cb069fb1cb644edb

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for reflectorch-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7bb7cae7a1564dc0b3b13da0e5924f899a1c7344dd14a3444ff25532c6396c7f
MD5 059d57ee96db9f7161315fc0dee50115
BLAKE2b-256 4b42573e660b8a1031cda97f42b470cb4bf71a9908c1e5b173d9588165f2a13d

See more details on using hashes here.

Supported by

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