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 anattr
obj.attrs['foo'] = bar
. Also note that Tidy3D` will raise aTypeError
ifattrs
contain objects that can not be serialized. One can check ifattrs
are serializable by callingobj.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
Planes aligned with cell boundaries.
EME cells in the grid.
Centers of the EME cells along the propagation axis.
Lengths of the EME cells along the propagation axis.
Planes for mode solving, aligned with cell centers.
The number of cells in the EME grid.
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.
- 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.