tidy3d.EMEGrid#

class EMEGrid[source]#

Bases: Box

EME grid. An EME grid is a 1D grid aligned with the propagation axis, dividing the simulation into cells. Modes and mode coefficients are defined at the central plane of each cell. Typically, cell boundaries are aligned with interfaces between structures in the simulation.

Parameters:
  • attrs (dict = {}) – Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields, attrs are mutable. For example, the following is allowed for setting an attr obj.attrs['foo'] = bar. Also note that Tidy3D` will raise a TypeError if attrs contain objects that can not be serialized. One can check if attrs are serializable by calling obj.json().

  • center (Tuple[float, float, float] = (0.0, 0.0, 0.0)) – [units = um]. Center of object in x, y, and z.

  • size (Tuple[NonNegativeFloat, NonNegativeFloat, NonNegativeFloat]) – [units = um]. Size in x, y, and z directions.

  • axis (Literal[0, 1, 2]) – Propagation axis for the EME simulation.

  • mode_specs (List[EMEModeSpec]) – Mode specifications for the EME cells.

  • boundaries (ArrayLike[dtype=float, ndim=1]) – Boundary coordinates of the EME cells.

Attributes

boundary_planes

Planes aligned with cell boundaries.

cells

EME cells in the grid.

centers

Centers of the EME cells along the propagation axis.

lengths

Lengths of the EME cells along the propagation axis.

mode_planes

Planes for mode solving, aligned with cell centers.

num_cells

The number of cells in the EME grid.

attrs

Methods

cell_indices_in_box(box)

Indices of cells that overlap with 'box'.

Inherited Common Usage

axis#
mode_specs#
boundaries#
property centers#

Centers of the EME cells along the propagation axis.

property lengths#

Lengths of the EME cells along the propagation axis.

property num_cells#

The number of cells in the EME grid.

property mode_planes#

Planes for mode solving, aligned with cell centers.

property boundary_planes#

Planes aligned with cell boundaries.

property cells#

EME cells in the grid. Each cell is a Box.

cell_indices_in_box(box)[source]#

Indices of cells that overlap with β€˜box’. Used to determine which data is recorded by a monitor.

Parameters:

box (Box) – The box to check for intersecting cells.

Returns:

The indices of the cells that intersect the provided box.

Return type:

List[pd.NonNegativeInteger]

__hash__()#

Hash method.