pymiediff.farfield.angular_scattering

pymiediff.farfield.angular_scattering#

pymiediff.farfield.angular_scattering(k0, theta, r_c, eps_c, r_s=None, eps_s=None, eps_env=1.0, backend='torch', precision='double', which_jn='stable', n_max=None) dict#

compute farfield angular scattering

this function provides autodiff compatible farfield anglar scattering calculations, they are computed using the analytical solutions provided in:

Bohren, Craig F., and Donald R. Huffman. Absorption and scattering of light by small particles. John Wiley & Sons, 2008.

Results are retured as a dictionary with keys:
  • ‘wavelength’ : evaluation wavelengths

  • ‘k0’ : evaluation wavenumbers

  • ‘theta’ : evaluation angles

  • ‘S1’ : S1 s parameter

  • ‘S2’ : S2 s parameter

  • ‘i_per’ : scattered irradiance per unit incident irradiance for perpendicular light

  • ‘i_par’ : scattered irradiance per unit incident irradiance for parallel light

  • ‘i_unpol’ : scattered irradiance per unit incident irradiance for unpolarised light

  • ‘pol_degree’ : the polarisation factor

vectorization needs to follow the conventions (see _broadcast_mie_config() for details):
  • dimension 0: N particles to calc.

  • dimension 1: spectral dimension (k0)

  • dimension 2: mie-order

  • dimension 3: angular resulution

Parameters:
  • k0 (torch.Tensor) – evaluation wavenumbers, must be the same for all particles and Mie orders. 1D tensor of shape (N).

  • theta (torch.Tensor) – evaluation angles (rad)

  • r_c (torch.Tensor) – core radius (in nm).

  • eps_c (torch.Tensor) – permittivity of core.

  • r_s (torch.Tensor, optional) – shell radius (in nm). Defaults to None.

  • eps_s (torch.Tensor, optional) – permittivity of shell. Defaults to None.

  • eps_env (float, optional) – permittivity of environment. Defaults to 1.0.

  • backend (str, optional) – backend to use for spherical bessel functions. Either ‘scipy’ or ‘torch’. Defaults to ‘scipy’.

  • precision (str, optional) – has no effect on the scipy implementation.

  • which_jn (str, optional) – only for “torch” backend. Which algorithm for j_n to use. Either ‘stable’ or ‘fast’. Defaults to ‘stable’.

  • n_max (int, optional) – highest order to compute. Defaults to None.

Returns:

dict containing all angular scattering results for all wavenumbers and angles

Return type:

dict