lentil.Image#

class lentil.Image(amplitude=1, opd=0, mask=None, pixelscale=None, **kwargs)[source]#

Class for representing an image plane.

Parameters:
  • 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. Can also be specified using the amp keyword.

  • opd (array_like, optional) – Optical path difference (OPD) induced by plane. If not specified (default), zero OPD 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.

  • pixelscale (float, optional) – Pixel size in meters. Pixels are assumed to be square. Default is None.

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

Notes

If image plane intensity is desired, significant performance improvements can be realized by using a Detector plane instead.

See also

Detector

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(*args, **kwargs)

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.