ess.imaging.tools.saturation.saturation_indicator#

ess.imaging.tools.saturation.saturation_indicator(intensity, threshold=0.9)[source]#

The intensity is supposed to be a signal that scales with the gain of the image intensifier. Near saturation that is not the case anymore. The indicator tracks the second component of the singular value decomposition of the intensity signal, at the gain when the amplitude of the second component changes quickly that indicates saturation. The indicator is scaled to have a maximum at the gain where saturation kicks in.

Parameters:
  • intensity (DataArray) – The intensity as a function of gain and wavelength.

  • threshold (float, default: 0.9) – Safety factor to avoid saturation region. Must be between 0 and 1. Corresponds to the acceptable reduction in intensity to create margin to the saturation region.

Returns:

tuple[DataArray, Variable] – The saturation indicator value as a function of ‘gain’, and the maximum gain value acceptable according to the provided threshold.