Utilities#

Shapes#

lentil.circle(shape, radius[, shift, antialias])

Draw a circle

lentil.hexagon(shape, radius[, shift, ...])

Draw a hexagon

lentil.rectangle(shape, width, height[, ...])

Draw a rectangle

lentil.spider(shape, width[, angle, shift, ...])

Draw a spider

Array manipulation#

lentil.boundary(x[, threshold])

Find bounding row and column indices of data within an array.

lentil.centroid(img)

Compute image centroid location.

lentil.pad(array, shape)

Zero-pad an array.

lentil.subarray(a, shape[, shift])

Extract a contiguous subarray from a larger array.

lentil.window(img[, shape, slice])

Extract an appropriately sized, potentially windowed array

lentil.rebin(img, factor)

Rebin an image by an integer factor.

lentil.rescale(img, scale[, shape, mask, ...])

Rescale an image by interpolation.

Miscellaneous#

lentil.min_sampling(wave, z, du, shape, min_q)

lentil.pixelscale_nyquist(wave, f_number)

Compute the output plane sampling which is Nyquist sampled for intensity.

lentil.normalize_power(array[, power])

Normalizie the power in an array.

lentil.hex_segments(rings, seg_radius, seg_gap)

Draw a segmented aperture made up of hexagonal segments