eblur / pyxsis

Python code for manipulating high resolution X-ray spectra
GNU Lesser General Public License v3.0
9 stars 1 forks source link

Background functionality added #10

Closed eblur closed 7 years ago

eblur commented 7 years ago

Added a BkgSpectrum class that will read in the 'BACKGROUND_UP' and 'BACKGROUND_DOWN' fields of an HETG spectrum. It also handles the 'BACKSCAL' parameter (in the fits header).

BkgSpectrum.bin_bkg will deal with notice and binning arrays.

Spectrum.assign_bkg allows one to assign a BkgSpectrum to a Spectrum object. From there forward, Spectum.bin_countswill use the keywords bkgsub and usebackscal to decide how to manage the background. These two keywords are passed through by the plotting functions.