get_dims
- sherpa.astro.ui.get_dims(id: IdType | None = None, filter=False)
Return the dimensions of the data set.
- Parameters:
- id
int,str,orNone,optional The data set. If not given then the default identifier is used, as returned by
get_default_id.- filterbool,
optional If
Truethen apply any filter to the data set before returning the dimensions. The default isFalse.
- id
- Returns:
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)