tidy3d.components.data.monitor_data.ElectromagneticFieldData#

class ElectromagneticFieldData[source]#

Bases: AbstractFieldData, ElectromagneticFieldDataset, ABC

Collection of electromagnetic fields.

Parameters:
  • Ex (Attribute: Ex) –

    Type

    Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray]

    Default

    = None

    Description

    Spatial distribution of the x-component of the electric field.

  • Ey (Attribute: Ey) –

    Type

    Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray]

    Default

    = None

    Description

    Spatial distribution of the y-component of the electric field.

  • Ez (Attribute: Ez) –

    Type

    Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray]

    Default

    = None

    Description

    Spatial distribution of the z-component of the electric field.

  • Hx (Attribute: Hx) –

    Type

    Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray]

    Default

    = None

    Description

    Spatial distribution of the x-component of the magnetic field.

  • Hy (Attribute: Hy) –

    Type

    Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray]

    Default

    = None

    Description

    Spatial distribution of the y-component of the magnetic field.

  • Hz (Attribute: Hz) –

    Type

    Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray]

    Default

    = None

    Description

    Spatial distribution of the z-component of the magnetic field.

  • monitor (Attribute: monitor) –

    Type

    Union[FieldMonitor, FieldTimeMonitor, PermittivityMonitor, ModeSolverMonitor]

    Default

  • symmetry (Attribute: symmetry) –

    Type

    Tuple[Literal[0, -1, 1], Literal[0, -1, 1], Literal[0, -1, 1]]

    Default

    = (0, 0, 0)

    Description

    Symmetry eigenvalues of the original simulation in x, y, and z.

  • symmetry_center (Attribute: symmetry_center) –

    Type

    Optional[Tuple[float, float, float]]

    Default

    = None

    Description

    Center of the symmetry planes of the original simulation in x, y, and z. Required only if any of the symmetry field are non-zero.

  • grid_expanded (Attribute: grid_expanded) –

    Type

    Optional[Grid]

    Default

    = None

    Description

    Grid discretization of the associated monitor in the simulation which created the data. Required if symmetries are present, as well as in order to use some functionalities like getting poynting and flux.

  • grid_primal_correction (Attribute: grid_primal_correction) –

    Type

    Union[float, FreqDataArray, TimeDataArray, FreqModeDataArray]

    Default

    = 1.0

    Description

    Correction factor that needs to be applied for data corresponding to a 2D monitor to take into account the finite grid in the normal direction in the simulation in which the data was computed. The factor is applied to fields defined on the primal grid locations along the normal direction.

  • grid_dual_correction (Attribute: grid_dual_correction) –

    Type

    Union[float, FreqDataArray, TimeDataArray, FreqModeDataArray]

    Default

    = 1.0

    Description

    Correction factor that needs to be applied for data corresponding to a 2D monitor to take into account the finite grid in the normal direction in the simulation in which the data was computed. The factor is applied to fields defined on the dual grid locations along the normal direction.

Attributes

colocation_boundaries

Coordinates to be used for colocation of the data to grid boundaries.

colocation_centers

Coordinates to be used for colocation of the data to grid centers.

flux

Flux for data corresponding to a 2D monitor.

grid_corrected_copy

Return a copy of self with grid correction factors applied (if necessary) and symmetry expanded.

intensity

Return the sum of the squared absolute electric field components.

mode_area

Effective mode area corresponding to a 2D monitor.

poynting

Time-averaged Poynting vector for frequency-domain data associated to a 2D monitor, projected to the direction normal to the monitor plane.

time_reversed_copy

Make a copy of the data with time-reversed fields.

Methods

dot(field_data[, conjugate])

Dot product (modal overlap) with another FieldData object.

outer_dot(field_data[, conjugate])

Dot product (modal overlap) with another FieldData object.

package_flux_results(flux_values)

How to package flux

grid_primal_correction#
grid_dual_correction#
property colocation_boundaries#

Coordinates to be used for colocation of the data to grid boundaries.

property colocation_centers#

Coordinates to be used for colocation of the data to grid centers.

property grid_corrected_copy#

Return a copy of self with grid correction factors applied (if necessary) and symmetry expanded.

property intensity#

Return the sum of the squared absolute electric field components.

property poynting#

Time-averaged Poynting vector for frequency-domain data associated to a 2D monitor, projected to the direction normal to the monitor plane.

package_flux_results(flux_values)[source]#

How to package flux

property flux#

Flux for data corresponding to a 2D monitor.

property mode_area#

Effective mode area corresponding to a 2D monitor.

Effective mode area is calculated as: (∫|E|²dA)² / (∫|E|⁴dA)

dot(field_data, conjugate=True)[source]#

Dot product (modal overlap) with another FieldData object. Both datasets have to be frequency-domain data associated with a 2D monitor. Along the tangential directions, the datasets have to have the same discretization. Along the normal direction, the monitor position may differ and is ignored. Other coordinates (frequency, mode_index) have to be either identical or broadcastable. Broadcasting is also supported in the case in which the other field_data has a dimension of size 1 whose coordinate is not in the list of coordinates in the self dataset along the corresponding dimension. In that case, the coordinates of the self dataset are used in the output.

Parameters:
  • field_data (ElectromagneticFieldData) – A data instance to compute the dot product with.

  • conjugate (bool, optional) – If True (default), the dot product is defined as 1 / 4 times the integral of E_self* x H_other - H_self* x E_other, where x is the cross product and * is complex conjugation. If False, the complex conjugation is skipped.

Note

The dot product with and without conjugation is equivalent (up to a phase) for modes in lossless waveguides but differs for modes in lossy materials. In that case, the conjugated dot product can be interpreted as the fraction of the power of the first mode carried by the second, but modes are not orthogonal with respect to that product and the sum of carried power fractions may be different from the total flux. In the non-conjugated definition, modes are orthogonal, but the interpretation of the dot product power carried by a given mode is no longer valid.

outer_dot(field_data, conjugate=True)[source]#

Dot product (modal overlap) with another FieldData object.

The tangential fields from field_data are interpolated to this object’s grid, so the data arrays don’t need to have the same discretization. The calculation is performed for all common frequencies between data arrays. In the output, mode_index_0 and mode_index_1 are the mode indices from this object and field_data, respectively, if they are instances of ModeSolverData.

Parameters:
  • field_data (ElectromagneticFieldData) – A data instance to compute the dot product with.

  • conjugate (bool = True) – If True (default), the dot product is defined as 1 / 4 times the integral of E_self* x H_other - H_self* x E_other, where x is the cross product and * is complex conjugation. If False, the complex conjugation is skipped.

Returns:

Data array with the complex-valued modal overlaps between the two mode data.

Return type:

xarray.DataArray

See also

:member:`dot`

property time_reversed_copy#

Make a copy of the data with time-reversed fields.

__hash__()#

Hash method.