comnum.Fso#

class comnum.Fso(loss_db=0.0, *, turbulence=None, scintillation_index=None, pointing=None)#

A free-space optical link: a deterministic loss, turbulence and pointing errors, the gain of the intensity h = h_l h_a h_p.

Parameters:
  • loss_db (float) – the loss of the weather and of the geometry (dB).

  • turbulence (GammaGamma | str | None) – a gamma–gamma model, "lognormal" (with scintillation_index), "negative-exponential", or None.

  • scintillation_index (float | None) – the scintillation index of the log-normal model.

  • pointing (PointingError | None) – the pointing errors.

Raises:

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

Examples

>>> import comnum
>>> link = comnum.Fso(3.0, turbulence=comnum.GammaGamma.from_rytov(1.0))
>>> h = link.gains(100_000, comnum.Rng(1))
>>> round(float(h.mean()), 2)  # 10^(-0.3), the turbulence of unit mean
0.5
gains(n, rng)#

Independent draws of the gain of the intensity, one per frame.

Parameters:
  • rng (Rng) – the generator.

  • n (int) – the number of draws.

Returns:

(n,) (float64).

Return type:

numpy.ndarray

Raises:

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

scintillation_index()#

The scintillation index of the turbulence.

Returns:

the scintillation index.

Return type:

float