    Return the exposure time of a PHA data set.

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

The exposure time of a PHA data set is taken from the EXPTIME keyword in its header, but it can be changed once the file has been loaded.

Return the exposure time for the default data set.

>>> t = get_exposure()

Return the exposure time for the data set with identifier 2:

>>> t2 = get_exposure(2)

Return the exposure time for the first background component of data set "core":

>>> tbkg = get_exposure('core', bkg_id=1)

PARAMETERS

The parameters for this function are:

Parameter
Definition
id
The identifier for the data set to use. If not given then the default identifier is used, as returned by

`get_default_id` .
bkg_id
Set to identify which background component to use. The default value ( none ) means that the time is for the source component of the data set.

The return value from this function is:

exposure -- The exposure time, in seconds.

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

December 2023