Last modified: December 2020

URL: https://cxc.cfa.harvard.edu/sherpa/ahelp/ignore_bad.html
Jump to: Description · Examples · PARAMETERS · Notes · Bugs · See Also


AHELP for CIAO 4.13 Sherpa v1

ignore_bad

Context: filtering

Synopsis

Exclude channels marked as bad in a PHA data set.

Syntax

ignore_bad(id=None, bkg_id=None)

id - int or str, optional
bkg_id - int or str, optional

Description

Ignore any bin in the PHA data set which has a quality value that is larger than zero.


Examples

Example 1

Remove any bins that are marked bad in the default data set:

>>> load_pha('src.pi')
>>> ignore_bad()

Example 2

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.540199995041:7.869399785995'
>>> ignore_bad('jet')
WARNING: filtering grouped data with quality flags, previous filters deleted
>>> get_filter('jet')
'0.200749998679:14.417500019073'

PARAMETERS

The parameters for this function are:

Parameter Definition
id The data set to change. If not given then the default identifier is used, as returned by `get_default_id` .
bkg_id The identifier for the background (the default of none uses the first component).

Notes

The `load_pha` command - 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_bad` will remove any filter applied to the data set. If this happens a warning message will be displayed.


Bugs

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

See Also

data
group, group_adapt, group_adapt_snr, group_bins, group_counts, group_snr, group_width, set_quality
filtering
get_filter, ignore, ignore2d, ignore2d_id, ignore_id, notice, notice2d, notice2d_id, notice_id, show_filter