generate_mie_costheta

miepython.miepython_nojit.generate_mie_costheta(mu_cdf)[source]

Generate a new scattering angle using a cdf.

A uniformly spaced cumulative distribution function (CDF) is needed. New random angles are generated by selecting a random interval mu[i] to mu[i+1] and choosing an angle uniformly distributed over the interval.

Parameters:

mu_cdf – a cumulative distribution function

Returns

an array of random scattering angle cosines based on the CDF supplied.