tidy3d.FieldProjectionCartesianData
tidy3d.FieldProjectionCartesianData#
- class tidy3d.FieldProjectionCartesianData#
Data associated with a
FieldProjectionCartesianMonitor
: components of projected fields.- Parameters
monitor (FieldProjectionCartesianMonitor) – Field projection monitor with a Cartesian projection grid.
Er (FieldProjectionCartesianDataArray) – Spatial distribution of r-component of the electric field.
Etheta (FieldProjectionCartesianDataArray) – Spatial distribution of the theta-component of the electric field.
Ephi (FieldProjectionCartesianDataArray) – Spatial distribution of phi-component of the electric field.
Hr (FieldProjectionCartesianDataArray) – Spatial distribution of r-component of the magnetic field.
Htheta (FieldProjectionCartesianDataArray) – Spatial distribution of theta-component of the magnetic field.
Hphi (FieldProjectionCartesianDataArray) – Spatial distribution of phi-component of the magnetic field.
medium (Union[Medium, AnisotropicMedium, PECMedium, PoleResidue, Sellmeier, Lorentz, Debye, Drude] = Medium(name=None, frequency_range=None, type='Medium', permittivity=1.0, conductivity=0.0)) – Background medium through which to project fields.
projection_surfaces (Tuple[FieldProjectionSurface, ...]) – Surfaces of the monitor where near fields were recorded for projection
Example
>>> from tidy3d import FieldProjectionCartesianDataArray >>> f = np.linspace(1e14, 2e14, 10) >>> x = np.linspace(0, 5, 10) >>> y = np.linspace(0, 10, 20) >>> z = np.atleast_1d(5) >>> coords = dict(x=x, y=y, z=z, f=f) >>> values = (1+1j) * np.random.random((len(x), len(y), len(z), len(f))) >>> scalar_field = FieldProjectionCartesianDataArray(values, coords=coords) >>> monitor = FieldProjectionCartesianMonitor( ... center=(1,2,3), size=(2,2,2), freqs=f, name='n2f_monitor', x=x, y=y, ... proj_axis=2, proj_distance=50 ... ) >>> data = FieldProjectionCartesianData( ... 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, ... )
Show JSON schema
{ "title": "FieldProjectionCartesianData", "description": "Data associated with a :class:`.FieldProjectionCartesianMonitor`: components of\nprojected fields.\n\nParameters\n----------\nmonitor : FieldProjectionCartesianMonitor\n Field projection monitor with a Cartesian projection grid.\nEr : FieldProjectionCartesianDataArray\n Spatial distribution of r-component of the electric field.\nEtheta : FieldProjectionCartesianDataArray\n Spatial distribution of the theta-component of the electric field.\nEphi : FieldProjectionCartesianDataArray\n Spatial distribution of phi-component of the electric field.\nHr : FieldProjectionCartesianDataArray\n Spatial distribution of r-component of the magnetic field.\nHtheta : FieldProjectionCartesianDataArray\n Spatial distribution of theta-component of the magnetic field.\nHphi : FieldProjectionCartesianDataArray\n Spatial distribution of phi-component of the magnetic field.\nmedium : Union[Medium, AnisotropicMedium, PECMedium, PoleResidue, Sellmeier, Lorentz, Debye, Drude] = Medium(name=None, frequency_range=None, type='Medium', permittivity=1.0, conductivity=0.0)\n Background medium through which to project fields.\nprojection_surfaces : Tuple[FieldProjectionSurface, ...]\n Surfaces of the monitor where near fields were recorded for projection\n\nExample\n-------\n>>> from tidy3d import FieldProjectionCartesianDataArray\n>>> f = np.linspace(1e14, 2e14, 10)\n>>> x = np.linspace(0, 5, 10)\n>>> y = np.linspace(0, 10, 20)\n>>> z = np.atleast_1d(5)\n>>> coords = dict(x=x, y=y, z=z, f=f)\n>>> values = (1+1j) * np.random.random((len(x), len(y), len(z), len(f)))\n>>> scalar_field = FieldProjectionCartesianDataArray(values, coords=coords)\n>>> monitor = FieldProjectionCartesianMonitor(\n... center=(1,2,3), size=(2,2,2), freqs=f, name='n2f_monitor', x=x, y=y,\n... proj_axis=2, proj_distance=50\n... )\n>>> data = FieldProjectionCartesianData(\n... monitor=monitor, Er=scalar_field, Etheta=scalar_field, Ephi=scalar_field,\n... Hr=scalar_field, Htheta=scalar_field, Hphi=scalar_field,\n... projection_surfaces=monitor.projection_surfaces,\n... )", "type": "object", "properties": { "type": { "title": "Type", "default": "FieldProjectionCartesianData", "enum": [ "FieldProjectionCartesianData" ], "type": "string" }, "monitor": { "title": "Projection monitor", "description": "Field projection monitor with a Cartesian projection grid.", "allOf": [ { "$ref": "#/definitions/FieldProjectionCartesianMonitor" } ] }, "Er": { "title": "DataArray", "description": "Spatial distribution of r-component of the electric field.", "type": "xr.DataArray", "properties": { "_dims": { "title": "_dims", "type": "Tuple[str, ...]" } }, "required": [ "_dims" ] }, "Etheta": { "title": "DataArray", "description": "Spatial distribution of the theta-component of the electric field.", "type": "xr.DataArray", "properties": { "_dims": { "title": "_dims", "type": "Tuple[str, ...]" } }, "required": [ "_dims" ] }, "Ephi": { "title": "DataArray", "description": "Spatial distribution of phi-component of the electric field.", "type": "xr.DataArray", "properties": { "_dims": { "title": "_dims", "type": "Tuple[str, ...]" } }, "required": [ "_dims" ] }, "Hr": { "title": "DataArray", "description": "Spatial distribution of r-component of the magnetic field.", "type": "xr.DataArray", "properties": { "_dims": { "title": "_dims", "type": "Tuple[str, ...]" } }, "required": [ "_dims" ] }, "Htheta": { "title": "DataArray", "description": "Spatial distribution of theta-component of the magnetic field.", "type": "xr.DataArray", "properties": { "_dims": { "title": "_dims", "type": "Tuple[str, ...]" } }, "required": [ "_dims" ] }, "Hphi": { "title": "DataArray", "description": "Spatial distribution of phi-component of the magnetic field.", "type": "xr.DataArray", "properties": { "_dims": { "title": "_dims", "type": "Tuple[str, ...]" } }, "required": [ "_dims" ] }, "medium": { "title": "Background Medium", "description": "Background medium through which to project fields.", "default": { "name": null, "frequency_range": null, "type": "Medium", "permittivity": 1.0, "conductivity": 0.0 }, "anyOf": [ { "$ref": "#/definitions/Medium" }, { "$ref": "#/definitions/AnisotropicMedium" }, { "$ref": "#/definitions/PECMedium" }, { "$ref": "#/definitions/PoleResidue" }, { "$ref": "#/definitions/Sellmeier" }, { "$ref": "#/definitions/Lorentz" }, { "$ref": "#/definitions/Debye" }, { "$ref": "#/definitions/Drude" } ] }, "projection_surfaces": { "title": "Projection surfaces", "description": "Surfaces of the monitor where near fields were recorded for projection", "type": "array", "items": { "$ref": "#/definitions/FieldProjectionSurface" } } }, "required": [ "monitor", "Er", "Etheta", "Ephi", "Hr", "Htheta", "Hphi", "projection_surfaces" ], "additionalProperties": false, "definitions": { "ApodizationSpec": { "title": "ApodizationSpec", "description": "Stores specifications for the apodizaton of frequency-domain monitors.\n\nParameters\n----------\nstart : Optional[NonNegativeFloat] = None\n [units = sec]. Defines the time at which the start apodization ends.\nend : Optional[NonNegativeFloat] = None\n [units = sec]. Defines the time at which the end apodization begins.\nwidth : Optional[PositiveFloat] = None\n [units = sec]. Characteristic decay length of the apodization function.\n\nExample\n-------\n>>> apod_spec = ApodizationSpec(start=1, end=2, width=0.5)", "type": "object", "properties": { "start": { "title": "Start Interval", "description": "Defines the time at which the start apodization ends.", "units": "sec", "minimum": 0, "type": "number" }, "end": { "title": "End Interval", "description": "Defines the time at which the end apodization begins.", "units": "sec", "minimum": 0, "type": "number" }, "width": { "title": "Apodization Width", "description": "Characteristic decay length of the apodization function.", "units": "sec", "exclusiveMinimum": 0, "type": "number" }, "type": { "title": "Type", "default": "ApodizationSpec", "enum": [ "ApodizationSpec" ], "type": "string" } }, "additionalProperties": false }, "FieldProjectionCartesianMonitor": { "title": "FieldProjectionCartesianMonitor", "description": ":class:`Monitor` that samples electromagnetic near fields in the frequency domain\nand projects them on a Cartesian observation plane.\n\nParameters\n----------\ncenter : Tuple[float, float, float] = (0.0, 0.0, 0.0)\n [units = um]. Center of object in x, y, and z.\nsize : Tuple[NonNegativeFloat, NonNegativeFloat, NonNegativeFloat]\n [units = um]. Size in x, y, and z directions.\nname : ConstrainedStrValue\n Unique name for monitor.\nfreqs : Union[Tuple[float, ...], Array]\n [units = Hz]. Array or list of frequencies stored by the field monitor.\napodization : ApodizationSpec = ApodizationSpec(start=None, end=None, width=None, type='ApodizationSpec')\n Sets parameters of (optional) apodization. Apodization applies a windowing function to the Fourier transform of the time-domain fields into frequency-domain ones, and can be used to truncate the beginning and/or end of the time signal, for example to eliminate the source pulse when studying the eigenmodes of a system. Note: apodization affects the normalization of the frequency-domain fields.\nnormal_dir : Optional[Literal['+', '-']] = None\n Direction of the surface monitor's normal vector w.r.t. the positive x, y or z unit vectors. Must be one of ``'+'`` or ``'-'``. Applies to surface monitors only, and defaults to ``'+'`` if not provided.\nexclude_surfaces : Optional[Tuple[Literal['x-', 'x+', 'y-', 'y+', 'z-', 'z+'], ...]] = None\n Surfaces to exclude in the integration, if a volume monitor.\ncustom_origin : Optional[Tuple[float, float, float]] = None\n [units = um]. Local origin used for defining observation points. If ``None``, uses the monitor's center.\nfar_field_approx : bool = True\n Whether to enable the far field approximation when projecting fields.\nproj_axis : Literal[0, 1, 2]\n Axis along which the observation plane is oriented.\nproj_distance : float = 1000000.0\n [units = um]. Signed distance of the projection plane along ``proj_axis``. from the plane containing ``local_origin``.\nx : Union[Tuple[float, ...], Array]\n [units = um]. Local x observation coordinates w.r.t. ``local_origin`` and ``proj_axis``. When ``proj_axis`` is 0, this corresponds to the global y axis. When ``proj_axis`` is 1, this corresponds to the global x axis. When ``proj_axis`` is 2, this corresponds to the global x axis. \ny : Union[Tuple[float, ...], Array]\n [units = um]. Local y observation coordinates w.r.t. ``local_origin`` and ``proj_axis``. When ``proj_axis`` is 0, this corresponds to the global z axis. When ``proj_axis`` is 1, this corresponds to the global z axis. When ``proj_axis`` is 2, this corresponds to the global y axis. \n\nExample\n-------\n>>> monitor = FieldProjectionCartesianMonitor(\n... center=(1,2,3),\n... size=(2,2,2),\n... freqs=[250e12, 300e12],\n... name='n2f_monitor',\n... custom_origin=(1,2,3),\n... x=[-1, 0, 1],\n... y=[-2, -1, 0, 1, 2],\n... proj_axis=2,\n... proj_distance=5\n... )", "type": "object", "properties": { "type": { "title": "Type", "default": "FieldProjectionCartesianMonitor", "enum": [ "FieldProjectionCartesianMonitor" ], "type": "string" }, "center": { "title": "Center", "description": "Center of object in x, y, and z.", "default": [ 0.0, 0.0, 0.0 ], "units": "um", "type": "array", "minItems": 3, "maxItems": 3, "items": [ { "type": "number" }, { "type": "number" }, { "type": "number" } ] }, "size": { "title": "Size", "description": "Size in x, y, and z directions.", "units": "um", "type": "array", "minItems": 3, "maxItems": 3, "items": [ { "type": "number", "minimum": 0 }, { "type": "number", "minimum": 0 }, { "type": "number", "minimum": 0 } ] }, "name": { "title": "Name", "description": "Unique name for monitor.", "minLength": 1, "type": "string" }, "freqs": { "title": "Frequencies", "description": "Array or list of frequencies stored by the field monitor.", "units": "Hz", "anyOf": [ { "type": "array", "items": { "type": "number" } }, { "title": "Array Like", "description": "Accepts sequence (tuple, list, numpy array) and converts to tuple.", "type": "tuple", "properties": {}, "required": [] } ] }, "apodization": { "title": "Apodization Specification", "description": "Sets parameters of (optional) apodization. Apodization applies a windowing function to the Fourier transform of the time-domain fields into frequency-domain ones, and can be used to truncate the beginning and/or end of the time signal, for example to eliminate the source pulse when studying the eigenmodes of a system. Note: apodization affects the normalization of the frequency-domain fields.", "default": { "start": null, "end": null, "width": null, "type": "ApodizationSpec" }, "allOf": [ { "$ref": "#/definitions/ApodizationSpec" } ] }, "normal_dir": { "title": "Normal vector orientation", "description": "Direction of the surface monitor's normal vector w.r.t. the positive x, y or z unit vectors. Must be one of ``'+'`` or ``'-'``. Applies to surface monitors only, and defaults to ``'+'`` if not provided.", "enum": [ "+", "-" ], "type": "string" }, "exclude_surfaces": { "title": "Excluded surfaces", "description": "Surfaces to exclude in the integration, if a volume monitor.", "type": "array", "items": { "enum": [ "x-", "x+", "y-", "y+", "z-", "z+" ], "type": "string" } }, "custom_origin": { "title": "Local origin", "description": "Local origin used for defining observation points. If ``None``, uses the monitor's center.", "units": "um", "type": "array", "minItems": 3, "maxItems": 3, "items": [ { "type": "number" }, { "type": "number" }, { "type": "number" } ] }, "far_field_approx": { "title": "Far field approximation", "description": "Whether to enable the far field approximation when projecting fields.", "default": true, "type": "boolean" }, "proj_axis": { "title": "Projection plane axis", "description": "Axis along which the observation plane is oriented.", "enum": [ 0, 1, 2 ], "type": "integer" }, "proj_distance": { "title": "Projection distance", "description": "Signed distance of the projection plane along ``proj_axis``. from the plane containing ``local_origin``.", "default": 1000000.0, "units": "um", "type": "number" }, "x": { "title": "Local x observation coordinates", "description": "Local x observation coordinates w.r.t. ``local_origin`` and ``proj_axis``. When ``proj_axis`` is 0, this corresponds to the global y axis. When ``proj_axis`` is 1, this corresponds to the global x axis. When ``proj_axis`` is 2, this corresponds to the global x axis. ", "units": "um", "anyOf": [ { "type": "array", "items": { "type": "number" } }, { "title": "Array Like", "description": "Accepts sequence (tuple, list, numpy array) and converts to tuple.", "type": "tuple", "properties": {}, "required": [] } ] }, "y": { "title": "Local y observation coordinates", "description": "Local y observation coordinates w.r.t. ``local_origin`` and ``proj_axis``. When ``proj_axis`` is 0, this corresponds to the global z axis. When ``proj_axis`` is 1, this corresponds to the global z axis. When ``proj_axis`` is 2, this corresponds to the global y axis. ", "units": "um", "anyOf": [ { "type": "array", "items": { "type": "number" } }, { "title": "Array Like", "description": "Accepts sequence (tuple, list, numpy array) and converts to tuple.", "type": "tuple", "properties": {}, "required": [] } ] } }, "required": [ "size", "name", "freqs", "proj_axis", "x", "y" ], "additionalProperties": false }, "Medium": { "title": "Medium", "description": "Dispersionless medium.\n\nParameters\n----------\nname : Optional[str] = None\n Optional unique name for medium.\nfrequency_range : Optional[Tuple[float, float]] = None\n [units = (Hz, Hz)]. Optional range of validity for the medium.\npermittivity : ConstrainedFloatValue = 1.0\n [units = None (relative permittivity)]. Relative permittivity.\nconductivity : ConstrainedFloatValue = 0.0\n [units = S/um]. Electric conductivity. Defined such that the imaginary part of the complex permittivity at angular frequency omega is given by conductivity/omega.\n\nExample\n-------\n>>> dielectric = Medium(permittivity=4.0, name='my_medium')\n>>> eps = dielectric.eps_model(200e12)", "type": "object", "properties": { "name": { "title": "Name", "description": "Optional unique name for medium.", "type": "string" }, "frequency_range": { "title": "Frequency Range", "description": "Optional range of validity for the medium.", "units": [ "Hz", "Hz" ], "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "number" }, { "type": "number" } ] }, "type": { "title": "Type", "default": "Medium", "enum": [ "Medium" ], "type": "string" }, "permittivity": { "title": "Permittivity", "description": "Relative permittivity.", "default": 1.0, "minimum": 1.0, "units": "None (relative permittivity)", "type": "number" }, "conductivity": { "title": "Conductivity", "description": "Electric conductivity. Defined such that the imaginary part of the complex permittivity at angular frequency omega is given by conductivity/omega.", "default": 0.0, "minimum": 0.0, "units": "S/um", "type": "number" } }, "additionalProperties": false }, "AnisotropicMedium": { "title": "AnisotropicMedium", "description": "Diagonally anisotripic medium.\n\nParameters\n----------\nname : Optional[str] = None\n Optional unique name for medium.\nfrequency_range : Optional[Tuple[float, float]] = None\n [units = (Hz, Hz)]. Optional range of validity for the medium.\nxx : Medium\n Medium describing the xx-component of the diagonal permittivity tensor.\nyy : Medium\n Medium describing the yy-component of the diagonal permittivity tensor.\nzz : Medium\n Medium describing the zz-component of the diagonal permittivity tensor.\n\nNote\n----\nOnly diagonal anisotropy and non-dispersive components are currently supported.\n\nExample\n-------\n>>> medium_xx = Medium(permittivity=4.0)\n>>> medium_yy = Medium(permittivity=4.1)\n>>> medium_zz = Medium(permittivity=3.9)\n>>> anisotropic_dielectric = AnisotropicMedium(xx=medium_xx, yy=medium_yy, zz=medium_zz)", "type": "object", "properties": { "name": { "title": "Name", "description": "Optional unique name for medium.", "type": "string" }, "frequency_range": { "title": "Frequency Range", "description": "Optional range of validity for the medium.", "units": [ "Hz", "Hz" ], "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "number" }, { "type": "number" } ] }, "type": { "title": "Type", "default": "AnisotropicMedium", "enum": [ "AnisotropicMedium" ], "type": "string" }, "xx": { "title": "XX Component", "description": "Medium describing the xx-component of the diagonal permittivity tensor.", "allOf": [ { "$ref": "#/definitions/Medium" } ] }, "yy": { "title": "YY Component", "description": "Medium describing the yy-component of the diagonal permittivity tensor.", "allOf": [ { "$ref": "#/definitions/Medium" } ] }, "zz": { "title": "ZZ Component", "description": "Medium describing the zz-component of the diagonal permittivity tensor.", "allOf": [ { "$ref": "#/definitions/Medium" } ] } }, "required": [ "xx", "yy", "zz" ], "additionalProperties": false }, "PECMedium": { "title": "PECMedium", "description": "Perfect electrical conductor class.\n\nParameters\n----------\nname : Optional[str] = None\n Optional unique name for medium.\nfrequency_range : Optional[Tuple[float, float]] = None\n [units = (Hz, Hz)]. Optional range of validity for the medium.\n\nNote\n----\nTo avoid confusion from duplicate PECs, should import ``tidy3d.PEC`` instance directly.", "type": "object", "properties": { "name": { "title": "Name", "description": "Optional unique name for medium.", "type": "string" }, "frequency_range": { "title": "Frequency Range", "description": "Optional range of validity for the medium.", "units": [ "Hz", "Hz" ], "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "number" }, { "type": "number" } ] }, "type": { "title": "Type", "default": "PECMedium", "enum": [ "PECMedium" ], "type": "string" } }, "additionalProperties": false }, "ComplexNumber": { "title": "ComplexNumber", "description": "Complex number with a well defined schema.", "type": "object", "properties": { "real": { "title": "Real", "type": "number" }, "imag": { "title": "Imag", "type": "number" } }, "required": [ "real", "imag" ] }, "PoleResidue": { "title": "PoleResidue", "description": "A dispersive medium described by the pole-residue pair model.\nThe frequency-dependence of the complex-valued permittivity is described by:\n\nParameters\n----------\nname : Optional[str] = None\n Optional unique name for medium.\nfrequency_range : Optional[Tuple[float, float]] = None\n [units = (Hz, Hz)]. Optional range of validity for the medium.\neps_inf : float = 1.0\n [units = None (relative permittivity)]. Relative permittivity at infinite frequency (:math:`\\epsilon_\\infty`).\npoles : Tuple[Tuple[Union[tidy3d.components.types.tidycomplex, tidy3d.components.types.ComplexNumber], Union[tidy3d.components.types.tidycomplex, tidy3d.components.types.ComplexNumber]], ...] = ()\n [units = (rad/sec, rad/sec)]. Tuple of complex-valued (:math:`a_i, c_i`) poles for the model.\n\nNote\n----\n.. math::\n\n \\epsilon(\\omega) = \\epsilon_\\infty - \\sum_i\n \\left[\\frac{c_i}{j \\omega + a_i} +\n \\frac{c_i^*}{j \\omega + a_i^*}\\right]\n\nExample\n-------\n>>> pole_res = PoleResidue(eps_inf=2.0, poles=[((1+2j), (3+4j)), ((5+6j), (7+8j))])\n>>> eps = pole_res.eps_model(200e12)", "type": "object", "properties": { "name": { "title": "Name", "description": "Optional unique name for medium.", "type": "string" }, "frequency_range": { "title": "Frequency Range", "description": "Optional range of validity for the medium.", "units": [ "Hz", "Hz" ], "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "number" }, { "type": "number" } ] }, "type": { "title": "Type", "default": "PoleResidue", "enum": [ "PoleResidue" ], "type": "string" }, "eps_inf": { "title": "Epsilon at Infinity", "description": "Relative permittivity at infinite frequency (:math:`\\epsilon_\\infty`).", "default": 1.0, "units": "None (relative permittivity)", "type": "number" }, "poles": { "title": "Poles", "description": "Tuple of complex-valued (:math:`a_i, c_i`) poles for the model.", "default": [], "units": [ "rad/sec", "rad/sec" ], "type": "array", "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "anyOf": [ { "title": "ComplexNumber", "description": "Complex number with a well defined schema.", "type": "object", "properties": { "real": { "title": "Real", "type": "number" }, "imag": { "title": "Imag", "type": "number" } }, "required": [ "real", "imag" ] }, { "$ref": "#/definitions/ComplexNumber" } ] }, { "anyOf": [ { "title": "ComplexNumber", "description": "Complex number with a well defined schema.", "type": "object", "properties": { "real": { "title": "Real", "type": "number" }, "imag": { "title": "Imag", "type": "number" } }, "required": [ "real", "imag" ] }, { "$ref": "#/definitions/ComplexNumber" } ] } ] } } }, "additionalProperties": false }, "Sellmeier": { "title": "Sellmeier", "description": "A dispersive medium described by the Sellmeier model.\nThe frequency-dependence of the refractive index is described by:\n\nParameters\n----------\nname : Optional[str] = None\n Optional unique name for medium.\nfrequency_range : Optional[Tuple[float, float]] = None\n [units = (Hz, Hz)]. Optional range of validity for the medium.\ncoeffs : Tuple[Tuple[float, pydantic.types.PositiveFloat], ...]\n [units = (None, um^2)]. List of Sellmeier (:math:`B_i, C_i`) coefficients.\n\nNote\n----\n.. math::\n\n n(\\lambda)^2 = 1 + \\sum_i \\frac{B_i \\lambda^2}{\\lambda^2 - C_i}\n\nExample\n-------\n>>> sellmeier_medium = Sellmeier(coeffs=[(1,2), (3,4)])\n>>> eps = sellmeier_medium.eps_model(200e12)", "type": "object", "properties": { "name": { "title": "Name", "description": "Optional unique name for medium.", "type": "string" }, "frequency_range": { "title": "Frequency Range", "description": "Optional range of validity for the medium.", "units": [ "Hz", "Hz" ], "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "number" }, { "type": "number" } ] }, "type": { "title": "Type", "default": "Sellmeier", "enum": [ "Sellmeier" ], "type": "string" }, "coeffs": { "title": "Coefficients", "description": "List of Sellmeier (:math:`B_i, C_i`) coefficients.", "units": [ null, "um^2" ], "type": "array", "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "number" }, { "type": "number", "exclusiveMinimum": 0 } ] } } }, "required": [ "coeffs" ], "additionalProperties": false }, "Lorentz": { "title": "Lorentz", "description": "A dispersive medium described by the Lorentz model.\nThe frequency-dependence of the complex-valued permittivity is described by:\n\nParameters\n----------\nname : Optional[str] = None\n Optional unique name for medium.\nfrequency_range : Optional[Tuple[float, float]] = None\n [units = (Hz, Hz)]. Optional range of validity for the medium.\neps_inf : float = 1.0\n [units = None (relative permittivity)]. Relative permittivity at infinite frequency (:math:`\\epsilon_\\infty`).\ncoeffs : Tuple[Tuple[float, float, float], ...]\n [units = (None (relative permittivity), Hz, Hz)]. List of (:math:`\\Delta\\epsilon_i, f_i, \\delta_i`) values for model.\n\nNote\n----\n.. math::\n\n \\epsilon(f) = \\epsilon_\\infty + \\sum_i\n \\frac{\\Delta\\epsilon_i f_i^2}{f_i^2 - 2jf\\delta_i - f^2}\n\nExample\n-------\n>>> lorentz_medium = Lorentz(eps_inf=2.0, coeffs=[(1,2,3), (4,5,6)])\n>>> eps = lorentz_medium.eps_model(200e12)", "type": "object", "properties": { "name": { "title": "Name", "description": "Optional unique name for medium.", "type": "string" }, "frequency_range": { "title": "Frequency Range", "description": "Optional range of validity for the medium.", "units": [ "Hz", "Hz" ], "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "number" }, { "type": "number" } ] }, "type": { "title": "Type", "default": "Lorentz", "enum": [ "Lorentz" ], "type": "string" }, "eps_inf": { "title": "Epsilon at Infinity", "description": "Relative permittivity at infinite frequency (:math:`\\epsilon_\\infty`).", "default": 1.0, "units": "None (relative permittivity)", "type": "number" }, "coeffs": { "title": "Epsilon at Infinity", "description": "List of (:math:`\\Delta\\epsilon_i, f_i, \\delta_i`) values for model.", "units": [ "None (relative permittivity)", "Hz", "Hz" ], "type": "array", "items": { "type": "array", "minItems": 3, "maxItems": 3, "items": [ { "type": "number" }, { "type": "number" }, { "type": "number" } ] } } }, "required": [ "coeffs" ], "additionalProperties": false }, "Debye": { "title": "Debye", "description": "A dispersive medium described by the Debye model.\nThe frequency-dependence of the complex-valued permittivity is described by:\n\nParameters\n----------\nname : Optional[str] = None\n Optional unique name for medium.\nfrequency_range : Optional[Tuple[float, float]] = None\n [units = (Hz, Hz)]. Optional range of validity for the medium.\neps_inf : float = 1.0\n [units = None (relative permittivity)]. Relative permittivity at infinite frequency (:math:`\\epsilon_\\infty`).\ncoeffs : Tuple[Tuple[float, pydantic.types.PositiveFloat], ...]\n [units = (None (relative permittivity), sec)]. List of (:math:`\\Delta\\epsilon_i, \\tau_i`) values for model.\n\nNote\n----\n.. math::\n\n \\epsilon(f) = \\epsilon_\\infty + \\sum_i\n \\frac{\\Delta\\epsilon_i}{1 - jf\\tau_i}\n\nExample\n-------\n>>> debye_medium = Debye(eps_inf=2.0, coeffs=[(1,2),(3,4)])\n>>> eps = debye_medium.eps_model(200e12)", "type": "object", "properties": { "name": { "title": "Name", "description": "Optional unique name for medium.", "type": "string" }, "frequency_range": { "title": "Frequency Range", "description": "Optional range of validity for the medium.", "units": [ "Hz", "Hz" ], "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "number" }, { "type": "number" } ] }, "type": { "title": "Type", "default": "Debye", "enum": [ "Debye" ], "type": "string" }, "eps_inf": { "title": "Epsilon at Infinity", "description": "Relative permittivity at infinite frequency (:math:`\\epsilon_\\infty`).", "default": 1.0, "units": "None (relative permittivity)", "type": "number" }, "coeffs": { "title": "Coefficients", "description": "List of (:math:`\\Delta\\epsilon_i, \\tau_i`) values for model.", "units": [ "None (relative permittivity)", "sec" ], "type": "array", "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "number" }, { "type": "number", "exclusiveMinimum": 0 } ] } } }, "required": [ "coeffs" ], "additionalProperties": false }, "Drude": { "title": "Drude", "description": "A dispersive medium described by the Drude model.\nThe frequency-dependence of the complex-valued permittivity is described by:\n\nParameters\n----------\nname : Optional[str] = None\n Optional unique name for medium.\nfrequency_range : Optional[Tuple[float, float]] = None\n [units = (Hz, Hz)]. Optional range of validity for the medium.\neps_inf : float = 1.0\n [units = None (relative permittivity)]. Relative permittivity at infinite frequency (:math:`\\epsilon_\\infty`).\ncoeffs : Tuple[Tuple[float, pydantic.types.PositiveFloat], ...]\n [units = (Hz, Hz)]. List of (:math:`f_i, \\delta_i`) values for model.\n\nNote\n----\n.. math::\n\n \\epsilon(f) = \\epsilon_\\infty - \\sum_i\n \\frac{ f_i^2}{f^2 + jf\\delta_i}\n\nExample\n-------\n>>> drude_medium = Drude(eps_inf=2.0, coeffs=[(1,2), (3,4)])\n>>> eps = drude_medium.eps_model(200e12)", "type": "object", "properties": { "name": { "title": "Name", "description": "Optional unique name for medium.", "type": "string" }, "frequency_range": { "title": "Frequency Range", "description": "Optional range of validity for the medium.", "units": [ "Hz", "Hz" ], "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "number" }, { "type": "number" } ] }, "type": { "title": "Type", "default": "Drude", "enum": [ "Drude" ], "type": "string" }, "eps_inf": { "title": "Epsilon at Infinity", "description": "Relative permittivity at infinite frequency (:math:`\\epsilon_\\infty`).", "default": 1.0, "units": "None (relative permittivity)", "type": "number" }, "coeffs": { "title": "Coefficients", "description": "List of (:math:`f_i, \\delta_i`) values for model.", "units": [ "Hz", "Hz" ], "type": "array", "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "number" }, { "type": "number", "exclusiveMinimum": 0 } ] } } }, "required": [ "coeffs" ], "additionalProperties": false }, "FieldMonitor": { "title": "FieldMonitor", "description": ":class:`Monitor` that records electromagnetic fields in the frequency domain.\n\nParameters\n----------\ncenter : Tuple[float, float, float] = (0.0, 0.0, 0.0)\n [units = um]. Center of object in x, y, and z.\nsize : Tuple[NonNegativeFloat, NonNegativeFloat, NonNegativeFloat]\n [units = um]. Size in x, y, and z directions.\nname : ConstrainedStrValue\n Unique name for monitor.\nfreqs : Union[Tuple[float, ...], Array]\n [units = Hz]. Array or list of frequencies stored by the field monitor.\napodization : ApodizationSpec = ApodizationSpec(start=None, end=None, width=None, type='ApodizationSpec')\n Sets parameters of (optional) apodization. Apodization applies a windowing function to the Fourier transform of the time-domain fields into frequency-domain ones, and can be used to truncate the beginning and/or end of the time signal, for example to eliminate the source pulse when studying the eigenmodes of a system. Note: apodization affects the normalization of the frequency-domain fields.\nfields : Tuple[Literal['Ex', 'Ey', 'Ez', 'Hx', 'Hy', 'Hz'], ...] = ['Ex', 'Ey', 'Ez', 'Hx', 'Hy', 'Hz']\n Collection of field components to store in the monitor.\ninterval_space : Tuple[PositiveInt, PositiveInt, PositiveInt] = (1, 1, 1)\n Number of grid step intervals between monitor recordings. If equal to 1, there will be no downsampling. If greater than 1, fields will be downsampled and automatically colocated.\ncolocate : Optional[bool] = None\n Toggle whether fields should be colocated to grid cell centers. Default: ``False`` if ``interval_space`` is 1 in each direction, ``True`` if ``interval_space`` is greater than one in any direction.\n\nExample\n-------\n>>> monitor = FieldMonitor(\n... center=(1,2,3),\n... size=(2,2,2),\n... fields=['Hx'],\n... freqs=[250e12, 300e12],\n... name='steady_state_monitor')", "type": "object", "properties": { "type": { "title": "Type", "default": "FieldMonitor", "enum": [ "FieldMonitor" ], "type": "string" }, "center": { "title": "Center", "description": "Center of object in x, y, and z.", "default": [ 0.0, 0.0, 0.0 ], "units": "um", "type": "array", "minItems": 3, "maxItems": 3, "items": [ { "type": "number" }, { "type": "number" }, { "type": "number" } ] }, "size": { "title": "Size", "description": "Size in x, y, and z directions.", "units": "um", "type": "array", "minItems": 3, "maxItems": 3, "items": [ { "type": "number", "minimum": 0 }, { "type": "number", "minimum": 0 }, { "type": "number", "minimum": 0 } ] }, "name": { "title": "Name", "description": "Unique name for monitor.", "minLength": 1, "type": "string" }, "freqs": { "title": "Frequencies", "description": "Array or list of frequencies stored by the field monitor.", "units": "Hz", "anyOf": [ { "type": "array", "items": { "type": "number" } }, { "title": "Array Like", "description": "Accepts sequence (tuple, list, numpy array) and converts to tuple.", "type": "tuple", "properties": {}, "required": [] } ] }, "apodization": { "title": "Apodization Specification", "description": "Sets parameters of (optional) apodization. Apodization applies a windowing function to the Fourier transform of the time-domain fields into frequency-domain ones, and can be used to truncate the beginning and/or end of the time signal, for example to eliminate the source pulse when studying the eigenmodes of a system. Note: apodization affects the normalization of the frequency-domain fields.", "default": { "start": null, "end": null, "width": null, "type": "ApodizationSpec" }, "allOf": [ { "$ref": "#/definitions/ApodizationSpec" } ] }, "fields": { "title": "Field Components", "description": "Collection of field components to store in the monitor.", "default": [ "Ex", "Ey", "Ez", "Hx", "Hy", "Hz" ], "type": "array", "items": { "enum": [ "Ex", "Ey", "Ez", "Hx", "Hy", "Hz" ], "type": "string" } }, "interval_space": { "title": "Spatial interval", "description": "Number of grid step intervals between monitor recordings. If equal to 1, there will be no downsampling. If greater than 1, fields will be downsampled and automatically colocated.", "default": [ 1, 1, 1 ], "type": "array", "minItems": 3, "maxItems": 3, "items": [ { "type": "integer", "exclusiveMinimum": 0 }, { "type": "integer", "exclusiveMinimum": 0 }, { "type": "integer", "exclusiveMinimum": 0 } ] }, "colocate": { "title": "Colocate fields", "description": "Toggle whether fields should be colocated to grid cell centers. Default: ``False`` if ``interval_space`` is 1 in each direction, ``True`` if ``interval_space`` is greater than one in any direction.", "type": "boolean" } }, "required": [ "size", "name", "freqs" ], "additionalProperties": false }, "FieldProjectionSurface": { "title": "FieldProjectionSurface", "description": "Data structure to store surface monitors where near fields are recorded for\nfield projections.\n\nParameters\n----------\nmonitor : FieldMonitor\n :class:`.FieldMonitor` on which near fields will be sampled and integrated.\nnormal_dir : Literal['+', '-']\n :class:`.Direction` of the surface monitor's normal vector w.r.t. the positive x, y or z unit vectors. Must be one of '+' or '-'.", "type": "object", "properties": { "monitor": { "title": "Field monitor", "description": ":class:`.FieldMonitor` on which near fields will be sampled and integrated.", "allOf": [ { "$ref": "#/definitions/FieldMonitor" } ] }, "normal_dir": { "title": "Normal vector orientation", "description": ":class:`.Direction` of the surface monitor's normal vector w.r.t. the positive x, y or z unit vectors. Must be one of '+' or '-'.", "enum": [ "+", "-" ], "type": "string" }, "type": { "title": "Type", "default": "FieldProjectionSurface", "enum": [ "FieldProjectionSurface" ], "type": "string" } }, "required": [ "monitor", "normal_dir" ], "additionalProperties": false } } }
- attribute Ephi: tidy3d.components.data.data_array.FieldProjectionCartesianDataArray [Required]#
Spatial distribution of phi-component of the electric field.
- Constraints
title = DataArray
type = xr.DataArray
properties = {‘_dims’: {‘title’: ‘_dims’, ‘type’: ‘Tuple[str, …]’}}
required = [‘_dims’]
- attribute Er: tidy3d.components.data.data_array.FieldProjectionCartesianDataArray [Required]#
Spatial distribution of r-component of the electric field.
- Constraints
title = DataArray
type = xr.DataArray
properties = {‘_dims’: {‘title’: ‘_dims’, ‘type’: ‘Tuple[str, …]’}}
required = [‘_dims’]
- attribute Etheta: tidy3d.components.data.data_array.FieldProjectionCartesianDataArray [Required]#
Spatial distribution of the theta-component of the electric field.
- Constraints
title = DataArray
type = xr.DataArray
properties = {‘_dims’: {‘title’: ‘_dims’, ‘type’: ‘Tuple[str, …]’}}
required = [‘_dims’]
- attribute Hphi: tidy3d.components.data.data_array.FieldProjectionCartesianDataArray [Required]#
Spatial distribution of phi-component of the magnetic field.
- Constraints
title = DataArray
type = xr.DataArray
properties = {‘_dims’: {‘title’: ‘_dims’, ‘type’: ‘Tuple[str, …]’}}
required = [‘_dims’]
- attribute Hr: tidy3d.components.data.data_array.FieldProjectionCartesianDataArray [Required]#
Spatial distribution of r-component of the magnetic field.
- Constraints
title = DataArray
type = xr.DataArray
properties = {‘_dims’: {‘title’: ‘_dims’, ‘type’: ‘Tuple[str, …]’}}
required = [‘_dims’]
- attribute Htheta: tidy3d.components.data.data_array.FieldProjectionCartesianDataArray [Required]#
Spatial distribution of theta-component of the magnetic field.
- Constraints
title = DataArray
type = xr.DataArray
properties = {‘_dims’: {‘title’: ‘_dims’, ‘type’: ‘Tuple[str, …]’}}
required = [‘_dims’]
- attribute monitor: tidy3d.components.monitor.FieldProjectionCartesianMonitor [Required]#
Field projection monitor with a Cartesian projection grid.
- attribute projection_surfaces: Tuple[tidy3d.components.monitor.FieldProjectionSurface, ...] [Required]#
Surfaces of the monitor where near fields were recorded for projection
- renormalize_fields(proj_distance: float) tidy3d.components.data.monitor_data.FieldProjectionCartesianData #
Return a
FieldProjectionCartesianData
with fields re-normalized to a new projection distance, by applying a phase factor based onproj_distance
.- Parameters
proj_distance (float = None) – (micron) new plane distance relative to the monitor’s local origin.
- Returns
Copy of this
FieldProjectionCartesianData
with fields re-projected toproj_distance
.- Return type
- property x: numpy.ndarray#
X positions.
- property y: numpy.ndarray#
Y positions.
- property z: numpy.ndarray#
Z positions.