optimization.variable.radius

Radius of Curvature Variable Module

This module contains the RadiusVariable class, which represents a variable for the radius of a surface in an optic. The class inherits from the VariableBehavior class.

Kramer Harrison, 2024

Classes

RadiusVariable(optic, surface_number[, scaler])

Represents a variable for the radius of a surface in an optic.

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

Represents a variable for the radius of a surface in an optic.

Parameters:
  • optic (Optic) – The optic object that contains the surface.

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

  • scaler (Scaler) – The scaler to use for the variable. Defaults to a linear scaler with factor=1/100 and offset=-1.0.

  • **kwargs – Additional keyword arguments.

optic

The optic object that contains the surface.

Type:

Optic

surface_number

The index of the surface in the optic.

Type:

int

get_value()[source]

Returns the current value of the radius.

update_value(new_value)[source]

Updates the value of the radius.

get_value()[source]

Returns the current value of the radius.

Returns:

The current value of the radius.

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 value of the radius.

Parameters:

new_value (float) – The new value of the radius.