NAME

xrthotpix - Search for hot and flickering pixels for XRT Photon Counting mode

USAGE

xrthotpix infile outfile [parameter = < value >]

DESCRIPTION

'xrthotpix' searches for anomalous (hot and flickering) pixels by applying statistical tests to the Swift XRT Photon Counting (PC) mode event file. The events are first binned into an image and hot pixel candidates are identified by comparing the counts in each pixel to the mean counts in the whole CCD. For each pixel, the probability for its counts to be a Poisson fluctuation of the background is computed using the incomplete Gamma function Gamma(c,b), where (c) are the counts in the pixel and (b) is the background threshold evaluated using the mean of the total counts on the CCD. The parameter 'impfact' allows the user to adjust this threshold. If the pixel probability is lower than a Poisson probability threshold (set through the parameter 'logpos'), the pixel is considered a hot pixel candidate. The hot pixel candidates are then compared to the surrounding pixels contained in a square cell. By setting the cell size (parameter 'cellsize') of order PSF core, it is possible to discriminate a hot pixel from a pixel of the X-ray source.

Flickering pixels are searched for and flagged by setting the parameter 'cleanflick' to "yes" (default). The algorithm is the same used for the hot pixel identification, but the background is the local one and is calculated in its surrounding square cell (with cell size set by the parameter 'cellsize'). If the local background is zero, the pixel is flagged as flickering if the number of counts is larger than a threshold value (set by the parameter 'bthresh').
For flickering pixels the search may be iterated by setting the parameter 'iterate' to "yes". A new set of iterations using only events with grade<=12 is performed by the task by setting the parameter 'gradeiterate' to "yes".
If the parameter 'usegoodevt' is set to "yes" (default), the task searches for hot and flickering pixels on an image composed only of events whose central pixel in the 3x3 neighborhood has a PHA value (PHAS[1]) above the threshold set by the 'xrtflagpix' task ('phas1thr' parameter).

All pixels classified as anomalous are flagged in the STATUS column of the event file as a 16-bit binary number (see the 'xrtflagpix' help). Optionally, if the parameter 'hotneigh' is set to "yes", events are also flagged if any of the 3x3 neighborhood pixels is hot or flickering. By default, the column STATUS is overwritten, however it is possible to update the column by setting the parameter 'overstatus' to 'no'. The anomalous pixels are stored as an extension in the output file. If this already exists and the parameter 'overstatus' is set to 'no', the extension is updated with the new bad pixels. If requested by the user, the bad pixel table is written to a separate output file.

PARAMETERS

infile [file name]
The name of the input event FITS file. Unix-compressed file are allowed, except when the output is set to NONE and the input file is overwritten.

outfile [file name]
Name of output event file. The value 'NONE' will cause the input file to be overwritten.

(outbpfile = DEFAULT) [file name]
Name of the output bad pixel file. If outbpfile=DEFAULT the standard naming convention is used for the output file. If outbpfile=NONE no output file is created.

(overstatus = yes) [boolean]
If overstatus=yes the STATUS column is overwritten. If overstatus=no the STATUS column is updated with the new bad pixels.

(usegoodevt = yes)
Use only events with PHA of the central pixel (PHAS[1]) greater than the threshold set by the 'xrtflagpix' task.

(phamin=0) [integer]
The minimum PHA value to use in accumulating the image.

(phamax=4095) [integer]
The maximum PHA value to use in accumulating the image.

(cellsize = 3) [integer]
Search cell size in units of pixels. Must be an odd integer greater then one.

(impfac = 1000.0) [real]
Value used to compute the background level (input for the incomplete Gamma function).

(logpos = -5.3) [real]
Logarithm of the Poisson probability threshold for rejecting a pixel. Must be negative.

(bthresh = 3.) [real]
Background threshold used if the candidate flickering pixel's neighborhood has zero counts.

(cleanflick = yes) [boolean]
If set to "yes", search and flag flickering pixels.

(iterate = yes) [boolean]
If set to "yes", iterate the search of flickering pixels.

(gradeiterate = yes) [boolean]
If set to "yes", execute new iterations for flickering pixels search using only events with grade<=12.

(hotneigh = no) [boolean]
If set to "yes", events are also flagged if any of the 3x3 neighborhood pixels is hot or flickering.

(chatter = 5) [integer]
Chatter Level (min=0, max=5)

(clobber = no) [boolean]
If set to "yes", overwrite existing output file (if outfile!=NONE).

(history = yes) [boolean]
If set to "yes", write HISTORY keywords in the output file.

EXAMPLES

  1. Look for hot pixels in the Photon Counting mode event file named sw00111622000xpcw4po_uf.evt

     > xrthotpix infile=sw00111622000xpcw4po_uf.evt  outfile=outfile.fits 

BUGS

SEE ALSO

LAST MODIFIED

May 2007