PyNOT : crr

This task takes an image (corrected or not) and performs a cosmic ray rejection by using a Laplacian kernel detection algorithm (van Dokkum 2001) implemented in Python as the package astroscrappy. The output of the task is a corrected image with an additional mask extension indicating which pixels have been flagged (0 if good or 1 if flagged as a cosmic ray hit).

The resulting FITS file can be inspected using the astropy command line function fitsinfo. An example of the output from pynot crr would look something like this:

%] pynot crr raw_image.fits -o cosmic_ray_corrected_image.fits > crr_processing.log
%] fitsinfo cosmic_ray_corrected_image.fits
Filename: cosmic_ray_corrected_image.fits

No. Name Ver Type Cards Dimensions Format
0 DATA 1 PrimaryHDU 493 (1024, 1024) float64
1 ERR 1 ImageHDU 495 (1024, 1024) float64
2 MASK 1 ImageHDU 20 (1024, 1024) int64

Example Syntax

pynot crr -o OUTPUT input


Full example of command line syntax:

pynot crr [-h] -o OUTPUT [-n NITER] [--gain GAIN] [--readnoise READNOISE] [--sigclip SIGCLIP] [--sigfrac SIGFRAC] [--objlim OBJLIM] [--cleantype CLEANTYPE] input



Overview of parameters

input
Input filename
--output (-o)
Output filename of cleaned image [REQUIRED]
Optional Arguments:
--niter (-n): 2
Number of iterations
--gain: None
Detector gain, e-/ADU. Read from the header by default
--readnoise: None
Detector read-out noise, e-. Read from the header by default
--sigclip: 4.5
Laplacian-to-noise limit for cosmic ray detection. Lower values will flag more pixels as cosmics
--sigfrac: 0.3
Fractional detection limit for neighboring pixels
--objlim: 5.0
Minimum contrast. Increase this value if cores of bright stars/skylines are flagged as cosmics
--cleantype: 'meanmask'
Cleaning filter (5x5): {'median', 'medmask', 'meanmask', 'idw'}, see astroscrappy for details