tidy3d.FieldProjector#

class FieldProjector[source]#

Bases: Tidy3dBaseModel

Projection of near fields to points on a given observation grid.

Parameters:
  • sim_data (Attribute: sim_data) –

    Type

    SimulationData

    Default

    Description

    Container for simulation data containing the near field monitors.

  • surfaces (Attribute: surfaces) –

    Type

    Tuple[FieldProjectionSurface, …]

    Default

    Description

    Tuple of each FieldProjectionSurface to use as source of near field.

  • pts_per_wavelength (Attribute: pts_per_wavelength) –

    Type

    Optional[int]

    Default

    = 10

    Description

    Number of points per wavelength in the background medium with which to discretize the surface monitors for the projection. If None, fields will will not resampled, but will still be colocated.

  • origin (Attribute: origin) –

    Type

    Optional[Tuple[float, float, float]]

    Default

    = None

    Units

    um

    Description

    Local origin used for defining observation points. If None, uses the average of the centers of all surface monitors.

See also

:class:`FieldProjectionAngleMonitor

Monitor that samples electromagnetic near fields in the frequency domain and projects them at given observation angles.`

Notebooks:

Attributes

currents

Sets the surface currents.

frequencies

Return the list of frequencies associated with the field monitors.

medium

Medium into which fields are to be projected.

Methods

apply_window_to_currents(proj_monitor, currents)

Apply windowing function to the surface currents.

compute_surface_currents(sim_data, surface, ...)

Returns resampled surface current densities associated with the surface monitor.

from_near_field_monitors(sim_data, ...[, ...])

Constructs FieldProjection from a list of surface monitors and their directions.

integrate_2d(function, phase, pts_u, pts_v)

Trapezoidal integration in two dimensions.

project_fields(proj_monitor)

Compute projected fields.

set_origin(val, values)

Sets .origin as the average of centers of all surface monitors if not provided.

sim_data#
surfaces#
pts_per_wavelength#
origin#
classmethod set_origin(val, values)[source]#

Sets .origin as the average of centers of all surface monitors if not provided.

property medium#

Medium into which fields are to be projected.

property frequencies#

Return the list of frequencies associated with the field monitors.

classmethod from_near_field_monitors(sim_data, near_monitors, normal_dirs, pts_per_wavelength=10, origin=None)[source]#

Constructs FieldProjection from a list of surface monitors and their directions.

Parameters:
  • sim_data (SimulationData) – Container for simulation data containing the near field monitors.

  • near_monitors (List[FieldMonitor]) – Tuple of FieldMonitor objects on which near fields will be sampled.

  • normal_dirs (List[Direction]) – Tuple containing the Direction of the normal to each surface monitor w.r.t. to the positive x, y or z unit vectors. Must have the same length as monitors.

  • pts_per_wavelength (int = 10) – Number of points per wavelength with which to discretize the surface monitors for the projection. If None, fields will not be resampled.

  • origin (Coordinate) – Local origin used for defining observation points. If None, uses the average of the centers of all surface monitors.

property currents#

Sets the surface currents.

static compute_surface_currents(sim_data, surface, medium, pts_per_wavelength=10)[source]#

Returns resampled surface current densities associated with the surface monitor.

Parameters:
  • sim_data (SimulationData) – Container for simulation data containing the near field monitors.

  • surface (FieldProjectionSurface) – FieldProjectionSurface to use as source of near field.

  • medium (MediumType) – Background medium through which to project fields.

  • pts_per_wavelength (int = 10) – Number of points per wavelength with which to discretize the surface monitors for the projection. If None, fields will not be resampled, but will still be colocated.

Returns:

Colocated surface current densities for the given surface.

Return type:

xarray.Dataset

integrate_2d(function, phase, pts_u, pts_v)[source]#

Trapezoidal integration in two dimensions.

static apply_window_to_currents(proj_monitor, currents)[source]#

Apply windowing function to the surface currents.

project_fields(proj_monitor)[source]#

Compute projected fields.

Parameters:

proj_monitor (AbstractFieldProjectionMonitor) – Instance of AbstractFieldProjectionMonitor defining the projection observation grid.

Returns:

Data structure with Er, Etheta, Ephi, Hr, Htheta, Hphi.

Return type:

AbstractFieldProjectionData

__hash__()#

Hash method.