optimization.variable.decenter

Decenter Variable Module

This module contains the DecenterVariable class, which represents a variable for the decenter of an optic surface. The decenter variable can be used to optimize the decenter of a surface in the optical system.

Kramer Harrison, 2024

Classes

DecenterVariable(optic, surface_number, axis)

Represents a variable for the decenter of an optic surface.

class DecenterVariable(optic, surface_number, axis, scaler=None, **kwargs)[source]

Represents a variable for the decenter of an optic surface.

Parameters:
  • optic (Optic) – The optic object to which the surface belongs.

  • surface_number (int) –

    The number of the surface. axis (str): The axis of the decenter. Valid values are ‘x’, ‘y’, and ‘z’. scaler (Scaler): The scaler to use for the variable. Defaults to

    IdentityScaler().

    **kwargs: Additional keyword arguments.

  • **kwargs – Additional keyword arguments.

optic

The optic object to which the surface belongs.

Type:

Optic

surface_number

The number of the surface.

Type:

int

get_value()[source]

Returns the current decenter value of the surface.

update_value(new_value)[source]

Updates the decenter value of the surface.

get_value()[source]

Returns the current decenter value of the surface.

Returns:

The current decenter value.

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]

Updates the decenter value of the surface.

Parameters:

new_value (float) – The new decenter value.