tidy3d.TemperatureData#
- class TemperatureData[source]#
Bases:
HeatChargeMonitorData
Data associated with a
TemperatureMonitor
: spatial temperature field.- 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()
.monitor (TemperatureMonitor) – Temperature monitor associated with the data.
symmetry (Tuple[Literal[0, 1], Literal[0, 1], Literal[0, 1]] = (0, 0, 0)) – Symmetry of the original simulation in x, y, and z.
symmetry_center (Tuple[float, float, float] = (0, 0, 0)) – Symmetry center of the original simulation in x, y, and z.
temperature (Union[SpatialDataArray, Annotated[Union[tidy3d.components.data.unstructured.triangular.TriangularGridDataset, tidy3d.components.data.unstructured.tetrahedral.TetrahedralGridDataset], FieldInfo(default=PydanticUndefined, discriminator='type', extra={})], NoneType]) – [units = K]. Spatial temperature field.
Example
>>> from tidy3d import TemperatureMonitor, SpatialDataArray >>> import numpy as np >>> temp_data = SpatialDataArray( ... np.ones((2, 3, 4)), coords={"x": [0, 1], "y": [0, 1, 2], "z": [0, 1, 2, 3]} ... ) >>> temp_mnt = TemperatureMonitor(size=(1, 2, 3), name="temperature") >>> temp_mnt_data = TemperatureData( ... monitor=temp_mnt, temperature=temp_data, symmetry=(0, 1, 0), symmetry_center=(0, 0, 0) ... ) >>> temp_mnt_data_expanded = temp_mnt_data.symmetry_expanded_copy
Attributes
Maps the field components to their associated data.
Return copy of self with symmetry applied.
Methods
check_correct_data_type
(val, values)Issue error if incorrect data type is used
field_name
([val])Gets the name of the fields to be plot.
warn_no_data
(val, values)Warn if no data provided.
Inherited Common Usage
- monitor#
- temperature#
- property field_components#
Maps the field components to their associated data.
- classmethod check_correct_data_type(val, values)[source]#
Issue error if incorrect data type is used
- property symmetry_expanded_copy#
Return copy of self with symmetry applied.
- __hash__()#
Hash method.