tidy3d.components.data.monitor_data.ElectromagneticFieldData#
- class ElectromagneticFieldData[source]#
- Bases: - AbstractFieldData,- ElectromagneticFieldDataset,- ABC- Collection of electromagnetic fields. - Parameters:
- attrs (dict = {}) – Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields, - attrsare mutable. For example, the following is allowed for setting an- attr- obj.attrs['foo'] = bar. Also note that Tidy3D` will raise a- TypeErrorif- attrscontain objects that can not be serialized. One can check if- attrsare serializable by calling- obj.json().
- Ex (Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray, ScalarModeFieldCylindricalDataArray, EMEScalarModeFieldDataArray, EMEScalarFieldDataArray] = None) – Spatial distribution of the x-component of the electric field. 
- Ey (Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray, ScalarModeFieldCylindricalDataArray, EMEScalarModeFieldDataArray, EMEScalarFieldDataArray] = None) – Spatial distribution of the y-component of the electric field. 
- Ez (Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray, ScalarModeFieldCylindricalDataArray, EMEScalarModeFieldDataArray, EMEScalarFieldDataArray] = None) – Spatial distribution of the z-component of the electric field. 
- Hx (Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray, ScalarModeFieldCylindricalDataArray, EMEScalarModeFieldDataArray, EMEScalarFieldDataArray] = None) – Spatial distribution of the x-component of the magnetic field. 
- Hy (Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray, ScalarModeFieldCylindricalDataArray, EMEScalarModeFieldDataArray, EMEScalarFieldDataArray] = None) – Spatial distribution of the y-component of the magnetic field. 
- Hz (Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray, ScalarModeFieldCylindricalDataArray, EMEScalarModeFieldDataArray, EMEScalarFieldDataArray] = 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 - symmetryfield are non-zero.
- grid_expanded (Optional[Grid] = None) – - Griddiscretization 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, EMEFreqModeDataArray] = 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, EMEFreqModeDataArray] = 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 - Coordinates to be used for colocation of the data to grid boundaries. - Coordinates to be used for colocation of the data to grid centers. - Flux for data corresponding to a 2D monitor. - Return a copy of self with grid correction factors applied (if necessary) and symmetry expanded. - Return the sum of the squared absolute electric field components. - Effective mode area corresponding to a 2D monitor. - Time-averaged Poynting vector for frequency-domain data associated to a 2D monitor, projected to the direction normal to the monitor plane. - Make a copy of the data with time-reversed fields. - Methods - dot(field_data[, conjugate])- Dot product (modal overlap) with another - FieldDataobject.- outer_dot(field_data[, conjugate])- Dot product (modal overlap) with another - FieldDataobject.- package_flux_results(flux_values)- How to package flux - translated_copy(vector)- Create a copy of the - ElectromagneticFieldDatawith fields translated by the provided vector.- Inherited Common Usage - 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. 
 - 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 - FieldDataobject. 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_datahas a dimension of size 1 whose coordinate is not in the list of coordinates in the- selfdataset along the corresponding dimension. In that case, the coordinates of the- selfdataset 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 - FieldDataobject.- The tangential fields from - field_dataare 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_0and- mode_index_1are 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 
 - property time_reversed_copy#
- Make a copy of the data with time-reversed fields. 
 - translated_copy(vector)[source]#
- Create a copy of the - ElectromagneticFieldDatawith fields translated by the provided vector. Can be used together with- dotor- outer_dotto compute overlaps between field data at different locations.- Parameters:
- vector ( - Coordinate) – Translation vector to apply to the field data.
- Returns:
- A data object with the translated fields. 
- Return type:
 
 - __hash__()#
- Hash method.