get_bkg_model
- sherpa.astro.ui.get_bkg_model(id: IdType | None = None, bkg_id: IdType | None = None)
Return the model expression for the background of a PHA data set.
This returns the model expression for the background of a data set, including the instrument response (e.g. ARF and RMF), whether created automatically or explicitly, with
set_bkg_full_model.Changed in version 4.15.1: The response will now be taken from the source dataset if the background has no response.
- Parameters:
- Returns:
This can contain multiple model components and any instrument response. Changing attributes of this model changes the model used by the data set.
- Return type:
instance
See also
delete_bkg_modelDelete the background model expression for a data set.
get_bkg_sourceReturn the model expression for the background of a PHA data set.
list_model_idsList of all the data sets with a source expression.
set_bkg_modelSet the background model expression for a PHA data set.
set_bkg_full_modelDefine the convolved background model expression for a PHA data set.
show_bkg_modelDisplay the background model expression for a data set.
Examples
Return the background model expression for the default data set, including any instrument response:
>>> bkg = get_bkg_model()