optimization.variable.zernike_coeff

Zernike Coefficients Variable Module

This module contains the class for a Zernike coefficient variable in an optic system. The ZernikeCoeffVariable class is a subclass of the PolynomialCoeffVariable class that represents a variable for a Zernike coefficient of a ZernikeGeometry. It is used in the optimization process for Zernike geometries.

drpaprika, 2025

Classes

ZernikeCoeffVariable(optic, surface_number, ...)

Represents a variable for a Zernike coefficient of a ZernikeGeometry.

class ZernikeCoeffVariable(optic, surface_number, coeff_index, scaler=None, **kwargs)[source]

Represents a variable for a Zernike coefficient of a ZernikeGeometry.

Parameters:
  • optic (Optic) – The optic object associated with the variable.

  • surface_number (int) – The index of the surface in the optical system.

  • coeff_index (int) – The i index of the Zernike coefficient.

  • scaler (Scaler) – The scaler to use for the variable. Defaults to IdentityScaler().

  • **kwargs – Additional keyword arguments.

coeff_number

The index of the Zernike coefficient.

Type:

int

get_value()[source]

Get the current value of the Zernike coefficient.

Returns:

The current value of the Zernike coefficient.

Return type:

float

inverse_scale(scaled_value)

Inverse scale the value of the variable.

Parameters:

scaled_value – The scaled value to inverse scale

scale(value)

Scale the value of the variable for improved optimization performance.

Parameters:

value – The value to scale

update_value(new_value)[source]

Update the value of the Zernike coefficient.

Parameters:

new_value (float) – The new value of the Zernike coefficient.