get_analysis¶
-
sherpa.astro.ui.
get_analysis
(id=None)¶ Return the units used when fitting spectral data.
Parameters: id (int or str, optional) – The data set to query. If not given then the default identifier is used, as returned by get_default_id.
Returns: setting – The analysis setting for the data set.
Return type: { ‘channel’, ‘energy’, ‘wavelength’ }
Raises: sherpa.utils.err.ArgumentErr
– If the data set does not contain PHA data.sherpa.utils.err.IdentifierErr
– If the id argument is not recognized.
See also
get_default_id()
- Return the default data set identifier.
set_analysis()
- Change the analysis setting.
Examples
Display the analysis setting for the default data set:
>>> print(get_analysis())
Check whether the data set labelled ‘SgrA’ is using the wavelength setting:
>>> is_wave = get_analysis('SgrA') == 'wavelength'