cleansis -- Detect anomalous ASCA SIS pixel values and output a cleaned event file with an appended 'hot pixel' extension.
cleansis datafile outfile cellsize logprob bthresh phamin phamax [options]
This task reads an SIS event file and writes out a new file containing events only from pixels which pass a set of statistical tests. These tests are applied to an internal image generated by cleansis of each CCD chip. The anomalous pixel locations and counts are written to a "hot pixel" extension appended to the cleaned file.
Anomalous pixels in the chip images are searched for in two step. First, the counts in each pixel are first compared to the mean counts in the chip. "Hot" pixels with improbable counts (based on the PSF) are rejected. Next, the counts in each "test" pixel are compared to the surrounding (cellsize X cellsize) pixels. Test pixels for which the Poisson probability exceeds the threshold given by "logprob" are also rejected ("flickering pixels"). In the cases for which the surrounding pixels yield zero counts, the zero background threshold given by "bthresh" is applied. A PHA cut ( >= phamin, <= phamax) is applied to the events used in making the chip image (but not the filtered events!).
A good starting value for "logprob" is log(1/chipsize) ~= -5.25; for "cellsize" a reasonable number a timely search is 1/4 PSF core ~= 5 pixels. For these values a "bthresh" of 3 is safe, a lower threshold can be set using the expected background rate.
The Poisson search may be iterated with "iterate". (For very bright sources(~> 10) or those observation acquired using SIS Area Discrimination, this option may need to be turned off to prevent cutting out the source core).
The pixels along the edge of the chip (cellsize/2 in) may be removed after the local search with "zeroedge".
Normally, the idea is to reject the events which fall in pixels flagged as 'anomalous'. The "dirtysis" option allows the events contained in the 'anomalous' pixels to be save in the event file instead. This is useful for examining the properties of the rejected pixel events.
If "cellsize" equals zero then a simple counts per pixel cutoff is applied. Any pixels in the chip image containing more then "bthresh" counts are rejected.
1. Clean an SIS file to a threshold probability of 5.7E-6, using a 5X5 background cell, and a 3 count zero background threshold. No PHA cut.
cleansis datafile cleanfile 5 -5.25 3 0 4095
2. Same clean as above but write out the events from the rejected pixels to the output file instead.
cleansis datafile cleanfile 5 -5.25 3 0 4095 dirtysis=yes
3. Clean an SIS file to a global fixed threshold of 20 counts per pixel. Exclude PHA values greater then 500
cleansis datafile cleanfile 0  20 0 500
Warning: This is an analysis tool, not a program to run blindly: Clean, check, repeat.