tidy3d.components.data.monitor_data.AbstractFieldData#

class AbstractFieldData[source]#

Bases: MonitorData, AbstractFieldDataset, ABC

Collection of scalar fields with some symmetry properties.

Parameters:
  • monitor (Union[FieldMonitor, FieldTimeMonitor, AuxFieldTimeMonitor, PermittivityMonitor, ModeMonitor, MediumMonitor])

  • symmetry (tuple[Literal[0, -1, 1], Literal[0, -1, 1], Literal[0, -1, 1]] = (0, 0, 0)) – Symmetry eigenvalues of the original simulation in x, y, and z.

  • symmetry_center (Optional[tuple[float, float, float]] = None) – Center of the symmetry planes of the original simulation in x, y, and z. Required only if any of the symmetry field are non-zero.

  • grid_expanded (Optional[Grid] = None) – Grid discretization of the associated monitor in the simulation which created the data. Required if symmetries are present, as well as in order to use some functionalities like getting Poynting vector and flux.

Attributes

symmetry_expanded

Return the AbstractFieldData with fields expanded based on symmetry.

symmetry_expanded_copy

Create a copy of the AbstractFieldData with fields expanded based on symmetry.

monitor

symmetry

symmetry_center

grid_expanded

Methods

at_coords(coords)

Colocate data to some supplied coordinates.

warn_missing_grid_expanded()

If grid_expanded not provided and fields data is present, warn that some methods will break.

monitor#
symmetry#
symmetry_center#
grid_expanded#
warn_missing_grid_expanded()[source]#

If grid_expanded not provided and fields data is present, warn that some methods will break.

property symmetry_expanded#

Return the AbstractFieldData with fields expanded based on symmetry. If any symmetry is nonzero (i.e. expanded), the interpolation implicitly creates a copy of the data array. However, if symmetry is not expanded, the returned array contains a view of the data, not a copy.

Returns:

A data object with the symmetry expanded fields.

Return type:

AbstractFieldData

property symmetry_expanded_copy#

Create a copy of the AbstractFieldData with fields expanded based on symmetry.

Returns:

A data object with the symmetry expanded fields.

Return type:

AbstractFieldData

at_coords(coords)[source]#

Colocate data to some supplied coordinates. This is a convenience method that wraps colocate, and skips dimensions for which the data has a single data point only (colocate will error in that case.) If the coords are out of bounds for the data otherwise, an error will still be produced.

Parameters:

coords (Coords) – Coordinates in x, y and z to colocate to.

Returns:

Dataset containing all of the fields in the data interpolated to boundary locations on the Yee grid.

Return type:

xarray.Dataset