lentil.detector.adc

lentil.detector.adc(img, gain, saturation_capacity=None, warn_saturate=False, dtype=None)[source]

Analog to digital conversion

Parameters
  • img (ndarray) – Array of electron counts

  • gain (saclar or array_like) –

    Conversion gain in DN/e-. Can be specified in multiple ways:

    • As a scalar term applied globally to each pixel

    • As a one-dimensional array of polynomial coefficients applied globally to each pixel

    • As a two-dimensional array of pixel-by-pixel scalar gain applied individually to each pixel

    • As a three-dimensional array of pixel-by-pixel gain where the first dimension gives polynomial coefficients of each pixel

  • saturation_capacity (int or None) – Electron count resulting in pixel saturation. If None, pixels will not saturate. This is obviously nonphysical, but can be useful for testing or debugging.

  • warn_saturate (bool, optional) – Raise a warning when pixels saturate. Default is False.

  • dtype (data-type or None, optional) – Output data-type. If None (default), no data-type casting is performed.

Returns

img – Array of DN

Return type

ndarray

Note

The saturation capacity should not be confused with the full-well capacity. Saturation capacity is typically smaller than the full well capacity because the signal is clipped before the physical saturation of the pixel is reached.