Detector (lentil.detector)#

Charge collection#

lentil.detector.collect_charge(img, wave, qe)

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

lentil.detector.collect_charge_bayer(img, ...)

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

Pixel effects#

lentil.detector.pixel(img[, oversample])

Apply the aperture effects of a square pixel on a discretely sampled image.

lentil.detector.pixelate(img, oversample)

Convolve an image with the pixel MTF and rescale the result to native sampling

Noise#

lentil.detector.shot_noise(img[, method, seed])

Apply shot noise to an image

lentil.detector.read_noise(img, electrons[, ...])

Apply read noise to a frame

lentil.detector.charge_diffusion(img, sigma)

Apply charge diffusion represented by a Gaussian blur

lentil.detector.dark_current(rate[, shape, ...])

Create dark current frame

lentil.detector.rule07_dark_current(...[, ...])

Create dark current frame for HgCdTe infrared detectors using Rule 07

Readout#

lentil.detector.adc(img, gain[, ...])

Analog to digital conversion

Cosmic rays#

lentil.detector.cosmic_rays(shape, ...[, ...])

Cosmic ray generator for simulating cosmic ray hits on a detector.