pyrt.construct_henyey_greenstein#
- pyrt.construct_henyey_greenstein(asymmetry_parameter, scattering_angles)[source]#
Construct a Henyey-Greenstein phase function.
- Parameters:
asymmetry_parameter (float) – The Henyey-Greenstein asymmetry parameter. Must be between -1 and 1.
scattering_angles (ArrayLike) – 1-dimensional array of scattering angles [degrees].
- Returns:
1-dimensiona phase function corresponding to each value in
scattering_angles.- Return type:
np.ndarray
Notes
The Henyey-Greenstein phase function (per solid angle) is defined as
\[p(\theta) = \frac{1}{4\pi} \frac{1 - g^2} {[1 + g^2 - 2g \cos(\theta)]^\frac{3}{2}}\]where \(p\) is the phase function, \(\theta\) is the scattering angle, and \(g\) is the asymemtry parameter.
Warning
The normalization for the Henyey-Greenstein phase function is not the same as for a regular phase function. For this phase function,
\[\int_{4\pi} p(\theta) = 1\]not 4 \(\pi\)! To normalize it simply multiply the output by 4 \(\pi\).
Examples
Construct a Henyey-Greenstein phase function.
>>> import numpy as np >>> import pyrt >>> scattering_angles = np.arange(181) >>> g = 0.5 >>> hg_pf = pyrt.construct_henyey_greenstein(g, scattering_angles) >>> hg_pf.shape (181,)