xopto.pf.rayleigh module

class Rayleigh(gamma: float)[source]

Bases: xopto.pf.pfbase.PfBase

Rayleigh scattering phase function constructor.

Parameters

gamma (float) – Molecular anisotropy. Scattering is isotropic for gamma = 0.

Examples

Rayleigh scattering phase function for gamma [0.0, 0.1, 0.2, 0.5, 1.0].

>>> import numpy as np
>>> from matplotlib import pyplot as pp
>>>
>>> cos_theta = np.linspace(-1.0, 1.0, 1000)
>>>
>>> pp.figure()
>>> for gamma in [0.0, 0.1, 0.2, 0.5, 1.0]:
>>>     pp.semilogy(cos_theta, Rayleigh(gamma)(cos_theta), label='gamma={}'.format(gamma))
>>> pp.legend()
fastg(n: int, **kwargs)float[source]

Overloads the PfBase.fastg() method of the base class with an analytical solution.

fastgs(last: int, **kwargs)numpy.ndarray[source]

Overloads the PfBase.fastgs() method of the base class with an analytical solution.

g(n: int)float[source]

Overloads the PfBase.g() method of the base class with an analytical solution.

gs(last: int)numpy.ndarray[source]

Overloads the PfBase.gs() method of the base class with an analytical solution.