load_bkg_arf

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 load_arf.

Parameters:
  • id (int or str, optional) – The data set to use. If not given then the default identifier is used, as returned by get_default_id.
  • 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 TABLECrate for crates, as used by CIAO, or a list of AstroPy HDU objects.

See also

load_arf()
Load an ARF from a file and add it to a PHA data set.
load_bkg_rmf()
Load a RMF from a file and add it to the background of a PHA 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 arg parameter. If given two un-named arguments, then they are interpreted as the id and arg parameters, respectively. The remaining parameters are expected to be given as named arguments.

The minimum_energy setting of the ogip section 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.

Examples

Use the contents of the file ‘bkg.arf’ as the ARF for the background of the default data set.

>>> load_bkg_arf('bkg.arf')

Set ‘core_bkg.arf’ as the ARF for the background of data set ‘core’:

>>> load_bkg_arf('core', 'core_bkg.arf')