xopto.pf.gk2 module¶
- class Gk2(gg1: float, a1: float, gg2: float, a2: float, b: float)[source]¶
Bases:
xopto.pf.pfbase.PfBase
Two-term Gegenbauer Kernel scattering phase function constructor.
- Parameters
gg1 (float) – Parameter of the first Gegenbauer kernel phase function (
).
a1 (float) – Parameter of the first Gegenbauer kernel phase function (
). A value of 0.5 produces the Henyey-Greenstein scattering phase function.
gg2 (float) – Parameter of the second Gegenbauer kernel phase function (
).
a2 (float) – Parameter of the second Gegenbauer kernel phase function (
). A value of 0.5 produces the Henyey-Greenstein scattering phase function.
b (float) – Contribution of the second Gk.
Examples
Two-term 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, Gk2(gg, 0.5, -gg, 0.5, 0.1)(cos_theta), label='a=0.5, gg={}'.format(gg)) >>> pp.legend()