Skip to content

Diffractive Layers

svetlanna.elements.DiffractiveLayer

DiffractiveLayer(
    simulation_parameters: SimulationParameters,
    mask: OptimizableTensor,
    mask_norm: float = 2 * pi,
)

Bases: Element

Diffractive layer defined by a phase mask. The field after propagating through the layer is calculated as:

\[ E^\text{out}_{xyw...} = E^\text{in}_{xyw...} \cdot \exp\left(2\pi i \frac{\text{mask}_{xy}}{\text{mask\_norm}}\right) \]

Parameters:

  • simulation_parameters (SimulationParameters) –

    Simulation parameters.

  • mask (OptimizableTensor) –

    Two-dimensional tensor representing the aperture mask of shape (H, W).

  • mask_norm (float, default: 2 * pi ) –

    Mask normalization factor.

transmission_function property

transmission_function: Tensor

The tensor representing the transmission function of the element \(\exp\left(2\pi i \dfrac{\text{mask}}{\text{mask\_norm}}\right)\). The shape of the tensor is broadcastable to the incident wavefront's shape.