tidy3d.Near2FarKSpaceMonitor#

class tidy3d.Near2FarKSpaceMonitor#

Monitor that samples electromagnetic near fields in the frequency domain and invokes the computation of far fields on an observation plane defined in k-space.

Parameters
  • center (Tuple[float, float, float] = (0.0, 0.0, 0.0)) – [units = um]. Center of object in x, y, and z.

  • size (Tuple[NonNegativeFloat, NonNegativeFloat, NonNegativeFloat]) – [units = um]. Size in x, y, and z directions.

  • name (ConstrainedStrValue) – Unique name for monitor.

  • freqs (Union[Tuple[float, ...], Array]) – [units = Hz]. Array or list of frequencies stored by the field monitor.

  • normal_dir (Optional[Literal['+', '-']] = None) – 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.

  • exclude_surfaces (Optional[Tuple[Literal['x-', 'x+', 'y-', 'y+', 'z-', 'z+'], ...]] = None) – Surfaces to exclude in the integration, if a volume monitor.

  • fields (Tuple[Literal['Ntheta', 'Nphi', 'Ltheta', 'Lphi'], ...] = ['Ntheta', 'Nphi', 'Ltheta', 'Lphi']) – Collection of radiation vector components to store in the monitor.

  • custom_origin (Optional[Tuple[float, float, float]] = None) – [units = um]. Local origin used for defining observation points. If None, uses the monitor’s center.

  • medium (Medium = Medium(name=None, frequency_range=None, type='Medium', permittivity=1.0, conductivity=0.0)) – Background medium in which to radiate near fields to far fields. If not provided, uses free space.

  • u_axis (Literal[0, 1, 2]) – Axis along which the observation plane is oriented.

  • ux (Union[Tuple[float, ...], Array]) – Local x component of wave vectors on the observation plane, relative to local_origin and oriented with respect to u_axis, normalized by (2*pi/lambda) where lambda is the wavelength associated with the background medium.

  • uy (Union[Tuple[float, ...], Array]) – Local y component of wave vectors on the observation plane, relative to local_origin and oriented with respect to u_axis, normalized by (2*pi/lambda) where lambda is the wavelength associated with the background medium.

Example

>>> monitor = Near2FarKSpaceMonitor(
...     center=(1,2,3),
...     size=(2,2,2),
...     freqs=[250e12, 300e12],
...     name='n2f_monitor',
...     custom_origin=(1,2,3),
...     u_axis=2,
...     ux=[1,2],
...     uy=[3,4,5]
...     )

Show JSON schema
{
   "title": "Near2FarKSpaceMonitor",
   "description": ":class:`Monitor` that samples electromagnetic near fields in the frequency domain\nand invokes the computation of far fields on an observation plane defined in k-space.\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.\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.\nfields : Tuple[Literal['Ntheta', 'Nphi', 'Ltheta', 'Lphi'], ...] = ['Ntheta', 'Nphi', 'Ltheta', 'Lphi']\n    Collection of radiation vector components to store in the 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.\nmedium : Medium = Medium(name=None, frequency_range=None, type='Medium', permittivity=1.0, conductivity=0.0)\n    Background medium in which to radiate near fields to far fields. If not provided, uses free space.\nu_axis : Literal[0, 1, 2]\n    Axis along which the observation plane is oriented.\nux : Union[Tuple[float, ...], Array]\n    Local x component of wave vectors on the observation plane, relative to ``local_origin`` and oriented with respect to ``u_axis``, normalized by (2*pi/lambda) where lambda is the wavelength associated with the background medium.\nuy : Union[Tuple[float, ...], Array]\n    Local y component of wave vectors on the observation plane, relative to ``local_origin`` and oriented with respect to ``u_axis``, normalized by (2*pi/lambda) where lambda is the wavelength associated with the background medium.\n\nExample\n-------\n>>> monitor = Near2FarKSpaceMonitor(\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...     u_axis=2,\n...     ux=[1,2],\n...     uy=[3,4,5]\n...     )",
   "type": "object",
   "properties": {
      "type": {
         "title": "Type",
         "default": "Near2FarKSpaceMonitor",
         "enum": [
            "Near2FarKSpaceMonitor"
         ],
         "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": []
            }
         ]
      },
      "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"
         }
      },
      "fields": {
         "title": "Field Components",
         "description": "Collection of radiation vector components to store in the monitor.",
         "default": [
            "Ntheta",
            "Nphi",
            "Ltheta",
            "Lphi"
         ],
         "type": "array",
         "items": {
            "enum": [
               "Ntheta",
               "Nphi",
               "Ltheta",
               "Lphi"
            ],
            "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"
            }
         ]
      },
      "medium": {
         "title": "Background medium",
         "description": "Background medium in which to radiate near fields to far fields. If not provided, uses free space.",
         "default": {
            "name": null,
            "frequency_range": null,
            "type": "Medium",
            "permittivity": 1.0,
            "conductivity": 0.0
         },
         "allOf": [
            {
               "$ref": "#/definitions/Medium"
            }
         ]
      },
      "u_axis": {
         "title": "Observation plane axis",
         "description": "Axis along which the observation plane is oriented.",
         "enum": [
            0,
            1,
            2
         ],
         "type": "integer"
      },
      "ux": {
         "title": "Normalized kx",
         "description": "Local x component of wave vectors on the observation plane, relative to ``local_origin`` and oriented with respect to ``u_axis``, normalized by (2*pi/lambda) where lambda is the wavelength associated with the background medium.",
         "anyOf": [
            {
               "type": "array",
               "items": {
                  "type": "number"
               }
            },
            {
               "title": "Array Like",
               "description": "Accepts sequence (tuple, list, numpy array) and converts to tuple.",
               "type": "tuple",
               "properties": {},
               "required": []
            }
         ]
      },
      "uy": {
         "title": "Normalized ky",
         "description": "Local y component of wave vectors on the observation plane, relative to ``local_origin`` and oriented with respect to ``u_axis``, normalized by (2*pi/lambda) where lambda is the wavelength associated with the background medium.",
         "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",
      "u_axis",
      "ux",
      "uy"
   ],
   "additionalProperties": false,
   "definitions": {
      "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/m].  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/m",
               "type": "number"
            }
         },
         "additionalProperties": false
      }
   }
}

Fields
  • u_axis (Literal[0, 1, 2])

  • ux (Union[Tuple[float, ...], tidy3d.components.types.Array])

  • uy (Union[Tuple[float, ...], tidy3d.components.types.Array])

attribute u_axis: Literal[0, 1, 2] [Required]#

Axis along which the observation plane is oriented.

Validated by
  • check_excluded_surfaces

  • normal_dir_exists_for_surface

attribute ux: Union[Tuple[float, ...], tidy3d.components.types.Array] [Required]#

Local x component of wave vectors on the observation plane, relative to local_origin and oriented with respect to u_axis, normalized by (2*pi/lambda) where lambda is the wavelength associated with the background medium.

Validated by
  • check_excluded_surfaces

  • normal_dir_exists_for_surface

attribute uy: Union[Tuple[float, ...], tidy3d.components.types.Array] [Required]#

Local y component of wave vectors on the observation plane, relative to local_origin and oriented with respect to u_axis, normalized by (2*pi/lambda) where lambda is the wavelength associated with the background medium.

Validated by
  • check_excluded_surfaces

  • normal_dir_exists_for_surface

storage_size(num_cells: int, tmesh: tidy3d.components.types.Array) int#

Size of monitor storage given the number of points after discretization.