lentil.Image

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

Class for representing an image plane.

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

  • shape ({int, (2,) array_like}, optional) – Number of pixels as (rows, cols). If a single value is provided, Image is assumed to be square with nrows = ncols = shape. Default is None.

Note

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

depth

Number of independent masks (segments) in mask

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

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.