thin_film.optimization.variable.layer_thickness

Layer Thickness Variable Module

This module contains the LayerThicknessVariable class, which represents a variable for the thickness of a layer in a thin film stack. The class provides methods to get and update the layer thickness for optimization purposes.

Corentin Nannini, 2025

Classes

LayerThicknessVariable(stack, layer_index[, ...])

Represents a variable for a thin film layer thickness.

class LayerThicknessVariable(stack: ThinFilmStack, layer_index: int, apply_scaling=True, **kwargs)[source]

Represents a variable for a thin film layer thickness.

This class inherits from VariableBehavior and provides specific functionality for optimizing the thickness of individual layers in a ThinFilmStack.

Parameters:
  • stack (ThinFilmStack) – The thin film stack containing the layer.

  • layer_index (int) – The index of the layer in the stack (0-based).

  • apply_scaling (bool) – Whether to apply scaling for optimization. Defaults to True.

  • **kwargs – Additional keyword arguments passed to parent class.

stack

The thin film stack.

Type:

ThinFilmStack

layer_index

The index of the target layer.

Type:

int

get_value() float[source]

Returns the current thickness value of the layer in micrometers.

Returns:

The current thickness value in μm.

Return type:

float

inverse_scale(scaled_value: float) float[source]

Inverse scale the thickness value.

Converts from scaled representation back to micrometers.

Parameters:

scaled_value (float) – The scaled value to inverse scale.

Returns:

The thickness value in μm.

Return type:

float

scale(value: float) float[source]

Scale the thickness value for improved optimization performance.

Converts from micrometers to a scaled representation that’s better conditioned for numerical optimization.

Parameters:

value (float) – The thickness value in μm to scale.

Returns:

The scaled value.

Return type:

float

property thickness_nm: float

Get the current thickness in nanometers.

Returns:

The current thickness in nm.

Return type:

float

update_value(new_value: float) None[source]

Updates the thickness value of the layer.

Parameters:

new_value (float) – The new thickness value in μm (or scaled units).