Module expand

Module expand 

Source
Expand description

Regular spherical and cylindrical expansions of plane waves, with analytic pullbacks.

Upstream: treams.pw.to_sw, treams.pw.to_cw, and the Expand operator from a plane-wave basis to a spherical or cylindrical basis.

StructsΒ§

AngularLabels πŸ”’
Angular plane-wave coefficients depend on a mode’s label, not on its position: modes that repeat at several positions share one evaluation.
ExpansionGradient
Plane-expansion cotangents.
ExpansionResidual
What expansion saves for its pullback: its inputs. The pullback recomputes the coefficients instead of keeping a Jacobian.

FunctionsΒ§

cylindrical_angular πŸ”’
The angular factor ((i kx + ky) / sqrt(kx^2 + ky^2))^m = (i exp(-i phi))^m of the cylindrical expansion of a plane wave, i^m on the z axis.
cylindrical_coefficient πŸ”’
The coefficient of mode in the regular expansion of a unit plane wave of polarization pol, without the position phase; zero unless the labels match.
cylindrical_mode_matches πŸ”’
Whether a plane wave of axial wavenumber kz and polarization pol couples to the cylindrical mode: equal pol, a real kz, and kz within 16 ulps of the mode’s.
expansion
Expand multiple plane waves in a regular multipole basis: column j holds the amplitudes of plane wave j at the basis positions.
spherical_coefficient πŸ”’
The coefficient of mode in the regular expansion of a unit plane wave of polarization pol, without the position phase: the prefactor times exp(-i m phi) times the polarized angular function of theta.
spherical_prefactor πŸ”’
Normalization and phase i^l of the spherical expansion of a plane wave, which depend on the degree and order alone.
to_cw
One plane-to-cylindrical coefficient with exact axial-label matching.
to_sw
Spherical expansion coefficient for a unit-amplitude plane wave.