zernikeFit#

lsst.ts.wep.utils.zernikeFit(u, v, z, jmin=4, jmax=22, obscuration=0.612, mask=None)#

Fit Zernike polynomials to the surface.

Parameters:
  • u (np.ndarray) – The x normalized pupil coordinate(s).

  • v (np.ndarray) – The y normalized pupil coordinate(s). Must be same shape as u.

  • z (np.ndarray) – The wavefront surface evaluated at the u, v points.

  • jmin (int, optional) – The minimum Noll index, inclusive. Must be >= 0. (the default is 4)

  • jmax (int) – The maximum Noll index to fit, inclusive. Must be >= jmin. (the default is 22)

  • obscuration (float, optional) – The fractional obscuration. (the default is 0.612, corresponding to the Simonyi Survey Telescope.)

  • mask (np.ndarray, optional) – A mask for the surface. The Zernikes are only fit to the unmasked points. (the default is None)

Returns:

The best fit Zernike coefficients in the same units as z.

Return type:

np.ndarray

Raises:

ValueError – If jmin is negative or jmax is less than jmin