ewoksscxrd.tasks.utils.subtract_frame_inplace#
- ewoksscxrd.tasks.utils.subtract_frame_inplace(frame, scale_factor, dectris_masking_value)[source]#
- For each pixel in a frame:
If frame[1] > dectris_masking_value, set result = frame0 + frame1 (saturating at max).
Otherwise, result = frame0 - scale_factor*frame1 (clipped at 0).
Finally, any input pixels that were already max uint32 in either frame0 or frame1 are forced back to max in the result (propagated).