pymiediff.Particle.get_mie_coefficients

pymiediff.Particle.get_mie_coefficients#

Particle.get_mie_coefficients(k0: Tensor, return_internal=False, **kwargs) dict#

Compute Mie coefficients for the particle.

Parameters:
  • k0 (torch.Tensor) – Evaluation wavenumbers (rad nm^-1). The tensor is moved to the particle’s device internally.

  • return_internal (bool, optional) – If True also return the internal Mie coefficients (c_n, d_n, f_n, g_n, v_n, w_n). Default is False.

  • **kwargs (dict) – Additional keyword arguments passed to pymiediff.coreshell.mie_coefficients(). Typical options include n_max to manually set the truncation order.

Returns:

Dictionary containing the external Mie coefficients and related parameters. Keys include:

  • a_n : external electric Mie coefficient

  • b_n : external magnetic Mie coefficient

  • k0 : evaluation wavenumbers

  • k : wavenumbers in the host medium

  • n : Mie orders

  • n_max : maximum Mie order used

  • r_c : core radius

  • r_s : shell radius (or core radius for homogeneous particles)

  • eps_c : core permittivity spectrum

  • eps_s : shell permittivity spectrum

  • eps_env : environmental permittivity spectrum

  • n_c : core refractive index

  • n_s : shell refractive index

  • n_env : environmental refractive index

If return_internal is True, the dictionary also contains:

  • c_n : internal magnetic Mie coefficient (core)

  • d_n : internal electric Mie coefficient (core)

  • f_n : internal magnetic Mie coefficient - first kind (shell)

  • g_n : internal electric Mie coefficient - first kind (shell)

  • v_n : internal magnetic Mie coefficient - second kind (shell)

  • w_n : internal electric Mie coefficient - second kind (shell)

Return type:

dict

Notes

The Mie series truncation follows the Wiscombe criterion (Wiscombe, Appl. Opt. 19, 1505‑1509 (1980)). The helper function _squeeze_dimensions removes singleton dimensions for a single‑particle calculation.