httomo.darks_flats.DarksFlatsFileConfig#

class httomo.darks_flats.DarksFlatsFileConfig(file: Path, data_path: str, image_key_path: str | None)[source]#

Configuration for where dark-field or flat-field images associated with the projection data are stored.

Notes

There are currently two supported configurations for where dark-field or flat-field images can be loaded from:

1. Dark-field and flat-field images are stored in the same file as the projection images, and in the same dataset in that file.

An image key dataset is present in the file to indicate (by values 0, 1, or 2) which images in the dataset are projections (0), darks (1), or flats (2). For this case, the image_key_path should be provided.

Please see the NeXuS format manual for more information: https://manual.nexusformat.org/classes/base_classes/NXdetector.html#nxdetector-image-key-field

2. Dark-field and flat-field images are stored in separate files from the file containing the projection images.

Typically this case is such that dark-field images are in a dataset in one file, and flat-field images are in a dataset in another file. Furthermore, the dataset that either dark-field or flat-field images are stored in contains only one kind of image (ie, the dataset containing dark-field images will contain only dark-field images and nothing else).

Therefore, an image key is not needed to distinguish between projection, dark-field, or flat-field images. For this case, the image_key_path should be given as None.

Methods

Attributes

data_path

Alias for field number 1

file

Alias for field number 0

image_key_path

Alias for field number 2

data_path: str#

Alias for field number 1

file: Path#

Alias for field number 0

image_key_path: str | None#

Alias for field number 2