- sherpa.astro.ui.ignore_bad(id=None, bkg_id=None)
Exclude channels marked as bad in a PHA data set.
Ignore any bin in the PHA data set which has a quality value that is larger than zero.
id (int or str, optional) – The data set to change. If not given then the default identifier is used, as returned by
bkg_id (int or str, optional) – The identifier for the background (the default of
Noneuses the first component).
sherpa.utils.err.DataErr – If the data set has no quality array.
Exclude data from the fit.
Include data in the fit.
Apply a set of quality flags to a PHA data set.
load_phacommand - and others that create a PHA data set - do not exclude these bad-quality bins automatically.
If the data set has been grouped, then calling
ignore_badwill remove any filter applied to the data set. If this happens a warning message will be displayed.
Remove any bins that are marked bad in the default data set:
>>> load_pha('src.pi') >>> ignore_bad()
The data set ‘jet’ is grouped, and a filter applied. After ignoring the bad-quality points, the filter has been removed and will need to be re-applied:
>>> group_counts('jet', 20) >>> notice_id('jet', 0.5, 7) >>> get_filter('jet') '0.496399998665:7.212399959564' >>> ignore_bad('jet') WARNING: filtering grouped data with quality flags, previous filters deleted >>> get_filter('jet') '0.001460000058:14.950400352478'