Utilities#

Shapes#

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

Draw a circle

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

Draw a hexagon

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

Draw a rectangle

spider(shape, width[, angle, shift, antialias])

Draw a spider

Array manipulation#

boundary(x[, threshold])

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

centroid(img)

Compute image centroid location.

pad(array, shape)

Zero-pad an array.

subarray(a, shape[, shift])

Extract a contiguous subarray from a larger array.

window(img[, shape, slice])

Extract an appropriately sized, potentially windowed array

rebin(img, factor)

Rebin an image by an integer factor.

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

Rescale an image by interpolation.

Miscellaneous#

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

pixelscale_nyquist(wave, f_number)

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

normalize_power(array[, power])

Normalizie the power in an array.

hex_segments(rings, seg_radius, seg_gap[, ...])

Draw a segmented aperture made up of hexagonal segments