Pi

pyvsim.MieUtils.Pi(nmax, costheta)[source]

Returns a generator for the recursive calculation of the Pi function as defined in “Hahn, D. W. Light scattering theory Department of Mechanical and Aeorospace Engineering, University of Florida, 2009”, which is:

\[\Pi_n(cos \theta) = {P_n^{(1)} (cos \theta) \over sin(\theta)}\]

Where:

\[P_n^{(1)} \]

is a Legendre polynomial

Or, in the recursive form, as shown in Maetzler (Maetzler, C. Matlab functions for Mie scattering and absorption Institute of Applied Physics, University of Bern, 2002):

\[\Pi_n = {{2n-1} \over {n-1}} cos(\theta) P_{n-1} - {n \over {n-1}} \Pi_{n-2}\]

With:

\[\Pi_{0} = 0\]\[\Pi_{1} = 1 \]
Parameters :

nmax : int

The number of coefficients to be calculated

costheta: np.array (N) :

The angles (in radians) to be used as input to the Pi function

Returns :

Pi : generator

A generator capable of creating an \((N+1)\)-sized array with the values of the \(\Pi\) function

This Page