thin_film.optimization.operand.core#
Core types for thin-film optimization operands.
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. |
|
Bundles a thin-film stack for evaluation by a registered operand. |
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.
- 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.
- current_values(context: ThinFilmEvaluationContext) list[float][source]#
- delta(context: ThinFilmEvaluationContext) float[source]#
Compute the scalar residual for this operand.
- fun(context: ThinFilmEvaluationContext) float#
- performance_data(context: ThinFilmEvaluationContext) dict[str, Any][source]#
Return performance metrics dict for reporting.
- plot(ax, plot_type: str, x_values: numpy.ndarray, **kwargs) None[source]#
- residuals(context: ThinFilmEvaluationContext) list[float][source]#
- class ThinFilmBaseOperand[source]#
Base class for merit-function operands.
- abstractmethod delta(context: ThinFilmEvaluationContext) float[source]#
Compute the scalar residual for this operand.
- fun(context: ThinFilmEvaluationContext) float[source]#
- abstractmethod performance_data(context: ThinFilmEvaluationContext) dict[str, Any][source]#
Return performance metrics dict for reporting.
- plot(ax, plot_type: str, x_values: numpy.ndarray, **kwargs) None[source]#
- 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.
- fun(context: ThinFilmEvaluationContext) float#
- performance_data(context: ThinFilmEvaluationContext) dict[str, Any][source]#
Return performance metrics dict for reporting.
- plot(ax, plot_type: str, x_values: numpy.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]#
- class ThinFilmEvaluationContext(stack: ThinFilmStack)[source]#
Bundles a thin-film stack for evaluation by a registered operand.
- stack: ThinFilmStack#