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[, ...])

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

class RadiusVariable(optic, surface_number, axis=None, 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.

  • axis (str, optional) – Radius axis for a toroidal surface. Must be "x" or "y" for toroidal geometry and omitted otherwise.

  • 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.

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

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

Methods:
  • get_value() – Returns the current value of the radius.

  • update_value (new_value) – 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.