xopto.pf.gk module¶
- class Gk(gg: float, a: float)[source]¶
Bases:
xopto.pf.pfbase.PfBase
Gegenbauer Kernel scattering phase function constructor.
- Parameters
gg (float) – Parameter of the Gegenbauer kernel phase function (
).
a (float) – Parameter of the Gegenbauer kernel phase function (
). A value of 0.5 produces the Henyey-Greenstein scattering phase function.
Examples
Gegenbauer kernel scattering phase function for gg = {0, 0.3 0.5, 0.8, 0.9, 0.95} and a=0.5.
>>> import numpy as np >>> from matplotlib import pyplot as pp >>> >>> cos_theta = np.linspace(-1.0, 1.0, 1000) >>> >>> pp.figure() >>> for gg in [0.0, 0.3, 0.5, 0.8, 0.9, 0.95]: >>> pp.semilogy(cos_theta, Gk(gg, 0.5)(cos_theta), label='a=0.5, gg={}'.format(gg)) >>> pp.legend()