Empirical background models¶

The advantages of using background spectral models is that more information can be extracted from low-count data, as correlations between bins and instrument behaviours are known.

The bxa.sherpa.background module includes hand-crafted models to empirically describe the background spectra for Chandra/ACIS, XMM/EPIC, Swift/XRT. This requires that you extracted a background spectrum (they are not ab initio predictions).

A mixture of powerlaws, gaussian lines and mekals are fitted to the background. The best-fit model can then be used to fit the source. Optionally, background parameters (such as the overall normalisation) can be varied with the source fit.

You may also be interested in the PCA models for Chandra/ACIS, XMM/EPIC, Swift/XRT, NuSTAR/FPMA, RXTE observations.

Empirical models for XMM/EPIC¶

An example for XMM is available at https://github.com/JohannesBuchner/BXA/blob/master/examples/sherpa/xmm/fit.py

bxa.sherpa.background.xmm.get_pn_bkg_model(i, galabs, fit=False)[source]
bxa.sherpa.background.xmm.get_mos_bkg_model(i, galabs, fit=False)[source]

The XMM model was developed by Richard Sturm at MPE. The citation is Maggi P., et al., 2014, A&A, 561, AA76.

Empirical models for Swift/XRT and Chandra/ACIS¶

An example for Swift/XRT is available at https://github.com/JohannesBuchner/BXA/blob/master/examples/sherpa/swift/fit.py

First define which background you want to use and where you want to store intermediate results:

# where to store intermediary fit information
# usually the name of the spectral file
filename = 'mybackgroundspecfile'

# create a fitter for the desired type of spectrum
from bxa.sherpa.background.models import SwiftXRTBackground, ChandraBackground
from bxa.sherpa.background.fitter import SingleFitter
fitter = SingleFitter(id, filename, SwiftXRTBackground)
# or
fitter = SingleFitter(id, filename, ChandraBackground)


Finally, run the background fit:

fitter.fit(plot=True)


The Chandra model was developed by Johannes Buchner at MPE. The citation is Buchner et al., 2014, A&A, 564A, 125.

The Swift/XRT model was developed by Johannes Buchner at PUC. The citation is Buchner et al., 2017, MNRAS, 464, 4545.

class bxa.sherpa.background.models.SwiftXRTBackground(storage)[source]
class bxa.sherpa.background.models.SwiftXRTWTBackground(storage)[source]
class bxa.sherpa.background.models.ChandraBackground(storage)[source]