get_exposure

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.

Parameters:
  • id (int or str, optional) – 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 (int or str, optional) – 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.
Returns:

exposure – The exposure time, in seconds.

Return type:

number

See also

get_areascal()
Return the fractional area factor of a PHA data set.
get_backscal()
Return the area scaling of a PHA data set.
set_exposure()
Change the exposure time of a PHA data set.