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 (Attribute: Ex) –

    Type

    ScalarModeFieldDataArray

    Default

    Description

    Spatial distribution of the x-component of the electric field of the mode.

  • Ey (Attribute: Ey) –

    Type

    ScalarModeFieldDataArray

    Default

    Description

    Spatial distribution of the y-component of the electric field of the mode.

  • Ez (Attribute: Ez) –

    Type

    ScalarModeFieldDataArray

    Default

    Description

    Spatial distribution of the z-component of the electric field of the mode.

  • Hx (Attribute: Hx) –

    Type

    ScalarModeFieldDataArray

    Default

    Description

    Spatial distribution of the x-component of the magnetic field of the mode.

  • Hy (Attribute: Hy) –

    Type

    ScalarModeFieldDataArray

    Default

    Description

    Spatial distribution of the y-component of the magnetic field of the mode.

  • Hz (Attribute: Hz) –

    Type

    ScalarModeFieldDataArray

    Default

    Description

    Spatial distribution of the z-component of the magnetic field of the mode.

  • n_complex (Attribute: n_complex) –

    Type

    ModeIndexDataArray

    Default

    Description

    Complex-valued effective propagation constants associated with the mode.

  • n_group_raw (Attribute: n_group_raw) –

    Type

    Optional[GroupIndexDataArray]

    Default

    = None

    Description

    Index associated with group velocity of the mode.

  • dispersion_raw (Attribute: dispersion_raw) –

    Type

    Optional[ModeDispersionDataArray]

    Default

    = None

    Units

    ps/(nm km)

    Description

    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.

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.