lentil.Grism#
- class lentil.Grism(trace, dispersion, **kwargs)[source]#
Class for representing a grism.
A grism is an optical element that can be inserted into a collimated beam to disperse incoming light according to its wavelength.
Light is dispersed along a line called the the spectral trace. The position along the trace is determined by the dispersion function of the grism. The local origin of the spectral trace is anchored relative to the undispersed position of the source. This basic geometry is illustrated in the figure below:
The spectral trace is parameterized by a polynomial of the form
\[y = a_n x^n + \cdots + a_2 x^2 + a_1 x + a_0\]and should return units of meters on the focal plane provided an input in meters on the focal plane.
Similarly, the wavelength along the trace is parameterized by a polynomial of the form
\[\lambda = a_n d^n + \cdots + a_2 d^2 + a_1 d + a_0\]and should return units of meters of wavelength provided an input distance along the spectral trace.
Notes
Lentil supports trace and dispersion functions with any arbitrary polynomial order. While a simple analytic solution exists for modeling first-order trace and/or dispersion, there is no general solution for higher order functions.
As a result, trace and/or dispersion polynomials with order > 1 are evaluated numerically. Although the effects are small, this approach impacts both the speed and precision of modeling grisms with higher order trace and/or dispersion functions. In cases where speed or accuracy are extremely important, a custom solution may be required.
- Parameters:
trace (array_like) – Polynomial coefficients describing the spectral trace produced by the grism in decreasing powers (i.e. trace[0] represents the highest order coefficient and trace[-1] represents the lowest).
dispersion (array_like) – Polynomial coefficients describing the dispersion produced by the grism in decreasing powers (i.e. dispersion[0] represents the highest order coefficient and dispersion[-1] represents the lowest.)
**kwargs (
Plane
parameters) – Keyword arguments passed toPlane
constructordeprecated: (..) – 1.0.0: Grism will be removed in Lentil v1.0.0, it is replaced by DispersiveTilt.
Attributes
Electric field amplitude transmission |
|
Plane diameter |
|
Flattened view of |
|
Binary transmission mask |
|
Optical path difference |
|
Physical sampling of each pixel in the plane |
|
2D vector representing piston and tilt in x and y. |
|
Plane type |
|
Plane dimensions computed from |
|
Number of independent masks (segments) in |
Methods