lentil.detector.collect_charge

lentil.detector.collect_charge(img, wave, qe, waveunit='nm')[source]

Convert photon count (or flux) to electron count (or flux) by applying the detector’s wavelength-dependent quantum efficiency.

Parameters
  • img (array_like) – The photons presented to the sensor. Should have shape (nwave, nrows, ncols)

  • wave (array_like) – Wavelengths corresponding to each slice in count. The length of wave must be equal to the number of samples nwave in count.

  • qe ({lentil.radiometry.Spectrum array_like, or scalar}) – Quantum efficiency used to convert detected photons to electrons.

  • waveunit (str, optional) – Units of wave. Defaults is nm

Returns

img – Electron count or flux

Return type

ndarray

Notes

The units of count don’t really matter, as long as the user is aware that this method converts photons per whatever to electrons per whatever. Whatever is nothing for counts and seconds for flux.