get_analysis
- sherpa.astro.ui.get_analysis(id: IdType | None = None) str
Return the units used when fitting spectral data.
- Parameters:
- id
int,str,orNone,optional The data set to query. If not given then the default identifier is used, as returned by
get_default_id.
- id
- Returns:
- setting{ ‘channel’, ‘energy’, ‘wavelength’ }
The analysis setting for the data set.
- Raises:
sherpa.utils.err.ArgumentErrIf the data set does not contain PHA data.
sherpa.utils.err.IdentifierErrIf the
idargument is not recognized.
See also
get_default_idReturn the default data set identifier.
set_analysisChange 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'