_pi_tauο
- miepython.mie_jit._pi_tau(mu, pi, tau)[source]ο
Compute the Mie scattering functions Ο_n and Ο_n for given cosine angles.
This function fills the pre-allocated arrays pi and tau with values of the Mie scattering functions for a given mu = cosπ. The function uses the recurrence relations for the associated Legendre polynomials of the first kind P_n^1. The recurrence relations ensure numerical stability and avoids calling scipi.special.lpmv(1, n, cosπ) for each n.
pi and tau are zero-based arrays and therefore
pi[n-1] = π_n(cosπ) = P_n^1(cosπ) / sinπ
tau[n-1] = π_n(cosπ) = d/dπ P_n^1(cosπ)`.
- Parameters:
mu (float) β The cosine of the scattering angle, cos(π).
pi (numpy.ndarray) β A pre-allocated array to store pi_n values.
tau (numpy.ndarray) β A pre-allocated array to store tau_n values.
- Returns:
nothing. pi and tau are modified