ewoksid02.utils.io.get_array_flat#
- ewoksid02.utils.io.get_array_flat(filename_flat, data_signal_shape, datatype='float32', binning=(1, 1), dummy=None, delta_dummy=None, filename_mask=None, use_cupy=False, persistent=True)[source]#
Generate the array of the flat field correction, eventually applying the mask and dummy pixel filtering params:
filename_flat (str): the filename of the flat field correction
data_signal_shape (tuple): the shape of the data signal array, used for binning unification
datatype (str): format of the imported array, if None, datatype is respected
binning (tuple): binning of the data signal, used for binning unification
dummy (int): if not None, the value of the dummy pixels to filter
delta_dummy (float): if dummy is not None, the tolerance around the dummy value
filename_mask (str): the filename of the mask
use_cupy (bool): if True, returns a cupy.asarray
persistent (bool): if True, the array is cached in memory and only reloaded if the file modification time changes
- returns:
Optional[Union[numpy.ndarray, cupy.ndarray]]: the array flat-field correction or None if the file does not exist
- Parameters:
filename_flat (
str)data_signal_shape (
tuple)datatype (
str)binning (
tuple)dummy (
int)delta_dummy (
float)filename_mask (
str)use_cupy (
bool)persistent (
bool)