tidy3d.components.data.monitor_data.ElectromagneticFieldData#

class ElectromagneticFieldData[source]#

Bases: AbstractFieldData, ElectromagneticFieldDataset, ABC

Collection of electromagnetic fields.

Parameters:
  • Ex (Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray] = None) – Spatial distribution of the x-component of the electric field.

  • Ey (Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray] = None) – Spatial distribution of the y-component of the electric field.

  • Ez (Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray] = None) – Spatial distribution of the z-component of the electric field.

  • Hx (Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray] = None) – Spatial distribution of the x-component of the magnetic field.

  • Hy (Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray] = None) – Spatial distribution of the y-component of the magnetic field.

  • Hz (Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray] = None) – Spatial distribution of the z-component of the magnetic field.

  • monitor (Union[FieldMonitor, FieldTimeMonitor, PermittivityMonitor, ModeMonitor]) – symmetry : Tuple[Literal[0, -1, 1], Literal[0, -1, 1], Literal[0, -1, 1]] = (0, 0, 0) Symmetry eigenvalues of the original simulation in x, y, and z.

  • symmetry_center (Optional[Tuple[float, float, float]] = None) – 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 (Optional[Grid] = None) – 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 vector and flux.

  • grid_primal_correction (Union[float, FreqDataArray, TimeDataArray, FreqModeDataArray] = 1.0) – 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 (Union[float, FreqDataArray, TimeDataArray, FreqModeDataArray] = 1.0) – 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.

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.

The dot product is defined as:

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 above. If False, the definition is similar, but without the complex conjugation of the $H$ fields.

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 ModeData.

The dot product is defined as:

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 above. If False, the definition is similar, but without the complex conjugation of the $H$ fields.

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.