Internals#

Plane type#

lentil.ptype.ptype(ptype)

Create a plane type object

lentil.ptype.PType(ptype)

An object to hold the type of a Plane or Wavefront

Field#

lentil.field.Field(data[, pixelscale, ...])

Two-dimensional discretely sampled complex field.

lentil.field.boundary(fields)

Compute the bounding extents around a number of Field objects.

lentil.field.insert(field, out[, intensity, ...])

Insert a field into an array.

lentil.field.merge(a, b[, enforce_overlap])

Merge two Fields

lentil.field.overlap(fields)

True if two Fields overlap, otherwise False

lentil.field.reduce(fields)

Reduce a number of Fields into a potentially smaller disjoint set where overlapping Fields are merged.

Extent#

lentil.extent.array_extent(shape, shift[, ...])

Compute the extent of a shifted array.

lentil.extent.array_center(extent)

Compute the center of an extent

lentil.extent.intersect(a, b)

Return True if two extents intersect, otherwise False

lentil.extent.intersection_extent(a, b)

Compute the extent of two overlapping extents

lentil.extent.intersection_shape(a, b)

Compute the shape of two overlapping extents.

lentil.extent.intersection_slices(a, b)

Compute slices of overlapping areas between two overlapping extents

lentil.extent.intersection_shift(a, b)

Compute the shift between two overlapping extents

Tilt interface#

lentil.plane.TiltInterface(**kwargs)

Utility class for holding common lofic shared by classes that need to implement the tilt interface.

Fourier transforms#

lentil.fourier.dft2(f, alpha[, shape, ...])

Compute the 2-dimensional discrete Fourier Transform.

Helper functions#

lentil.helper.mesh(shape[, shift, angle])

Generate a standard mesh.

lentil.helper.boundary_slice(x[, threshold, pad])

Find bounding row and column indices of data within an array and return the results as slice objects.

lentil.helper.slice_offset(slice, shape)

Compute the offset of the center of a 2D slice relative to the center of a larger array.

lentil.helper.gaussian2d(size, sigma)

2D Gaussian kernel.