- sherpa.astro.ui.load_bkg_arf(id, arg=None)
Load an ARF from a file and add it to the background of a PHA data set.
Load in the ARF to the background of the given data set. It is only for use when there is only one background component, and one response, for the source. For multiple backgrounds or responses, use
arg – Identify the ARF: a file name, or a data structure representing the data to use, as used by the I/O backend in use by Sherpa: a
TABLECratefor crates, as used by CIAO, or a list of AstroPy HDU objects.
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
argparameter. If given two un-named arguments, then they are interpreted as the
argparameters, respectively. The remaining parameters are expected to be given as named arguments.
minimum_energysetting of the
ogipsection of the Sherpa configuration file determines the behavior when an ARF with a minimum energy of 0 is read in. The default is to replace the 0 by the value 1e-10, which will also cause a warning message to be displayed.
Use the contents of the file ‘bkg.arf’ as the ARF for the background of the default data set.
Set ‘core_bkg.arf’ as the ARF for the background of data set ‘core’:
>>> load_bkg_arf('core', 'core_bkg.arf')