Skip to content

A collection of pure python functions for performing area detector corrections

License

Notifications You must be signed in to change notification settings

DiamondLightSource/adcorr

Repository files navigation

adcorr

Code CI Docs CI Test Coverage Latest PyPI version Apache License

This package provides a set of pure python functions for performing corrections on area detector data.

Install via PyPI with:

pip install adcorr

Useful Links

PyPI https://pypi.org/project/adcorr/
Source code https://github.com/DiamondLightSource/adcorr
Documentation https://DiamondLightSource.github.io/adcorr
Releases https://github.com/DiamondLightSource/adcorr/releases

Brief Example

A brief example of performing corrections using the library is presented below:

frames = load_my_frames()
mask = load_my_mask()
count_times = load_count_times()

frames = mask_frames(frames, mask)
frames = correct_deadtime(
    frames,
    count_times,
    DETECTOR_MINIMUM_PULSE_SEPARATION,
    DETECTOR_MINIMUM_ARRIVAL_SEPARATION,
)
frames = correct_dark_current(
    frames,
    count_times,
    BASE_DARK_CURRENT,
    TEMPORAL_DARK_CURRENT,
    FLUX_DEPENDANT_DARK_CURRENT,
)
...

Library Compatibility

Library Tests Coverage
numcertain Numcertain Compatibility Test Outcome Numcertain Compatibility Test Coverage
Pint Pint Compatibility Test Outcome Pint Compatibility Test Coverage

See https://DiamondLightSource.github.io/adcorr for more detailed documentation.