get_dims¶
- sherpa.ui.get_dims(id=None, filter=False)¶
Return the dimensions of the data set.
- Parameters
id (int or str, optional) – The data set. If not given then the default identifier is used, as returned by get_default_id.
filter (bool, optional) – If
Truethen apply any filter to the data set before returning the dimensions. The default isFalse.
- Returns
dims
- Return type
a tuple of int
See also
ignoreExclude data from the fit.
sherpa.astro.ui.ignore2dExclude a spatial region from an image.
noticeInclude data in the fit.
sherpa.astro.ui.notice2dInclude a spatial region of an image.
Examples
Display the dimensions for the default data set:
>>> print(get_dims())
Find the number of bins in dataset ‘a2543’ without and with any filters applied to it:
>>> nall = get_dims('a2543') >>> nfilt = get_dims('a2543', filter=True)