Event Weighting and Spectrum Definitions

Reference/API

pyirf.spectral Module

Functions and classes for calculating spectral weights

Functions

calculate_event_weights(true_energy, ...)

Calculate event weights

Classes

PowerLaw(normalization, index[, e_ref])

A power law with normalization, reference energy and index.

LogParabola(normalization, a, b[, e_ref])

A log parabola flux parameterization.

PowerLawWithExponentialGaussian(...)

A power law with an additional Gaussian bump.

TableInterpolationSpectrum(energy, flux[, ...])

Interpolate flux points to obtain a spectrum.

Variables

POINT_SOURCE_FLUX_UNIT

Unit of a point source flux

DIFFUSE_FLUX_UNIT

Unit of a diffuse flux

CRAB_HEGRA

Power Law parametrization of the Crab Nebula spectrum as published by HEGRA

CRAB_MAGIC_JHEAP2015

Log-Parabola parametrization of the Crab Nebula spectrum as published by MAGIC

PDG_ALL_PARTICLE

All particle spectrum

IRFDOC_PROTON_SPECTRUM

Proton spectrum definition defined in the CTA Prod3b IRF Document

IRFDOC_ELECTRON_SPECTRUM

Electron spectrum definition defined in the CTA Prod3b IRF Document

DAMPE_P_He_SPECTRUM

Interpolate flux points to obtain a spectrum.