tidy3d.EMEFieldData#
- class EMEFieldData[source]#
Bases:
ElectromagneticFieldData,EMEFieldDatasetData associated with an
EMEFieldMonitor.- Parameters:
Ex (Optional[Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray, ScalarModeFieldCylindricalDataArray, EMEScalarModeFieldDataArray, EMEScalarFieldDataArray]] = None) – Spatial distribution of the x-component of the electric field.
Ey (Optional[Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray, ScalarModeFieldCylindricalDataArray, EMEScalarModeFieldDataArray, EMEScalarFieldDataArray]] = None) – Spatial distribution of the y-component of the electric field.
Ez (Optional[Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray, ScalarModeFieldCylindricalDataArray, EMEScalarModeFieldDataArray, EMEScalarFieldDataArray]] = None) – Spatial distribution of the z-component of the electric field.
Hx (Optional[Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray, ScalarModeFieldCylindricalDataArray, EMEScalarModeFieldDataArray, EMEScalarFieldDataArray]] = None) – Spatial distribution of the x-component of the magnetic field.
Hy (Optional[Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray, ScalarModeFieldCylindricalDataArray, EMEScalarModeFieldDataArray, EMEScalarFieldDataArray]] = None) – Spatial distribution of the y-component of the magnetic field.
Hz (Optional[Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray, ScalarModeFieldCylindricalDataArray, EMEScalarModeFieldDataArray, EMEScalarFieldDataArray]] = None) – Spatial distribution of the z-component of the magnetic field.
monitor (
EMEFieldMonitor) – EME field monitor associated with this data.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.
Notes
Contains the propagated electromagnetic field assembled from EME modes and their expansion coefficients. The field is stored per excitation port and per excited mode.
Example
>>> from tidy3d import EMEFieldMonitor, EMEScalarFieldDataArray >>> from tidy3d import Grid, Coords >>> import numpy as np >>> monitor = EMEFieldMonitor( ... center=(0,0,0), size=(1,1,0), freqs=[2e14], num_modes=2, name="field" ... ) >>> x = [0, 1] >>> y = [0, 1] >>> z = [0] >>> f = [2e14] >>> sweep_index = [0] >>> eme_port_index = [0, 1] >>> mode_index = [0, 1] >>> coords = dict( ... x=x, y=y, z=z, f=f, sweep_index=sweep_index, ... eme_port_index=eme_port_index, mode_index=mode_index, ... ) >>> field = EMEScalarFieldDataArray((1+1j) * np.random.random((2,2,1,1,1,2,2)), coords=coords) >>> grid = Grid(boundaries=Coords(x=[-0.5, 0.5, 1.5], y=[-0.5, 0.5, 1.5], z=[-0.5, 0.5])) >>> data = EMEFieldData( ... monitor=monitor, ... Ex=field, Ey=field, Ez=field, Hx=field, Hy=field, Hz=field, ... grid_expanded=grid, ... )
Attributes
grid_primal_correctiongrid_dual_correctionsymmetrysymmetry_centergrid_expandedExEyEzHxHyHz- monitor#