pymiediff.Particle.get_nearfields#
- Particle.get_nearfields(k0: Tensor, r_probe: Tensor, **kwargs) dict#
Compute electric and magnetic near-fields at probe positions
- Parameters:
k0 (torch.Tensor) – Evaluation wavenumbers (rad nm^-1). Will be cast to the particle’s device automatically.
r_probe (torch.Tensor) – Cartesian probe positions with shape
(..., 3)where the last dimension indexes thex, y, zcoordinates.**kwargs (dict) – Additional keyword arguments passed to
pymiediff.coreshell.nearfields(). The illumination amplitude is fixed toE_0 = 1.
- Returns:
Dictionary containing the fields:
E_storch.TensorScattered electric field at each probe position.
H_storch.TensorScattered magnetic field at each probe position.
E_ttorch.TensorTotal electric field at each probe position (scat+inc).
H_ttorch.TensorTotal magnetic field at each probe position (scat+inc).
E_itorch.TensorIncident electric field at each probe position.
H_itorch.TensorIncident magnetic field at each probe position.
Any extra entries returned by
nearfieldsare also included.- Return type:
dict
Notes
The method internally calls
pymiediff.coreshell.nearfields(), handling material permittivities and radius selection. For a single-particle calculation the singleton particle dimension is squeezed from the output.