set_pileup_model
- sherpa.astro.ui.set_pileup_model(id, model=None) None
Include a model of the Chandra ACIS pile up when fitting PHA data.
Chandra observations of bright sources can be affected by pileup, so that there is a non-linear correlation between the source model and the predicted counts. This process can be modelled by including the
jdpileupmodel for a data set, using theset_pileup_model.- Parameters:
id (int or str, optional) – The data set containing the source expression. If not given then the default identifier is used, as returned by
get_default_id.model (an instance of the
sherpa.astro.models.JDPileupclass)
See also
delete_pileup_modelDelete the pile up model for a data set.
fitFit one or more data sets.
get_pileup_modelReturn the pile up model for a data set.
sherpa.models.model.JDPileupThe ACIS pile up model.
list_pileup_model_idsList of all the data sets with a pile up model.
set_full_modelDefine the convolved model expression for a data set.
set_modelSet the source model expression for a data set.
Notes
The function does not follow the normal Python standards for parameter use, since it is designed for easy interactive use. When called with a single un-named argument, it is taken to be the
modelparameter. If given two un-named arguments, then they are interpreted as theidandmodelparameters, respectively.This is a generic function, and can be used to model other non-linear detector effects, but at present the only available model is for the ACIS pile up provided by the jdpileup model.
Examples
Plot up the model (an xsphabs model multiplied by a powlaw1d component) and then overplot the same expression but including the effects of pile up in the Chandra ACIS instrument:
>>> load_pha('src.pi') >>> set_source(xsphabs.gal * powlaw1d.pl) >>> plot_model() >>> set_pileup_model(jdpileup.jpd) >>> plot_model(overplot=True)