get_dims¶
-
sherpa.astro.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
True
then apply any filter to the data set before returning the dimensions. The default isFalse
.
Returns: dims
Return type: a tuple of int
See also
ignore()
- Exclude data from the fit.
sherpa.astro.ui.ignore2d()
- Exclude a spatial region from an image.
notice()
- Include data in the fit.
sherpa.astro.ui.notice2d()
- Include 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)