irfpy.util.kappa

Kappa distribution.

Code author: Yoshifumi Futaana

class irfpy.util.kappa.kappa_distribution(kappa, ni=1, Ti=11604.0, mi=1.67262192369e-27)[source]

Bases: object

Kappa distribution expressed by

\[f_i^\kappa(r,v) = \frac{n_i}{2\pi(\kappa w_{\kappa i}^2)^{3/2}} \frac{\Gamma(\kappa+1)}{\Gamma(\kappa-1/2)\Gamma(3/2)} (1+\frac{v^2}{\kappa w_{\kappa i}^2})^{-(\kappa+1)}\]

Here \(w_{\kappa i}^2=(2\kappa-3)kT_i/\kappa mi\)

In this class, use of MKSA unit system is implicitly assumed.

>>> fk2 = kappa_distribution(2)    # Returned is the function.  f(v, k=2)
>>> fk2_at0 = fk2(0)     # f(0, k=2) is returned.

Warning

Not yet fully tested.

Todo

Validate the formulation.

irfpy.util.kappa.doctests()[source]