Hi hepcatjk,

first of all: Welcome at CelestialMatters (CM)!

next: for the less initiated readers, let me do a little translation listing of the many acronyms in your post

:

**CS** = Cornette & Shanks *Physically reasonable analytic expression for the*

single-scattering phase function, APPLIED OPTICS / Vol. 31, No. 16 / 1 June 1992. While my lab pays for access to this journal, it is unfortunately not OpenAccess...Hence I am not allowed to quote the link.

**HG** = Henyey &Greenstein **CDF** = Cumulative Distribution Function-
**PDF** = Probability Density Function

see e.g. also here: viewtopic.php?f=11&t=537

hepcatjk wrote:

I found the writeup on Cornette Shanks vs HG very enlightening, especially the maple program.

It helped fully understand how to treat the g parameter.

I guess you meant this:

http://www.celestialmatters.org/users/t ... s2/out.pdf**Quote:**

What I was wondering is how to calculate the CFD for it, so it can be importance sampled

Your suppose to take the integral of the PDF, but I didn't have access to Maple and it looks nasty

For example for HG:

The CDF is Mu = (1/2g)(1+g^2 - (1-g^2 / 1 + 2gP-g)^2 )

Which is derived from P(mu) = 1/2 int -1 to mu ( (1-g^2) dmu / (1+g^2-2g mu)^3/2 )

So I assume to solve this for CS one would have to

P(mu) = 1/2 int -1 to mu ( 1.5 * (1.0 - g2) * (1.0 + mu* mu) /((2.0 + g2) * pow(1.0 + g2 - 2.0 * g * mu, 1.5)) )

right?

Give me a little more time. I'll check it with Maple.

There are also many resources in the net about how to calculate CDF from PDF in general. E.g.

http://math.ucsd.edu/~tlaetsch/pdf/10C_CDFtoPDF.pdfor Google for "relation between pdf and cdf"

Roughly: d/dx CDF(x) = PDF(x)

Fridger