yasfpy.initial_field_coefficients#
Initial (incident) field coefficient generation.
This module contains the implementation that used to live in yasfpy.simulation.Simulation.compute_initial_field_coefficients, extracted to keep yasfpy/simulation.py smaller.
YASF represents incident and scattered fields using a vector-spherical- wave-function (VSWF) expansion about each particle center. This module computes VSWF expansion coefficients for common incident fields (currently plane waves and a normal-incidence Gaussian-wavebundle variant).
References
VSWF expansions for plane-wave illumination are standard and can be found in many texts, e.g. [Mishchenko, 2002].
The wavebundle-style Gaussian beam construction is adapted from CELES-style implementations [Egel et al., 2017].
Functions#
Compute incident-field VSWF expansion coefficients. |
Module Contents#
- yasfpy.initial_field_coefficients.compute_initial_field_coefficients(sim)#
Compute incident-field VSWF expansion coefficients.
- Parameters:
sim – Simulation instance providing incident-field parameters (
sim.parameters.initial_field), particle positions, and numerical truncation (sim.numerics.lmax).- Return type:
None
Notes
The computed coefficients are written to
sim.initial_field_coefficientswith shape(particles, nmax, channels).Currently supported cases:
Plane wave (default when
beam_widthis0or infinite)Normal-incidence Gaussian wavebundle (finite positive
beam_widthandnormal_incidence=True)
Unsupported configurations log an error.