tidy3d.rf.MicrowaveModeData#
- class MicrowaveModeData[source]#
Bases:
MicrowaveModeDataBase,ModeDataData associated with a
ModeMonitorfor microwave and RF applications: modal amplitudes, propagation indices, mode profiles, and transmission line data.- Parameters:
Ex (Optional[ScalarModeFieldDataArray] = None) – Spatial distribution of the x-component of the electric field of the mode.
Ey (Optional[ScalarModeFieldDataArray] = None) – Spatial distribution of the y-component of the electric field of the mode.
Ez (Optional[ScalarModeFieldDataArray] = None) – Spatial distribution of the z-component of the electric field of the mode.
Hx (Optional[ScalarModeFieldDataArray] = None) – Spatial distribution of the x-component of the magnetic field of the mode.
Hy (Optional[ScalarModeFieldDataArray] = None) – Spatial distribution of the y-component of the magnetic field of the mode.
Hz (Optional[ScalarModeFieldDataArray] = None) – Spatial distribution of the z-component of the magnetic field of the mode.
monitor (
MicrowaveModeMonitor) – Mode monitor associated with the 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.
amps (ModeAmpsDataArray) – Complex-valued amplitudes of the overlap decomposition.
n_complex (ModeIndexDataArray) – Complex-valued effective propagation constants associated with the mode.
n_group_raw (Optional[GroupIndexDataArray] = None) – Index associated with group velocity of the mode.
dispersion_raw (Optional[ModeDispersionDataArray] = None) – [units = ps/(nm km)]. Dispersion parameter for the mode.
eps_spec (Optional[list[Literal['diagonal', 'tensorial_real', 'tensorial_complex']]] = None) – Characterization of the permittivity profile on the plane where modes are computed. Possible values are ‘diagonal’, ‘tensorial_real’, ‘tensorial_complex’.
transmission_line_data (Optional[
TransmissionLineDataset] = None) – Additional data relevant to transmission lines in RF and microwave applications, like characteristic impedance. This field is populated when aMicrowaveModeSpechas been used to set up the monitor or mode solver.
Notes
This class extends
ModeDatawith additional microwave-specific data including characteristic impedance, voltage coefficients, and current coefficients. The data is stored as DataArray objects using the xarray package.The microwave mode data contains all the information from
ModeDataplus additional microwave dataset with impedance calculations performed using voltage and current line integrals as specified in theMicrowaveModeSpec.Example
>>> import tidy3d as td >>> import numpy as np >>> from tidy3d.components.data.data_array import ( ... CurrentFreqModeDataArray, ... ImpedanceFreqModeDataArray, ... ModeAmpsDataArray, ... ModeIndexDataArray, ... VoltageFreqModeDataArray, ... ) >>> from tidy3d.components.microwave.data.dataset import TransmissionLineDataset >>> direction = ["+", "-"] >>> f = [1e14, 2e14, 3e14] >>> mode_index = np.arange(3) >>> index_coords = dict(f=f, mode_index=mode_index) >>> index_data = ModeIndexDataArray((1+1j) * np.random.random((3, 3)), coords=index_coords) >>> amp_coords = dict(direction=direction, f=f, mode_index=mode_index) >>> amp_data = ModeAmpsDataArray((1+1j) * np.random.random((2, 3, 3)), coords=amp_coords) >>> impedance_data = ImpedanceFreqModeDataArray(50 * np.ones((3, 3)), coords=index_coords) >>> voltage_data = VoltageFreqModeDataArray((1+1j) * np.random.random((3, 3)), coords=index_coords) >>> current_data = CurrentFreqModeDataArray((0.02+0.01j) * np.random.random((3, 3)), coords=index_coords) >>> tl_data = TransmissionLineDataset( ... Z0=impedance_data, ... voltage_coeffs=voltage_data, ... current_coeffs=current_data ... ) >>> monitor = td.MicrowaveModeMonitor( ... center=(0, 0, 0), ... size=(2, 0, 6), ... freqs=[2e14, 3e14], ... mode_spec=td.MicrowaveModeSpec(num_modes=3, impedance_specs=td.AutoImpedanceSpec()), ... name='microwave_mode', ... ) >>> data = MicrowaveModeData( ... monitor=monitor, ... amps=amp_data, ... n_complex=index_data, ... transmission_line_data=tl_data ... )
Attributes
transmission_line_dataeps_specExEyEzHxHyHzn_complexn_group_rawdispersion_rawampsgrid_primal_correctiongrid_dual_correctionsymmetrysymmetry_centergrid_expandedInherited Common Usage
- monitor#