XBkgSpectrum¶
This is a subclass of XBinSpectrum that provides extra functionality for scaling and applying background corrections to X-ray spectrum data.
-
class
pyxsis.binspectrum.
XBkgSpectrum
(*args, backscale=1.0, **kwargs)[source]¶ Class for reading in background spectra. This is a subclass of specutils.XraySpectrum1D.
To load from a file:
XBkgSpectrum(from_file=, format=, colname=)
- from_filestr
Name of FITS file for background spectrum
- formatstr
Format of FITS file (Default: ‘chandra_hetg’ uses the ‘BACKGROUND_UP’ and ‘BACKGROUND_DOWN’ columns to read in the data)
- colnamestr
Name of FITS data column that contains the counts histogram of interest. (Default: ‘COUNTS’)
Attributes
Inherits all attributes from specutils.XraySpectrum1D
- backscalenumpy.ndarry or float
Value for scaling the background count rate to the associated source area. Defaults to 1.0
-
binned_counts
(notice=None, binning=None, use_backscale=True, **kwargs)[source]¶ Inputs
- noticendarray, dtype=bool
Defines what regions of the spectrum to notice (Default: None, uses all of the counts histogram.)
- binningndarray
Defines the binning for the spectrum, same method as XBinSpectrum. (Default: None, does not group any of the bins)
- use_backscalebool
If True, the background will be scaled using XBkgSpectrum.backscale
Returns a binned background spectrum
(bin_lo, bin_hi, bkg_counts, bkg counts_err) : astropy Quantity arrays