Skip to content

BAMresearch/MoDaCor

Repository files navigation

Overview

new modular data corrections for any neutron or xray technique that produces 1D or 2D scattering/diffraction/imaging data

Summary

MoDaCor is a library for traceable, stepwise data corrections, with propagation of units as well as (multiple) uncertainties. The data sources can be files or data streams. The correction follows an optionally branching and merging graph that is to be configured per application. The computational steps can reuse pre-calculated information calculated in the first run to minimize unnecessary overhead. The modular approach allows very detailed introspection into the effect of each step on the data, units and uncertainties.

This is intended to take on modular data correction workflow tasks as described in this work: https://doi.org/10.1107/S1600576717015096 It can be used either directly, or used as a standard to check faster, more integrated data correction implementations against.

Installation

pip install modacor

You can also install the in-development version with:

pip install git+https://github.com/BAMresearch/modacor.git@main

Documentation

https://BAMresearch.github.io/modacor

Development

For coding contributions, we strongly recommend:
  • using flake8 and/or black for consistent formatting.
  • writing tests for every added functionality -> towards test-driven coding practices.

To run all the tests run:

tox

Note, to combine the coverage data from all the tox environments run:

Windows
set PYTEST_ADDOPTS=--cov-append
tox
Other
PYTEST_ADDOPTS=--cov-append tox

About

new modular data corrections for any neutron or xray technique that produces 1D or 2D scattering/diffraction/imaging data

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 7

Languages