- sherpa.astro.ui.load_bkg_rmf(id, arg=None)¶
Load a RMF from a file and add it to the background of a PHA data set.
Load in the RMF 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 RMF: a file name, or a data structure representing the data to use, as used by the I/O backend in use by Sherpa: a
RMFCrateDatasetfor crates, as used by CIAO, or an AstroPy
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 RMF 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.rmf’ as the RMF for the background of the default data set.
Set ‘core_bkg.rmf’ as the RMF for the background of data set ‘core’:
>>> load_bkg_arf('core', 'core_bkg.rmf')