lentil.field.Field

class lentil.field.Field(data, pixelscale=None, offset=None, tilt=None)[source]

Two-dimensional discretely sampled complex field.

Parameters
  • data (array_like) – Array containing the sampled field. Note that real-valued data is cast to complex.

  • pixelscale (float or None, optional) – Data array spatial sampling. If None (default), the field is assumed to be broadcastable to any legal shape without interpolation.

  • offset ((2,) array_like of ints or None, optional.) – Shift of the Field in (row, column) from (0, 0). If None (default), offset = (0, 0).

  • tilt (list, optional) –

    List of objects which implement a shift method. This method should accept the following parameters:

    shift(xs, ys, z, wavelength)

    and return an updated x and y shift. If None (default), tilt = [].

Attributes

data

offset

tilt

extent

The array indices defining the extent of the shifted Field.

ndim

Number of Field dimensions

pixelscale

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

shape

Tuple of Field dimensions

size

Number of elements in the Field

Methods

overlap(other)

Returns True if two fields overlap

shift(z, wavelength, pixelscale, oversample)

Compute Field shift due to associated Tilt objects