Skip to content

flex_rf.tidy3d.DiffractionMonitor

Type: class Base(s): PlanarMonitor, FreqMonitor

Monitor that uses a 2D Fourier transform to compute the diffraction amplitudes and efficiency for allowed diffraction orders.

The diffraction data are separated into S and P polarizations. At normal incidence when S and P are undefined, P(S) corresponds to Ey(Ez) polarization for monitor normal to x, P(S) corresponds to Ex(Ez) polarization for monitor normal to y, and P(S) corresponds to Ex(Ey) polarization for monitor normal to z.

The power amplitudes per polarization and diffraction order, and correspondingly the power per diffraction order, correspond to the power carried by each diffraction order in the monitor normal direction. They are not to be confused with power carried by plane waves in the propagation direction of each diffraction order, which can be obtained from the spherical-coordinate fields which are also stored. The power definition is such that the grating efficiency is the recorded power over the input source power, and the direct sum over the power in all orders should equal the total power flowing through the monitor.

monitor = DiffractionMonitor(
center=(1,2,3),
size=(inf,inf,0),
freqs=[250e12, 300e12],
name='diffraction_monitor',
normal_dir='+',
)
size [TracedSize]

Size in x, y, and z directions.

name [str]

Unique name for monitor.

freqs [FreqArray]

Array or list of frequencies stored by the field monitor.

center [TracedCoordinate] = (0.0, 0.0, 0.0)

Center of object in x, y, and z.

interval_space [tuple[Literal[1], Literal[1], Literal[1]]] = (1, 1, 1)

Number of grid step intervals between monitor recordings. If equal to 1, there will be no downsampling. If greater than 1, the step will be applied, but the first and last point of the monitor grid are always included. Not all monitors support values different from 1.

use_colocated_integration [Literal[True]] = True

Whether to use colocated fields for flux, dot products, and overlap integrals. Hard-coded to True for most monitor types. Can be toggled on field and overlap monitors.

apodization [ApodizationSpec] = factory: ApodizationSpec

Sets parameters of (optional) apodization. Apodization applies a windowing function to the Fourier transform of the time-domain fields into frequency-domain ones, and can be used to truncate the beginning and/or end of the time signal, for example to eliminate the source pulse when studying the eigenmodes of a system. Note: apodization affects the normalization of the frequency-domain fields.

normal_dir [Direction] = '+'

Direction of the surface monitor’s normal vector w.r.t. the positive x, y or z unit vectors. Must be one of '+' or '-'. Defaults to '+' if not provided.

colocate [Literal[False]] = False

Defines whether fields are colocated to grid cell boundaries (i.e. to the primal grid). Can be toggled for field recording monitors and is hard-coded for other monitors depending on their specific function.

diffraction_monitor_size(val: Size)

Ensure that the monitor is infinite in the transverse direction.

parallel_adjoint_bases(simulation: Simulation, monitor_index: int)

Return parallel adjoint bases for diffraction monitor amplitudes.

storage_size(num_cells: int, tmesh: ArrayFloat1D)

Size of monitor storage given the number of points after discretization.

supports_parallel_adjoint()

Return True for diffraction monitor adjoints based on amplitude data.