tidy3d.FieldProjectionAngleData#
- class FieldProjectionAngleData[source]#
Bases:
AbstractFieldProjectionDataData associated with a
FieldProjectionAngleMonitor: components of projected fields.- Parameters:
monitor (
FieldProjectionAngleMonitor) – Field projection monitor with an angle-based projection grid.Er (FieldProjectionAngleDataArray) – Spatial distribution of r-component of the electric field.
Etheta (FieldProjectionAngleDataArray) – Spatial distribution of the theta-component of the electric field.
Ephi (FieldProjectionAngleDataArray) – Spatial distribution of phi-component of the electric field.
Hr (FieldProjectionAngleDataArray) – Spatial distribution of r-component of the magnetic field.
Htheta (FieldProjectionAngleDataArray) – Spatial distribution of theta-component of the magnetic field.
Hphi (FieldProjectionAngleDataArray) – Spatial distribution of phi-component of the magnetic field.
medium (Union[
Medium,AnisotropicMedium,PECMedium,PMCMedium,PoleResidue,Sellmeier,Lorentz,Debye,Drude,FullyAnisotropicMedium,CustomMedium,CustomPoleResidue,CustomSellmeier,CustomLorentz,CustomDebye,CustomDrude,CustomAnisotropicMedium,PerturbationMedium,PerturbationPoleResidue,LossyMetalMedium,Medium2D,AnisotropicMediumFromMedium2D] = Medium()) – Background medium through which to project fields.is_2d_simulation (bool = False) – Indicates whether the monitor data is for a 2D simulation.
projection_surfaces (tuple[
FieldProjectionSurface, …]) – Surfaces of the monitor where near fields were recorded for projection
Example
>>> from tidy3d import FieldProjectionAngleDataArray >>> f = np.linspace(1e14, 2e14, 10) >>> r = np.atleast_1d(5) >>> theta = np.linspace(0, np.pi, 10) >>> phi = np.linspace(0, 2*np.pi, 20) >>> coords = dict(r=r, theta=theta, phi=phi, f=f) >>> values = (1+1j) * np.random.random((len(r), len(theta), len(phi), len(f))) >>> scalar_field = FieldProjectionAngleDataArray(values, coords=coords) >>> monitor = FieldProjectionAngleMonitor( ... center=(1,2,3), size=(2,2,2), freqs=f, name='n2f_monitor', phi=phi, theta=theta ... ) >>> data = FieldProjectionAngleData( ... monitor=monitor, Er=scalar_field, Etheta=scalar_field, Ephi=scalar_field, ... Hr=scalar_field, Htheta=scalar_field, Hphi=scalar_field, ... projection_surfaces=monitor.projection_surfaces, ... )
Attributes
Azimuthal angles.
Radial distance.
Tangential dimensions to a spherical surface in the spherical coordinate system.
Polar angles.
mediumis_2d_simulationMethods
Flux calculated by integrating the projected fields on a spherical surface.
get_phi_slice(field_array, phi[, symmetric])Get a planar slice of the
FieldProjectionAngleDataArrayalong a given phi angle.renormalize_fields(proj_distance)Return a
FieldProjectionAngleDatawith fields re-normalized to a new projection distance, by applying a phase factor based onproj_distance.- monitor#
- projection_surfaces#
- Er#
- Etheta#
- Ephi#
- Hr#
- Htheta#
- Hphi#
- property r#
Radial distance.
- property theta#
Polar angles.
- property phi#
Azimuthal angles.
- renormalize_fields(proj_distance)[source]#
Return a
FieldProjectionAngleDatawith fields re-normalized to a new projection distance, by applying a phase factor based onproj_distance.- Parameters:
proj_distance (float = None) – (micron) new radial distance relative to the monitor’s local origin.
- Returns:
Copy of this
FieldProjectionAngleDatawith fields re-projected toproj_distance.- Return type:
- property tangential_dims#
Tangential dimensions to a spherical surface in the spherical coordinate system.
- flux_from_projected_fields()[source]#
Flux calculated by integrating the projected fields on a spherical surface.
- Returns:
Flux in the frequency domain.
- Return type:
- static get_phi_slice(field_array, phi, symmetric=False)[source]#
Get a planar slice of the
FieldProjectionAngleDataArrayalong a given phi angle. Extends theta range from [0, π] to [0, 2π] to create a full slice.- Parameters:
field_array (
FieldProjectionAngleDataArray) – Field array to slice.phi (float) – Angle phi in radians to slice at.
symmetric (bool = False) – If True, uses same data for both halves. If False, takes opposite phi angle for back half.
- Returns:
2D slice with theta going from 0 to 2π.
- Return type: