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
Truealso return the internal Mie coefficients (c_n,d_n,f_n,g_n,v_n,w_n). Default isFalse.**kwargs (dict) – Additional keyword arguments passed to
pymiediff.coreshell.mie_coefficients(). Typical options includen_maxto manually set the truncation order.
- Returns:
Dictionary containing the external Mie coefficients and related parameters. Keys include:
a_n: external electric Mie coefficientb_n: external magnetic Mie coefficientk0: evaluation wavenumbersk: wavenumbers in the host mediumn: Mie ordersn_max: maximum Mie order usedr_c: core radiusr_s: shell radius (or core radius for homogeneous particles)eps_c: core permittivity spectrumeps_s: shell permittivity spectrumeps_env: environmental permittivity spectrumn_c: core refractive indexn_s: shell refractive indexn_env: environmental refractive index
If
return_internalisTrue, 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_dimensionsremoves singleton dimensions for a single‑particle calculation.