optimization.variable.reciprocal_radius
Reciprocal Radius Variable Module
This module contains the ReciprocalRadiusVariable class, which represents a variable for the reciprocal of the radius of a surface in an optic. The transformation is useful because a nearly flat surface (with a very large positive or negative radius) has a reciprocal near zero, which makes the optimization around a nearly flat surface continuous. The reciprocal radius provides a continuous transition when surface changes from convex to concave (when the radius changes sign).
Daniel Miranda, 2025 ALL rights ceded to Kramer Harrison
Classes
|
Represents a variable for the reciprocal of the radius of a surface in an optic. |
- class ReciprocalRadiusVariable(optic, surface_number, scaler=None, **kwargs)[source]
Represents a variable for the reciprocal of the radius of a surface in an optic.
- Parameters:
- surface_number
The index of the surface in the optic.
- Type:
int
- get_value()[source]
Returns the current value of the reciprocal of the radius.
- Returns:
The current reciprocal 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