tidy3d.FieldProjectionKSpaceData#
- class FieldProjectionKSpaceData[source]#
Bases:
AbstractFieldProjectionData
Data associated with a
FieldProjectionKSpaceMonitor
: components of projected fields.- 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 (FieldProjectionKSpaceMonitor) β Field projection monitor with a projection grid defined in k-space.
Er (FieldProjectionKSpaceDataArray) β Spatial distribution of r-component of the electric field.
Etheta (FieldProjectionKSpaceDataArray) β Spatial distribution of the theta-component of the electric field.
Ephi (FieldProjectionKSpaceDataArray) β Spatial distribution of phi-component of the electric field.
Hr (FieldProjectionKSpaceDataArray) β Spatial distribution of r-component of the magnetic field.
Htheta (FieldProjectionKSpaceDataArray) β Spatial distribution of theta-component of the magnetic field.
Hphi (FieldProjectionKSpaceDataArray) β Spatial distribution of phi-component of the magnetic field.
medium (Union[Medium, AnisotropicMedium, PECMedium, PoleResidue, Sellmeier, Lorentz, Debye, Drude, FullyAnisotropicMedium, CustomMedium, CustomPoleResidue, CustomSellmeier, CustomLorentz, CustomDebye, CustomDrude, CustomAnisotropicMedium, PerturbationMedium, PerturbationPoleResidue, Medium2D, AnisotropicMediumFromMedium2D] = Medium(attrs={}, name=None, frequency_range=None, allow_gain=False, nonlinear_spec=None, modulation_spec=None, heat_spec=None, type='Medium', permittivity=1.0, conductivity=0.0)) β 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 FieldProjectionKSpaceDataArray >>> f = np.linspace(1e14, 2e14, 10) >>> ux = np.linspace(0, 0.4, 10) >>> uy = np.linspace(0, 0.6, 20) >>> r = np.atleast_1d(5) >>> coords = dict(ux=ux, uy=uy, r=r, f=f) >>> values = (1+1j) * np.random.random((len(ux), len(uy), len(r), len(f))) >>> scalar_field = FieldProjectionKSpaceDataArray(values, coords=coords) >>> monitor = FieldProjectionKSpaceMonitor( ... center=(1,2,3), size=(2,2,2), freqs=f, name='n2f_monitor', ux=ux, uy=uy, proj_axis=2 ... ) >>> data = FieldProjectionKSpaceData( ... 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
Methods
renormalize_fields
(proj_distance)Return a
FieldProjectionKSpaceData
with fields re-normalized to a new projection distance, by applying a phase factor based onproj_distance
.Inherited Common Usage
- monitor#
- projection_surfaces#
- Er#
- Etheta#
- Ephi#
- Hr#
- Htheta#
- Hphi#
- property ux#
Reciprocal X positions.
- property uy#
Reciprocal Y positions.
- property r#
Radial distance.
- renormalize_fields(proj_distance)[source]#
Return a
FieldProjectionKSpaceData
with 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
FieldProjectionKSpaceData
with fields re-projected toproj_distance
.- Return type:
- __hash__()#
Hash method.