- sherpa.astro.ui.get_exposure(id=None, bkg_id=None)¶
Return the exposure time of a PHA data set.
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.
exposure – The exposure time, in seconds.
- Return type
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)