bxa.sherpa.background package

Submodules

bxa.sherpa.background.fitters module

class bxa.sherpa.background.fitters.SingleFitter(id, filename, backgroundmodel, load=False)[source]

Bases: object

id: which data id to fit

filename: prefix for where to store background information

backgroundmodel: A background model, such as ChandraBackground

load: whether the background file should be loaded now

store()[source]
tryload()[source]
fit(reinit=True, plot=False)[source]
prepare_stage(stage, prev=None, link=False)[source]
fit_stage(stage, plot=False)[source]
class bxa.sherpa.background.fitters.MultiFitter(filename, backgroundmodel, load=True)[source]

Bases: object

filename should be a text file, containing all the file names (if load=True) or storage prefixes

backgroundmodel: background model to use (e.g. ChandraBackground)

load: whether the background file should be loaded now

fit(**kwargs)[source]
fit_jointly_stage(stage, ids, plot=False)[source]
class bxa.sherpa.background.fitters.BackgroundStorage(backgroundfilename, i, load=False)[source]

Bases: object

load_rsp()[source]
load_bkg_model()[source]
store_bkg_model(stats, **kwargs)[source]
bxa.sherpa.background.fitters.robust_opt(i, params)[source]
bxa.sherpa.background.fitters.my_bkg_stat(i)[source]

bxa.sherpa.background.models module

Background models for various telescopes and instruments

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

Bases: BackgroundModel

set_filter()[source]
set_model(stage)[source]
class bxa.sherpa.background.models.SwiftXRTWTBackground(storage)[source]

Bases: SwiftXRTBackground

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

Bases: BackgroundModel

set_zero()[source]
set_filter()[source]
set_model(stage)[source]

bxa.sherpa.background.pca module

class bxa.sherpa.background.pca.PCAFitter(id=None)[source]

Bases: object

Fitter mixing PCA-based templates and gaussian lines

id: which data id to fit

filename: prefix for where to store background information

load: whether the background file should be loaded now

load(filename)[source]
decompose()[source]
calc_bkg_stat()[source]
fit(max_lines=10)[source]
class bxa.sherpa.background.pca.PCAModel(modelname, data)[source]

Bases: object

calc(p, left, right, *args, **kwargs)[source]
startup(*args)[source]
teardown(*args)[source]
guess(dep, *args, **kwargs)[source]
bxa.sherpa.background.pca.auto_background(id, max_lines=10)[source]

Automatically fits background id based on PCA-based templates, and additional gaussian lines as needed by AIC.

bxa.sherpa.background.pca.get_identity_response(i)[source]
bxa.sherpa.background.pca.get_unit_response(i)[source]

bxa.sherpa.background.xmm module

bxa.sherpa.background.xmm.get_embedded_file(filename)[source]

Gets the path of a file in the same folder as this script

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]
bxa.sherpa.background.xmm.get_mos_bkg_model_cached(i, galabs)[source]
bxa.sherpa.background.xmm.get_pn_bkg_model_cached(i, galabs)[source]

Module contents