PHACountsSpectrum¶
-
class
gammapy.spectrum.PHACountsSpectrum(energy_lo, energy_hi, data=None, quality=None, backscal=None, areascal=None, is_bkg=False, meta=None)[source]¶ Bases:
gammapy.spectrum.CountsSpectrumOGIP PHA equivalent
The
bkgflag controls wheater the PHA counts spectrum represents a background estimate or not (this slightly affectes the FITS header information when writing to disk).Parameters: energy_lo :
QuantityLower bin edges of energy axis
energy_hi :
QuantityUpper bin edges of energy axis
data :
array, list, optionalCounts
quality : int, array-like, optional
Mask bins in safe energy range (1 = bad, 0 = good)
backscal : float, array-like, optional
Background scaling factor
areascal : float, array-like, optional
Area scaling factor
is_bkg : bool, optional
Background or soure spectrum, default: False
meta : dict, optional
Meta information, TODO: add link where possible meta info is listed
Attributes Summary
arffileARF associated with the observations bins_in_safe_rangeIndices of bins within the energy thresholds bkgfileBackground PHA files associated with the observations counts_in_safe_rangeCounts with bins outside safe range set to 0 hi_thresholdHigh energy threshold of the observation (upper bin edge) livetimelo_thresholdLow energy threshold of the observation (lower bin edge) obs_idoffsetphafilePHA file associated with the observations rmffileRMF associated with the observations Methods Summary
from_hdulist(hdulist[, hdu1, hdu2])Read read(filename[, hdu1, hdu2])rebin(parameter)Rebin to_sherpa(name)Return DataPHAto_table()Write Attributes Documentation
-
arffile¶ ARF associated with the observations
-
bins_in_safe_range¶ Indices of bins within the energy thresholds
-
bkgfile¶ Background PHA files associated with the observations
-
counts_in_safe_range¶ Counts with bins outside safe range set to 0
-
hi_threshold¶ High energy threshold of the observation (upper bin edge)
-
livetime¶
-
lo_threshold¶ Low energy threshold of the observation (lower bin edge)
-
obs_id¶
-
offset¶
-
phafile¶ PHA file associated with the observations
-
rmffile¶ RMF associated with the observations
Methods Documentation
-
rebin(parameter)[source]¶ Rebin
see
CountsSpectrum, this function treats the quality vector correctly
-