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
jdpileup
model 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.JDPileup
class)
See also
delete_pileup_model
Delete the pile up model for a data set.
fit
Fit one or more data sets.
get_pileup_model
Return the pile up model for a data set.
sherpa.models.model.JDPileup
The ACIS pile up model.
list_pileup_model_ids
List of all the data sets with a pile up model.
set_full_model
Define the convolved model expression for a data set.
set_model
Set 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
model
parameter. If given two un-named arguments, then they are interpreted as theid
andmodel
parameters, 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)