tidy3d.EMECoefficientDataset#

class EMECoefficientDataset[source]#

Bases: Dataset

Dataset storing various coefficients related to the EME simulation.

Parameters:
  • A (Optional[EMECoefficientDataArray] = None) – Coefficient for forward mode in this cell.

  • B (Optional[EMECoefficientDataArray] = None) – Coefficient for backward mode in this cell.

  • n_complex (Optional[EMEModeIndexDataArray] = None) – Complex-valued effective propagation indices associated with the EME modes.

  • flux (Optional[EMEFluxDataArray] = None) – Power flux of the EME modes.

  • interface_smatrices (Optional[EMEInterfaceSMatrixDataset] = None) – S matrices associated with the interfaces between EME cells.

  • overlaps (Optional[EMEOverlapDataset] = None) – Overlaps between EME modes.

Notes

These coefficients can be used for debugging or optimization.

The A and B fields store the expansion coefficients for the modes in a cell. These are defined at the cell centers.

The n_complex and flux fields respectively store the complex-valued effective propagation index and the power flux associated with the modes used in the EME calculation.

The interface_Sij fields store the S matrices associated with the interfaces between EME cells.

Example

>>> from tidy3d import EMECoefficientDataArray
>>> f = [2e14]
>>> sweep_index = [0]
>>> eme_port_index = [0, 1]
>>> eme_cell_index = [0, 1, 2]
>>> mode_index_out = [0, 1]
>>> mode_index_in = [0, 1]
>>> coords = dict(
...     f=f, sweep_index=sweep_index, eme_port_index=eme_port_index,
...     eme_cell_index=eme_cell_index,
...     mode_index_out=mode_index_out, mode_index_in=mode_index_in,
... )
>>> A = EMECoefficientDataArray((1+1j) * np.random.random((1, 1, 2, 3, 2, 2)), coords=coords)
>>> data = EMECoefficientDataset(A=A, B=A)

Attributes

normalized_copy

Return a flux-normalized copy of this dataset.

A

B

n_complex

flux

interface_smatrices

overlaps

A#
B#
n_complex#
flux#
interface_smatrices#
overlaps#
property normalized_copy#

Return a flux-normalized copy of this dataset.

The A and B coefficients as well as the interface_smatrices are multiplied by the square root of the mode flux, so that the forward and backward power of each mode are given directly by |A|^2 and |B|^2, respectively, without additional normalization by flux.

Returns:

A new dataset with flux-normalized coefficients. The flux field is set to None to prevent double normalization.

Return type:

EMECoefficientDataset