integrate_spectrum#

gammapy.modeling.models.integrate_spectrum(func, energy_min, energy_max, ndecade=100)[source]#

Integrate one-dimensional function using the log-log trapezoidal rule.

Internally an oversampling of the energy bins to “ndecade” is used.

Parameters:
funccallable

Function to integrate.

energy_minQuantity

Integration range minimum.

energy_maxQuantity

Integration range minimum.

ndecadeint, optional

Number of grid points per decade used for the integration. Default is 100.