optimization.variable.polynomial_coeff

Polynomial XY Variable Module

This module contains the PolynomialCoeffVariable class, which represents a variable for a polynomial coefficient of a PolynomialGeometry. The class inherits from the VariableBehavior class.

Kramer Harrison, 2024

Classes

PolynomialCoeffVariable(optic, ...[, scaler])

Represents a variable for a polynomial coefficient of a PolynomialGeometry.

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

Represents a variable for a polynomial coefficient of a PolynomialGeometry.

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

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

  • coeff_index (tuple(int, int)) – The (x, y) indices of the polynomial coefficient.

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

  • **kwargs – Additional keyword arguments.

coeff_number

The index of the polynomial coefficient.

Type:

int

get_value()[source]

Get the current value of the polynomial coefficient.

Returns:

The current value of the polynomial 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 polynomial coefficient.

Parameters:

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