optimization.variable.index
Refractive Index Variable Module
This module contains the IndexVariable class, which represents a variable for the index of refraction at a specific surface and wavelength. The variable can be used in optimization problems to optimize the index of refraction at a specific surface.
Kramer Harrison, 2024
Classes
|
Represents a variable for the index of refraction at a specific surface and wavelength. |
- class IndexVariable(optic, surface_number, wavelength, scaler=None, **kwargs)[source]
Represents a variable for the index of refraction at a specific surface and wavelength.
- Parameters:
optic (Optic) – The optic object associated with the variable.
surface_number (int) – The surface number where the variable is applied.
wavelength (float) – The wavelength at which the index of refraction is calculated.
scaler (Scaler) – The scaler to use for the variable. Defaults to a linear scaler with offset=-1.5.
**kwargs – Additional keyword arguments.
- surface_number
The number of the surface.
- Type:
int
- wavelength
The wavelength at which the index of refraction is calculated.
- Type:
float
- get_value()[source]
Returns the value of the index of refraction at the specified surface and wavelength.
- update_value(new_value)[source]
Updates the value of the index of refraction at the specified surface.
- get_value()[source]
Returns the value of the index of refraction at the specified surface and wavelength.
- Returns:
The value of the index of refraction.
- 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