vector_cum_gamma

zdm.energetics.vector_cum_gamma(Eth, *params)[source]

Cumulative gamma-function luminosity function (slow, exact version).

Computes the fraction of bursts with energy above threshold Eth using an upper incomplete gamma function distribution. This version evaluates the gamma function directly using mpmath - accurate but slow.

Parameters:
  • Eth (ndarray) – Energy threshold values in erg.

  • *params (tuple) – (Emin, Emax, gamma) - minimum energy, characteristic energy, shape parameter.

Returns:

Fraction of bursts with E > Eth. Returns 1 for Eth < Emin.

Return type:

ndarray

See also

vector_cum_gamma_spline

Fast spline-interpolated version (recommended).