tidy3d.components.data.dataset.ModeSolverDataset#

class ModeSolverDataset[source]#

Bases: ElectromagneticFieldDataset

Dataset storing scalar components of E and H fields as a function of freq. and mode_index.

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.

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

Example

>>> from tidy3d import ModeSpec
>>> x = [-1,1]
>>> y = [0]
>>> z = [-3,-1,1,3]
>>> f = [2e14, 3e14]
>>> mode_index = np.arange(5)
>>> field_coords = dict(x=x, y=y, z=z, f=f, mode_index=mode_index)
>>> field = ScalarModeFieldDataArray((1+1j)*np.random.random((2,1,4,2,5)), coords=field_coords)
>>> index_coords = dict(f=f, mode_index=mode_index)
>>> index_data = ModeIndexDataArray((1+1j) * np.random.random((2,5)), coords=index_coords)
>>> data = ModeSolverDataset(
...     Ex=field,
...     Ey=field,
...     Ez=field,
...     Hx=field,
...     Hy=field,
...     Hz=field,
...     n_complex=index_data
... )

Attributes

dispersion

Dispersion parameter.

field_components

Maps the field components to their associated data.

k_eff

Imaginary part of the propagation index.

n_eff

Real part of the propagation index.

n_group

Group index.

Methods

plot_field(*args, **kwargs)

Warn user to use the ModeSolver plot_field function now.

Inherited Common Usage

Ex#
Ey#
Ez#
Hx#
Hy#
Hz#
n_complex#
n_group_raw#
dispersion_raw#
property field_components#

Maps the field components to their associated data.

property n_eff#

Real part of the propagation index.

property k_eff#

Imaginary part of the propagation index.

property n_group#

Group index.

property dispersion#

Dispersion parameter.

\[D = -\frac{\lambda}{c_0} \frac{{\rm d}^2 n_{\text{eff}}}{{\rm d}\lambda^2}\]
plot_field(*args, **kwargs)[source]#

Warn user to use the ModeSolver plot_field function now.

__hash__()#

Hash method.