Module legendre

Module legendre 

Source
Expand description

Associated Legendre functions of integer degree and the vector-wave angular functions pi and tau, with analytic argument derivatives. Real-degree Legendre values come from the Ferrers functions in ferrers.

Upstream: treams.special.lpmv, pi_fun and tau_fun (_waves.pyx).

StructsΒ§

AngularResidual
What angular_array saves for its pullback: the degrees, orders, arguments and function. The pullback recomputes the local derivatives.

EnumsΒ§

Angular
Associated Legendre polynomial or one of the two vector-wave angular functions.

ConstantsΒ§

PARALLEL πŸ”’
Elementwise angular evaluations and pullbacks run in parallel from this many elements.

FunctionsΒ§

angular_array
Broadcast angular values and a complex-argument residual; labels stay fixed.
angular_jet πŸ”’
The angular function kind of degree l and order m at z, with its derivative for N = 1, after checking the labels and the argument.
angular_jets πŸ”’
The angular functions [pi, tau] from the polar cosine and sine, with the sine factor kept explicit at the poles.
angular_legendre πŸ”’
F_l^m(z) sin(theta)^power: the Legendre function for power = |m|, and pi / m for power = |m| - 1.
angular_value
Angular function at a cosine argument; real Legendre values also accept real degrees.
legendre_factor πŸ”’
Associated Legendre polynomial F_l^m after factoring out sin(theta)^|m|.
legendre_factor_pair πŸ”’
F_l^m and F_(l-1)^m of legendre_factors, with F_(l-1)^m = 0 for l = |m| and both zero for |m| > l.
legendre_factors πŸ”’
Associated Legendre functions F_l^m after factoring out sin(theta)^|m|, visited for every l in |m|..=max in order from one run of the degree recurrence. Keeping the factor explicit avoids 0/0 and cancellation in angular functions near the poles.
lpmv_real
Associated Legendre function P_degree^order(x) of a real argument, as a real value.
polar_trig πŸ”’
[cos(theta), sin(theta)] with their derivatives. The sine takes the principal branch (nonnegative real part) and is exactly zero at the poles, where theta is a floating-point multiple of PI.
polarized_angular πŸ”’
Angular factor coupling the vector spherical wave (l, m) of polarization mode_pol to a plane wave of polarization pol whose direction has the polar cosine and sine given: tau -+ pi for negative (0) or positive (1) helicity; in parity polarization tau for the mode’s own polarization and pi for the other. The polarization module states this rule for the vector waves themselves.
sine_power πŸ”’
sin(theta)^power = (1 - z^2)^(power / 2) at the cosine z.
tau_factor πŸ”’
tau_l^m / sin(theta)^(|m|-1) for m != 0 from one Legendre recurrence, by DLMF 14.10.5: sin(theta) tau = l cos(theta) P_l^m - (l + m) P_(l-1)^m.