mask_from_bkgd_pattern#
- ReducedIntensityGenerator1D.mask_from_bkgd_pattern(mask_pattern, mask_threshold=1, inplace=True, *args, **kwargs)[source]#
Uses a background pattern with a threshold, and sets that part of the signal to zero, effectively adding a mask. This can be used to mask the central beam.
- Parameters:
mask_pattern (np.array) – A numpy array line profile of the same resolution as the radial profile.
mask_threshold (int or float) – An integer or float threshold. Any pixel in the mask_pattern with lower intensity is kept, any with higher or equal is set to zero.
inplace (bool) – If True (default), this signal is overwritten. Otherwise, returns a new signal.
*args – Arguments to be passed to map().
**kwargs – Keyword arguments to be passed to map().