API reference¶
This page gives an overview of all public functions, modules, and objects included
in Lentil. All classes and functions exposed in the lentil
namespace are public.
Some subpackages are public including lentil.radiometry
and
lentil.detector
.
Planes¶
|
Base class for representing a finite geometric plane. |
|
Class for representing a pupil plane. |
|
Class for representing an image plane. |
|
Class for representing an image plane that returns intensity. |
|
Class for representing a grism. |
|
Object for representing tilt in terms of an angle |
|
Rotate a Wavefront by a specified angle |
|
Flip a wavefront along specified axis |
Wavefront¶
|
A class representing a monochromatic wavefront. |
Zernike polynomials¶
|
Compute the circular Zernike polynomial for a given mask. |
|
Compute a Zernike basis set for a given mask. |
|
Create an OPD based on the supplied Zernike coefficients. |
|
Compute the Zernike coordinate system for a given mask. |
|
Fit a Zernike basis set to an OPD. |
|
Fit and remove a Zernike basis set from an OPD. |
Wavefront errors¶
|
Wavefront error defined by a Power Spectral Density (PSD) function. |
|
Defocus error characterized by a axial translation. |
Imaging artifacts¶
|
Apply image jitter via convolution. |
|
Apply image smear via convolution. |
Utilities¶
Shapes¶
|
Compute a circle with anti-aliasing. |
|
Compute a circular mask. |
|
Compute a hexagon mask. |
|
Compute a slit mask. |
Array manipulation¶
|
Find bounding row and column indices of data within an array. |
|
Compute image centroid location. |
|
Zero-pad an array. |
|
Extract an appropriately sized, potentially windowed array |
|
Rebin an image by an integer factor. |
|
Rescale an image by interpolation. |
Miscellaneous¶
|
|
|
Compute the output plane sampling which is Nyquist sampled for intensity. |
|
Normalizie the power in an array. |
|
|
Detector module¶
Charge collection¶
|
Convert photon count (or flux) to electron count (or flux) by applying the detector's wavelength-dependent quantum efficiency. |
|
Convert photon count (or flux) to electron count (or flux) by applying the detector's wavelength-dependent quantum efficiency. |
Pixel effects¶
|
Apply the aperture effects of a square pixel on a discretely sampled image. |
|
Convolve an image with the pixel MTF and rescale the result to native sampling |
Noise¶
|
Apply shot noise to an image |
|
Apply read noise to a frame |
|
Apply charge diffusion represented by a Gaussian blur |
|
Create dark current frame |
|
Create dark current frame for HgCdTe infrared detectors using Rule 07 |
Readout¶
|
Analog to digital conversion |
Cosmic rays¶
|
Cosmic ray generator for simulating cosmic ray hits on a detector. |
Radiometry module¶
|
Class for representing spectral quantities. |
|
Class for representing a blackbody emitter. |
|
Class for representing a material with radiometric properties. |
|
Compute the Planck law spectral radiance from a blackbody radiator at the given temperature. |
|
Compute the Planck law spectral exitance from a blackbody radiator at the given temperature. |
|
Get the flux of Vega in a desired observing band. |
|
Construct a common transmission from an iterable of |
|
Construct a common emission from an iterable of |
Internals¶
Warning
The lentil.field
, lentil.fourier
, and lentil.helper
top-level
modules are intended for internal use. Stable functionality in these
modules is not guaranteed.
Field¶
|
Two-dimensional discretely sampled complex field. |
|
|
|
Compute shifted array extent |
|
True if two Fields overlap, otherwise False |
|
Compute the bounding extents around a number of Field objects. |
|
|
|
Merge two Fields |
|
Multiply fields element-wise. |
|
Reduce a number of disjoint Fields into a potentially smaller set where overlapping Fields are merged. |
Fourier transforms¶
|
Compute the 2-dimensional discrete Fourier Transform. |
|
Compute the 2-dimensional inverse discrete Fourier Transform. |
Helper functions¶
|
Find bounding row and column indices of data within an array and return the results as slice objects. |
|
2D Gaussian kernel. |
|
Generate a standard mesh. |
|
Compute the offset of the center of a 2D slice relative to the center of a larger array. |