pysdic.ZernikeDistortion.get_index#

ZernikeDistortion.get_index(n, m, coord)[source]#

Get the index in the parameters of the Zernike coefficient \(C^{x}_{n,m}\) or \(C^{y}_{n,m}\).

\[\text{index} = n(n+2) + m + (0 \text{ if } coord = 'x' \text{ else } 1)\]
Parameters:
  • n (Integral) – The order of the Zernike polynomial.

  • m (Integral) – The azimuthal frequency of the Zernike polynomial (\(|m| \leq n\), \(n - m\) even).

  • coord (str) – The coordinate (‘x’ or ‘y’).

Returns:

The index of the Zernike coefficient in the parameters.

Return type:

int

Raises:

ValueError – If \((n, m)\) is not a valid Zernike polynomial or is not in the model.