lentil.DispersiveTilt#

class lentil.DispersiveTilt(trace, dispersion, **kwargs)[source]#

Class for representing spectral dispersion that appears as a tilt.

Light is dispersed along a line called the the spectral trace. The position along the trace is determined by the dispersion function. The local origin of the spectral trace is anchored relative to the undispersed position of the source.

Parameters:
  • trace (array_like) – Polynomial coefficients describing the spectral trace 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 in decreasing powers (i.e. dispersion[0] represents the highest order coefficient and dispersion[-1] represents the lowest.)

  • **kwargs (Plane parameters) – Keyword arguments passed to Plane constructor

Notes

The basic geometry of spectral dispersion is illustrated in the figure below:

../../_images/grism_geometry.png

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.

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.

Attributes

amplitude

Electric field amplitude transmission

diameter

Plane diameter

global_mask

Flattened view of mask

mask

Binary transmission mask

opd

Optical path difference

pixelscale

Physical sampling of each pixel in the plane

ptt_vector

2D vector representing piston and tilt in x and y.

ptype

Plane type

shape

Plane dimensions computed from mask.

size

Number of independent masks (segments) in mask

Methods

copy()

Make a copy of this object.

fit_tilt([inplace])

Fit and remove tilt from Plane opd via least squares.

multiply(wavefront)

Multiply with a wavefront.

resample(pixelscale)

Resample a plane via interpolation.

rescale(scale)

Rescale a plane via interpolation.

shift(wavelength[, xs, ys])

TODO