comnum.GammaGamma#

class comnum.GammaGamma(alpha, beta)#

The gamma–gamma distribution of the intensity, of unit mean (Al-Habash, Andrews & Phillips 2001).

Parameters:
  • alpha (float) – the effective number of large-scale cells.

  • beta (float) – the effective number of small-scale cells.

Raises:

ValueError – for an invalid parameter (the message names it).

Examples

>>> import comnum
>>> g = comnum.GammaGamma.from_rytov(25.0, "plane")
>>> round(g.alpha, 2), round(g.beta, 2), round(g.scintillation_index(), 3)
(8.05, 1.03, 1.214)
static from_rytov(rytov, wave='plane')#

The parameters predicted by the Rytov variance for a negligible inner scale.

Parameters:
  • rytov (float) – σ₁².

  • wave (str) – "plane" or "spherical".

Returns:

the distribution.

Return type:

GammaGamma

Raises:

ValueError – for an invalid parameter (the message names it).

draw(n, rng)#

Independent draws of the intensity (a product of two gamma variables).

Parameters:
  • rng (Rng) – the generator.

  • n (int) – the number of draws.

Returns:

(n,) (float64).

Return type:

numpy.ndarray

Raises:

ValueError – for a negative count.

pdf(i)#

The density of the intensity.

Parameters:

i (float | array_like) – the intensities (of unit mean).

Returns:

the density, of the shape of i.

Return type:

float | numpy.ndarray

Raises:

ValueError – for values that are not real numbers.

scintillation_index()#

The scintillation index 1/α + 1/β + 1/(αβ).

Returns:

the scintillation index.

Return type:

float

alpha#

α.

Type:

float

beta#

β.

Type:

float