yasfpy.initial_field_coefficients ================================= .. py:module:: yasfpy.initial_field_coefficients .. autoapi-nested-parse:: 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). .. rubric:: References VSWF expansions for plane-wave illumination are standard and can be found in many texts, e.g. :cite:`Mishchenko-2002-ID6`. The wavebundle-style Gaussian beam construction is adapted from CELES-style implementations :cite:`Egel-2017-ID1`. Functions --------- .. autoapisummary:: yasfpy.initial_field_coefficients.compute_initial_field_coefficients Module Contents --------------- .. py:function:: compute_initial_field_coefficients(sim) Compute incident-field VSWF expansion coefficients. :param sim: Simulation instance providing incident-field parameters (``sim.parameters.initial_field``), particle positions, and numerical truncation (``sim.numerics.lmax``). :rtype: None .. rubric:: Notes The computed coefficients are written to ``sim.initial_field_coefficients`` with shape ``(particles, nmax, channels)``. Currently supported cases: - Plane wave (default when ``beam_width`` is ``0`` or infinite) - Normal-incidence Gaussian wavebundle (finite positive ``beam_width`` and ``normal_incidence=True``) Unsupported configurations log an error.