NAME

uvotmodmap - correct images for modulo-8 spatial fixed-pattern noise

USAGE

uvotmodmap infile badpixfile outfile

DESCRIPTION

This tool takes an image file and matching quality image (bad pixel map) in order to correct the modulo-8 spatial fixed pattern noise. The tool outputs a corrected image file and optionally a map of the corrections. The quality image is expected to match the image file in number of extensions and dimensions of each image.

The final stage of the UVOT detector is a 256 by 256 pixel CCD. Individual events are centroided to one eighth of a physical CCD detector pixel by the onboard electronics. However, the centroiding algorithm distributes the photons unevenly within each physical CCD pixel, corresponding to 8 by 8 image pixels or a single mod-8 tile.

The tool first steps a box of size ncell across the image, and within the box a sigma clipping algorithm is used to mask out sources more significant than nsig and any surrounding pixels affected by coincidence loss. Then the average of all remaining mod-8 tiles within a sliding box of size ncell is computed and used to produce the mod-8 map.

The algorithm resamples the image to give each image pixel equal area within a mod-8 tile. For each mod-8 tile in the mod-8 map, the pixel x-boundaries are determined such that within each row of pixels the counts/unit pixel area is the same for each pixel. This is then taken as the spatial layout of the pixel x-boundaries in the same mod-8 tile in the science image and the science image is resampled to a grid of evenly spaced pixels. Then the y-boundaries of each row are determined such that each row has the same number of counts/unit pixel area. This is then taken as the spatial layout of pixel y-boundaries in the same mod-8 tile in the science image, which is then resampled to a grid of evenly spaced rows. The same procedure is then repeated with the order reversed (remapping in y followed by remapping in x) and the final corrected science image is made from an average of the two resamplings. This is to ensure that the redistribution of photons is performed in an identical fashion in x and y.

PARAMETERS

infile [filename]
Input FITS file containing images to which modulo-8 correctioed will be applied.

badpixfile [filename]
Quality image file (FITS) containing bad pixel maps corresponding to each of the images found in infile. See uvotbadpix.

outfile [filename]
Output image file name. The output file will have the same structure as the input file.

mod8file [filename]
Mod8Map output image file name.

mod8product [boolean]
If mod8product=yes, then write out Mod8Map. If mod8product=no, then do not write out Mod8Map.

nsig [integer]
Significance level for sigma clipping. Suggested value 3.

ncell [integer]
Size of sliding box in units of 8 pixels. Suggested value 16.

subimage [boolean]
Apply correction to only part of the input image? The xmin/xmax/ymin/ymax parameters are only prompted for if subimage=yes.

xmin [integer]
Sub-image X min.

xmax [integer]
Sub-image X max.

ymin [integer]
Sub-image Y min.

ymax [integer]
Sub-image Y max.

(clobber = no) [boolean]
Control whether existing output files will be overwritten.

(history = yes) [boolean]
If history=YES, then a set of HISTORY keywords will be written to the header of the output file to record the task parameters.

(chatter = 1) [integer] <1-5>
Standard HEAdas chatter parameter.

EXAMPLES

Here is a typical uvotmodmap run:

      uvotmodmap infile=input.fits badpixfile=quality.fits outfile=output.fits

Alternatively, you could just run uvotmodmap and be prompted for the inputs.

SEE ALSO

uvotbadpix

LAST MODIFIED

June 2007