lentil.Pupil

class lentil.Pupil(focal_length=None, pixelscale=None, amplitude=1, phase=0, mask=None)[source]

Class for representing a pupil plane.

Parameters
  • focal_length (float) – Focal length

  • pixelscale (float) – Physical sampling of each pixel in the pupil

  • amplitude (array_like, optional) – Electric field amplitude transmission. Amplitude should be normalized with normalize_power() if conservation of power through a diffraction propagation is required. If not specified, a default amplitude is created which has no effect on wavefront propagation.

  • phase (array_like, optional) – Phase change caused by plane. If not specified, a default phase is created which has no effect on wavefront propagation.

  • mask (array_like, optional) –

    Binary mask. If not specified, a mask is created from the amplitude. If mask has 2 dimensions, the plane is assumed to be monolithic. If mask has 3 dimensions, the plane is assumed to be segmented with the individual segment masks inserted along the first dimension.

    ../_images/segmask.png

Note

By definition, a pupil is represented by a spherical wavefront. Any aberrations in the optical system appear as deviations from this perfect sphere. The primary use of Pupil is to represent these aberrations

Attributes

amplitude

Electric field amplitude transmission

depth

Number of independent masks (segments) in mask

focal_length

Pupil focal length

global_mask

Flattened view of mask

mask

Binary mask

phase

Electric field phase shift

pixelscale

Physical (row, col) sampling of each pixel in the Plane.

ptt_vector

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

shape

Plane dimensions computed from mask.

slice

tilt

List of additional Tilt terms associated wirth this Plane

Methods

copy()

Make a copy of this object.

fit_tilt([inplace])

Fit and remove tilt from Plane phase via least squares.

multiply(wavefront[, inplace])

Multiply with a wavefront

resample(pixelscale[, inplace])

Resample a plane via interpolation.

rescale(scale[, inplace])

Rescale a plane via interpolation.