tidy3d.FieldTimeData#

class FieldTimeData[source]#

Bases: FieldTimeDataset, ElectromagneticFieldData

Data associated with a FieldTimeMonitor: scalar components of E and H fields.

Parameters:
  • Ex (Attribute: Ex) –

    Type

    Optional[ScalarFieldTimeDataArray]

    Default

    = None

    Description

    Spatial distribution of the x-component of the electric field.

  • Ey (Attribute: Ey) –

    Type

    Optional[ScalarFieldTimeDataArray]

    Default

    = None

    Description

    Spatial distribution of the y-component of the electric field.

  • Ez (Attribute: Ez) –

    Type

    Optional[ScalarFieldTimeDataArray]

    Default

    = None

    Description

    Spatial distribution of the z-component of the electric field.

  • Hx (Attribute: Hx) –

    Type

    Optional[ScalarFieldTimeDataArray]

    Default

    = None

    Description

    Spatial distribution of the x-component of the magnetic field.

  • Hy (Attribute: Hy) –

    Type

    Optional[ScalarFieldTimeDataArray]

    Default

    = None

    Description

    Spatial distribution of the y-component of the magnetic field.

  • Hz (Attribute: Hz) –

    Type

    Optional[ScalarFieldTimeDataArray]

    Default

    = None

    Description

    Spatial distribution of the z-component of the magnetic field.

  • monitor (Attribute: monitor) –

    Type

    FieldTimeMonitor

    Default

    Description

    Time-domain field monitor associated with the data.

  • symmetry (Attribute: symmetry) –

    Type

    Tuple[Literal[0, -1, 1], Literal[0, -1, 1], Literal[0, -1, 1]]

    Default

    = (0, 0, 0)

    Description

    Symmetry eigenvalues of the original simulation in x, y, and z.

  • symmetry_center (Attribute: symmetry_center) –

    Type

    Optional[Tuple[float, float, float]]

    Default

    = None

    Description

    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 (Attribute: grid_expanded) –

    Type

    Optional[Grid]

    Default

    = None

    Description

    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 and flux.

  • grid_primal_correction (Attribute: grid_primal_correction) –

    Type

    Union[float, FreqDataArray, TimeDataArray, FreqModeDataArray]

    Default

    = 1.0

    Description

    Correction factor that needs to be applied for data corresponding to a 2D monitor to take into account the finite grid in the normal direction in the simulation in which the data was computed. The factor is applied to fields defined on the primal grid locations along the normal direction.

  • grid_dual_correction (Attribute: grid_dual_correction) –

    Type

    Union[float, FreqDataArray, TimeDataArray, FreqModeDataArray]

    Default

    = 1.0

    Description

    Correction factor that needs to be applied for data corresponding to a 2D monitor to take into account the finite grid in the normal direction in the simulation in which the data was computed. The factor is applied to fields defined on the dual grid locations along the normal direction.

Notes

The data is stored as a DataArray object using the xarray package.

Example

>>> from tidy3d import ScalarFieldTimeDataArray
>>> x = [-1,1,3]
>>> y = [-2,0,2,4]
>>> z = [-3,-1,1,3,5]
>>> t = [0, 1e-12, 2e-12]
>>> coords = dict(x=x[:-1], y=y[:-1], z=z[:-1], t=t)
>>> grid = Grid(boundaries=Coords(x=x, y=y, z=z))
>>> scalar_field = ScalarFieldTimeDataArray(np.random.random((2,3,4,3)), coords=coords)
>>> monitor = FieldTimeMonitor(
...     size=(2,4,6), interval=100, name='field', fields=['Ex', 'Hz'], colocate=True
... )
>>> data = FieldTimeData(monitor=monitor, Ex=scalar_field, Hz=scalar_field, grid_expanded=grid)

Attributes

flux

Flux for data corresponding to a 2D monitor.

poynting

Instantaneous Poynting vector for time-domain data associated to a 2D monitor, projected to the direction normal to the monitor plane.

time_reversed_copy

Make a copy of the data with time-reversed fields.

Methods

dot(field_data[,Β conjugate])

Inner product is not defined for time-domain data.

monitor#
property poynting#

Instantaneous Poynting vector for time-domain data associated to a 2D monitor, projected to the direction normal to the monitor plane.

property flux#

Flux for data corresponding to a 2D monitor.

dot(field_data, conjugate=True)[source]#

Inner product is not defined for time-domain data.

property time_reversed_copy#

Make a copy of the data with time-reversed fields. The sign of the magnetic fields is flipped, and the data is reversed along the t dimension, such that for a given field, field[t_beg + t] -> field[t_end - t], where t_beg and t_end are the first and last coordinates along the t dimension.

__hash__()#

Hash method.