ewoksid02.utils.io.get_array_mask#
- ewoksid02.utils.io.get_array_mask(filename_mask, data_signal_shape, datatype='bool', binning=(1, 1), use_cupy=False, persistent=True)[source]#
Generate the array to mask (gaps or beamstop normally)
- params:
filename_mask (str): the filename of the mask
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
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 mask or None if the file does not exist
- Parameters:
filename_mask (
str)data_signal_shape (
tuple)datatype (
str)binning (
tuple)use_cupy (
bool)persistent (
bool)
- Return type:
Optional[ndarray]