prtools.zernike_coordinates#
- zernike_coordinates(mask, shift=None, angle=0, indexing='ij')[source]#
Compute the Zernike coordinate system for a given mask.
- Parameters:
mask (array_like) – Binary mask defining the extent to compute the Zernike polynomial over. Nonzero values are treated as inside the mask.
shift ((2,) array_like, optional) – How far to shift the origin from the center of the array. If None (default), shift is computed automatically to locate the origin at the mask centroid.
angle (float, optional) – Angle to rotate coordinate system by in degrees, from the +x axis toward the +y axis. Default is 0.
indexing ({'ij', 'xy'}, optional) – Matrix (‘ij’, default) or cartesian (‘xy’) indexing of
shift.
- Returns:
rho, theta – Normalized radius and angle. theta is measured from +x (increasing column) toward +y (increasing row).
- Return type:
ndarrays