ADDCRS
Name
addcrs
Purpose
Add synthetic cosmic ray strikes to a CCD image.
Description
Using an estimate of mean strikes on the image, an actual strike
count is created as a Poisson deviate.
Based on a normal distribution of maximum pixel intensity,
the strikes are then added to the ccd image array.
It is possible to save the struck image array as a fits file.
Category
CCD data processing
Calling Sequence
addcrs,meancrs,mincount,maxcount,img
Inputs
meancrs - Average number of strikes to add per image.
mincount - lowest DN for cosmic ray strikes
maxcount - highest DN for cosmic ray strikes
seed - seed value for random number generation
img - 2-D image array to be modified
Optional Input Parameters
Keyword Input Parameters
OVERSCAN - number of columns in overscan to skip, ie, if img is
m X n, the region from [0:m-overscan-1, 0:n-1]
is where the cosmic rays will be added.
FITSFN - full path name to write FITS file of the modified img.
DEBUG - Flag, if set, turn on debug output.
Outputs
img 2-D image array to be modified
Keyword Output Parameters
CRSOUT - Output, number of cosmic rays added to the image.
Common Blocks
Side Effects
Restrictions
Procedure
Modification History
2006/07/02, Written, Peter L. Collins, Lowell Observatory
(as addcrstrikes,pro, for avgclip testing)
2006/07/10, PLC, extend pixel size of cr strike for visibility in itool.
(keyword PIXEXT)
2006/07/11, changed name and dns values chosen by uniform draw.
2006/07/13, PLC, add keyword CRSOUT.
2006/07/14, MWB, final cleanup and addition to library