constrain_to_dynamic_range#
- diffsims.pattern.detector_functions.constrain_to_dynamic_range(pattern, detector_max=None)[source]#
Force the values within pattern to lie between [0,detector_max]
- Parameters:
pattern (numpy.ndarray) – The diffraction pattern at the detector after corruption
detector_max (float) – The maximum allowed value at the detector
- Returns:
within_range_pattern – The pattern, with values >=0 and =< detector_max
- Return type: