add_detector_offset#

diffsims.pattern.detector_functions.add_detector_offset(pattern, offset)[source]#

Adds/subtracts a fixed offset value from a pattern

Parameters:
patternnumpy.ndarray

The diffraction pattern at the detector

offsetfloat or numpy.ndarray

Added through the pattern, broadcasting applies

Returns
——-
corrupted_patternnp.ndarray

The pattern, with offset applied, pixels that would have been negative are instead 0.