tidy3d.components.data.dataset.AbstractFieldDataset#

class AbstractFieldDataset[source]#

Bases: Dataset, ABC

Collection of scalar fields with some symmetry properties.

Attributes

field_components

Maps the field components to their associated data.

grid_locations

Maps field components to the string key of their grid locations on the yee lattice.

symmetry_eigenvalues

Maps field components to their (positive) symmetry eigenvalues.

Methods

apply_phase(phase)

Create a copy where all elements are phase-shifted by a value (in radians).

colocate([x, y, z])

Colocate all of the data at a set of x, y, z coordinates.

package_colocate_results(centered_fields)

How to package the dictionary of fields computed via self.colocate().

abstract property field_components#

Maps the field components to their associated data.

apply_phase(phase)[source]#

Create a copy where all elements are phase-shifted by a value (in radians).

abstract property grid_locations#

Maps field components to the string key of their grid locations on the yee lattice.

abstract property symmetry_eigenvalues#

Maps field components to their (positive) symmetry eigenvalues.

package_colocate_results(centered_fields)[source]#

How to package the dictionary of fields computed via self.colocate().

colocate(x=None, y=None, z=None)[source]#

Colocate all of the data at a set of x, y, z coordinates.

Parameters:
  • x (Optional[array-like] = None) – x coordinates of locations. If not supplied, does not try to colocate on this dimension.

  • y (Optional[array-like] = None) – y coordinates of locations. If not supplied, does not try to colocate on this dimension.

  • z (Optional[array-like] = None) – z coordinates of locations. If not supplied, does not try to colocate on this dimension.

Returns:

Dataset containing all fields at the same spatial locations. For more details refer to xarray’s Documentation.

Return type:

xr.Dataset

Note

For many operations (such as flux calculations and plotting), it is important that the fields are colocated at the same spatial locations. Be sure to apply this method to your field data in those cases.

__hash__()#

Hash method.