Radiation propagation

Radiation propagation#

SRW allows the propagation (POP) through an arbitrary sequence of optical elements. Any wavefront can be propagated, irrespectively of the way it was emitted. This module provides an intuitive approach to propagation. Each optical element is defined as a dictionary and the complete optical system is a sequence of optical elements. The dictionary must include a type key which defines the type of element.

The optical elements currently implemented in the module are

  • drift: free-space propagation between two consecutive elements. Defined by element type drift.

    Keys:

    • length: propagation distance in meters.

  • aperture: rectangular or circular binary aperture. Radiation is fully transmitted inside and fully blocked outside the aperture region. Defined by element type rectAp or circAp.

    Keys:

    • extension: list with horizontal and vertical aperture widths (or diameters).

    • centre: list with horizontal and vertical aperture centres.

  • obstacle: rectangular or circular binary obstacle. Radiation is fully blocked inside and fully transmitted outside the obstacle region. Defined by element type rectOb or circOb.

    Keys:

    • extension: list with horizontal and vertical obstacle widths (or diameters).

    • centre: list with horizontal and vertical obstacle centres.

  • lens: ideal lens. Defined by element type lens.

    Keys:

    • centre: list with horizontal and vertical lens centres.

    • f: focal length in meters. Scalar for axial lens or list width [fx, fx] for a cylidrical lens.

  • transmission: the base (and most versatile) optical element. Allows the definition of an arbitrary transmission element from an attenuation and phase delay matrices. Defined by element type transmission.

    Keys:

    • extension: list with the horizontal and vertical dimension of the element.

    • centre: list with horizontal and vertical centres.

    • opd: matrix representing the phase delay induced by the element, defined as optical path delay in nanometers.

    • amp: matrix representing the attenuation of the radiation intensity through the element.

    Note that, irrespective of initial size of the amp and opd matrices, the effective attenuation and phase delay are rescaled to match the extension of the optical element and are resampled on the mesh of the wavefront arriving at the optical element. Check the dedicated example Transmission element for a practical case.

In addition to element-specific keys, all optical elements support an optional resParam key, which resizes the wavefront after it passes through the corresponding element. This feature is particularly useful for propagation involving focusing stages, where the mesh can adapt to the light’s evolution (wide and coarse on pupil planes, small and fine on focal planes), optimizing memory usage. Refer to resizeWfr() for details on wavefront resizing. If this key is omitted, the mesh is preserved and the propagation continues with no rescaling.

Here is the example of a simple optical system to simulate a basic imaging system, taken from the Simple propagation, which also serves as base example to familiarize with the propagation feature.

optSystem = {
    "aperture": {
        "type": "rectAp",
        "extension": [10e-3, 10e.3],
        "centre": [0,0]
    },
    "lens": {
        "type": "lens",
        "f": 0.5,
        "centre": [0,0]
    },
    "image": {
        "type": "drift",
        "length": 0.5
    }
}

Once you created the optical system, the propagation is performed calling the function propagateWfr() or its multiprocess version propagateWfrMultiProcess(). Check the respective documentation for the required arguments and the structure of the output data.

Warning

Propagation can be tricky!

It’s not uncommon for propagation to encounter difficulties. The resulting field might appear as matrices of zeros or NaN or yield meaningless intensity distributions, all without causing a crash. It may take several attempts to obtain a satisfactory output, and even minor adjustments to parameters (like mesh resolution and extension) can have a significant impact on the simulation. Below, we provide some tips to address the most common issues and potential solutions.