    Return the response information applied to a PHA data set.

get_response(id=None, bkg_id=None)
id - int or str, optional
bkg_id - int or str, optional

For a PHA data set, the source model - created by `set_model`

- is modified by a model representing the instrumental effects - such as the effective area of the mirror, the energy resolution of the detector, and any model of pile up - which is collectively known as the instrument response. The

`get_response` function returns the instrument response model.

Create an empty PHA data set, load in an ARF and RMF, and then retrieve the response. The response is then used to model the instrument response applied to a `powlaw1d` model component, along with a constant component ( `bgnd` ) that does not "pass through" the instrument response:

>>> dataspace1d(1, 1024, 1, dstype=DataPHA) >>> load_arf('src.arf') >>> load_rmf('src.rmf') >>> rsp = get_response() >>> set_full_model(rsp(powlaw1d.pl) + const1d.bgnd)

PARAMETERS

The parameters for this function are:

Parameter
Definition
id
The data set containing the instrument response. If not given then the default identifier is used, as returned by

`get_default_id` .
bkg_id
If given, return the response for the given background component, rather than the source.

The return value from this function is:

The return value depends on whether an ARF, RMF, or pile up model has been associated with the data set.

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

December 2023