_D_calc_py
- miepython.mie_nojit._D_calc_py(m, x, N)[source]
Compute the logarithmic derivative of ψ_n(z) using the downwards recurrence.
D_n(z) = d[log ψ_n(z)] = ψ_n’(z)/ψ_n(z)
here ψ_n(z) is the Riccati-Bessel function of the first kind ψ_n(z)=z*j_n(z) were j_n(z) is the spherical Bessel function of order n.
The zero-based array, D[:], is shifted so that D[0] = D₁(z) = ψ₁’(z)/ψ₁(z)
Wiscombe’s criterion used to pick between the upwards and downwards recurrences from the refractive index alone. The upwards recurrence is contaminated once N passes
|mx|, which is the case for every small sphere, and it left the Mie coefficients wrong by as much as 1% near m=1. The downwards recurrence is stable everywhere, and the criterion already chose it for most large spheres, so always taking it costs little._D_upwardsis kept for comparison and testing.- Parameters:
m – the np.complex128 index of refraction of the sphere
x – the size parameter of the sphere
N – order of Ricatti-Bessel function
- Returns:
Array of logarithmic derivatives D_k(z) for k=1 to N-1.