httomo.darks_flats.get_darks_flats#
- httomo.darks_flats.get_darks_flats(darks_config: DarksFlatsFileConfig | None, flats_config: DarksFlatsFileConfig | None, preview_config: PreviewConfig, datatype: numpy.dtype) Tuple[numpy.ndarray, numpy.ndarray][source]#
Reads the dark-field and flat-field images from the file(s) defined in the input configurations.
- Parameters:
darks_config (Optional[DarksFlatsFileConfig]) – Configuration of where to get the dark-field images from. If None, then generate dummy darks.
flats_config (Optional[DarksFlatsFileConfig]) – Configuration of where to get the flat-field images from. If None, then generate dummy flats.
preview_config (PreviewConfig) – Configuration of previewing to be applied to projection, dark-field, and flat-field images.
datatype (np.dtype) – Data type for any dummy darks/flats that need to be generated
- Returns:
Index zero contains the dark-field images and index one contains the flat-field images.
- Return type:
Tuple[np.ndarray, np.ndarray]