pub fn expansion(
basis: impl Into<MultipoleBasis>,
vectors: Vec<[Complex; 3]>,
polarizations: Vec<u8>,
helicity: bool,
fixed_vectors: bool,
) -> Result<(DMatrix<Complex>, ExpansionResidual)>Expand description
Expand multiple plane waves in a regular multipole basis: column j holds the
amplitudes of plane wave j at the basis positions.
Spherical modes use to_sw; cylindrical modes use the coefficient of to_cw
but match axial labels within 16 ulps (a relative difference of about 3.6e-15).
With fixed_vectors, the pullback holds the wavevectors fixed and returns zero
wavevector gradients.
Upstream: the Expand operator from a plane-wave basis.