tidy3d.components.data.dataset.AbstractFieldDataset#
- class AbstractFieldDataset[source]#
Bases:
Dataset
,ABC
Collection of scalar fields with some symmetry properties.
Attributes
Maps the field components to their associated data.
Maps field components to the string key of their grid locations on the yee lattice.
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.