get_bkg
- sherpa.astro.ui.get_bkg(id: IdType | None = None, bkg_id: IdType | None = None) DataPHA
Return the background for a PHA data set.
Function to return the background for a PHA data set. The object returned by the call can be used to query and change properties of the background.
- Parameters:
- Returns:
- data
aDataPHAobject
- data
- Raises:
sherpa.utils.err.ArgumentErrIf the data set does not contain a PHA data set.
sherpa.utils.err.IdentifierErrIf no data set is associated with this identifier.
See also
Examples
>>> bg = get_bkg()
>>> bg = get_bkg('flare', 2)