lentil.detector.collect_charge_bayer

lentil.detector.collect_charge_bayer(img, wave, qe_red, qe_green, qe_blue, bayer_pattern, oversample=1, waveunit='nm')[source]

Convert photon count (or flux) to electron count (or flux) by applying the detector’s wavelength-dependent quantum efficiency. Additional processing is performed to apply separate QE curves and location masks for the separate red, green, and blue channels.

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 first dimension in count.

  • qe_red ({lentil.radiometry.Spectrum, array_like, scalar}) – Red channel quantum efficiency

  • qe_green ({lentil.radiometry.Spectrum, array_like, scalar}) – Green channel quantum efficiency

  • qe_blue ({lentil.radiometry.Spectrum, array_like, scalar}) – Blue channel quantum efficiency

  • bayer_pattern (array_like) – Layout of the detector’s Bayer pattern. For example, [[‘B’,’G’],[‘G’,’R’]] describes a BGGR pattern.

  • oversample (int, optional) – Oversampling factor present in count. Default is 1.

  • 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.