crfix: Fix cosmic rays in images using cosmic ray masks

Package: crutil

Usage

crfix input output masks

Parameters

input
Input two dimensional image to be "fixed" (modified) by linear interpolation.
output
Output image. If the output image name exactly matches the input image name (including extensions) then the image will be modified in place.
crmask
Cosmic ray mask identifying the cosmic rays to be fixed. The mask values are zero for good data and non-zero for cosmic rays.

Description

The input and output images are specified by the input and output parameters. If the input and output image names are identifical (including extensions) then image is modified in place. Cosmic rays, identified in a cosmic ray mask specified by the crmask parameter, are replaced in the output image by linear interpolation along lines or columns using the nearest good pixels. The special mask name "BPM" may be used to select a mask name given in the input image header under the keyword "BPM".

Cosmic ray pixels are "fixed" by replacing them with values by linear interpolation to the nearest pixels not identified as bad. The interpolation direction is the shortest length between good pixels along columns or lines.

Examples

1. To replace cosmic rays in an image:

cl> crfix obj012 crobj012 crmask012

See also

fixpix, crmedian, crnebula, cosmicrays, credit, epix