Skip to content

Free Space

svetlanna.elements.FreeSpace

FreeSpace(
    simulation_parameters: SimulationParameters,
    distance: OptimizableFloat,
    method: Literal["ASM", "zpASM", "RSC", "zpRSC"],
    total_paddings_x: int | None = None,
    total_paddings_y: int | None = None,
)

Bases: Element

A class that describes a propagation of the wavefront in free space between two optical elements

Init method for FreeSpace class. Defines the parameters and precomputes the parameters for the chosen method of propagation.

Parameters:

  • simulation_parameters (SimulationParameters) –

    Simulation parameters of the system. Contains the information about the spatial grid, wavelength, etc.

  • distance (OptimizableFloat) –

    The propagation distance along the optical axis.

  • method (Literal['ASM', 'zpASM', 'RSC', 'zpRSC']) –

    The method used for propagation. 1. ASM - Angular Spectrum Method 2. zpASM - zero-padded Angular Spectrum Method 3. RSC - Rayleigh-Sommerfeld Convolution 4. zpRSC - zero-padded Rayleigh-Sommerfeld Convolution

  • total_paddings_x (int | None, default: None ) –

    The total padding in the x direction to avoid interference of solutions caused by the FFT algorithm, by default None

  • total_paddings_y (int | None, default: None ) –

    The total padding in the y direction to avoid interference of solutions caused by the FFT algorithm, by default None

forward

forward(incident_wavefront: Wavefront) -> Wavefront

Calculates the wavefront after propagating in the free space

Parameters:

  • incident_wavefront (Wavefront) –

    Wavefront before propagation in free space

Returns:

  • Wavefront

    Wavefront after propagation in free space

Raises:

  • ValueError

    Occurs when a non-existent direct distribution method is chosen

to_specs

to_specs() -> Iterable[ParameterSpecs]

Method which determining the specific parameters of the element for visualization in the widget

Returns:

  • Iterable[ParameterSpecs]

    Sequence of ParameterSpecs objects containing the parameters of the element