thin_film.optimization.operand.core
Classes
|
Legacy spectral/angular target definition retained as public API. |
|
Concrete operand for R/T/A spectral and angular targets. |
Base class for merit-function operands. |
|
|
User-defined scalar operand registered in the thin-film registry. |
|
|
Manages operand instances for the thin-film optimizer. |
|
Registry for thin-film operand metric functions. |
- class OptimizationTarget(property: str, wavelength_nm: float | list[float], target_type: Literal['equal', 'below', 'over'], value: float | list[float], weight: float, aoi_deg: float | list[float], polarization: str, tolerance: float)[source]
Legacy spectral/angular target definition retained as public API.
- aoi_deg: float | list[float]
- interpolate_target_value(current_wl: float | None = None, current_aoi: float | None = None) float[source]
- polarization: str
- property: str
- target_type: Literal['equal', 'below', 'over']
- tolerance: float
- value: float | list[float]
- wavelength_nm: float | list[float]
- weight: float
- class SpectralOptimizationOperand(property: str, wavelength_nm: float | list[float], target_type: Literal['equal', 'below', 'over'], value: float | list[float], weight: float, aoi_deg: float | list[float], polarization: str, tolerance: float)[source]
Concrete operand for R/T/A spectral and angular targets.
- aoi_deg: float | list[float]
- current_values(context: ThinFilmEvaluationContext) list[float][source]
- delta(context: ThinFilmEvaluationContext) float[source]
Compute the scalar residual for this operand.
- property display_name: str
- fun(context: ThinFilmEvaluationContext) float
- performance_data(context: ThinFilmEvaluationContext) dict[str, Any][source]
Return performance metrics dict for reporting.
- polarization: str
- property: str
- residuals(context: ThinFilmEvaluationContext) list[float][source]
- target_type: Literal['equal', 'below', 'over']
- tolerance: float
- value: float | list[float]
- wavelength_nm: float | list[float]
- weight: float
- class ThinFilmBaseOperand[source]
Base class for merit-function operands.
- abstract delta(context: ThinFilmEvaluationContext) float[source]
Compute the scalar residual for this operand.
- fun(context: ThinFilmEvaluationContext) float[source]
- abstract performance_data(context: ThinFilmEvaluationContext) dict[str, Any][source]
Return performance metrics dict for reporting.
- weight: float
- class ThinFilmCustomOperand(operand_type: str, weight: float = 1.0, target: float | None = None, min_val: float | None = None, max_val: float | None = None, input_data: dict[str, Any] | None = None, label: str | None = None)[source]
User-defined scalar operand registered in the thin-film registry.
- delta(context: ThinFilmEvaluationContext) float[source]
Compute the scalar residual for this operand.
- property display_name: str
- fun(context: ThinFilmEvaluationContext) float
- operand_type: str
- performance_data(context: ThinFilmEvaluationContext) dict[str, Any][source]
Return performance metrics dict for reporting.
- plot(ax, plot_type: str, x_values: ndarray, **kwargs) None[source]
Draw horizontal reference lines for min_val / max_val / target.
Since a custom operand is a scalar metric without an intrinsic wavelength or angle axis, its constraint bounds are shown as horizontal lines so they can be read against whichever quantity is on the y-axis.
- value(context: ThinFilmEvaluationContext) float[source]
- weight: float = 1.0
- class ThinFilmEvaluationContext(stack: 'ThinFilmStack')[source]
- stack: ThinFilmStack