Data reduction II |
|
program names, file names
variable names
prompts, commands, program code
Invariably, some of the images will have pixels which have nonsensical values. This can be caused by a cosmic ray hitting the detector (especially for longer integrations), by an anomoly in the performance of a pixel in the detector, etc. In most cases this is no big deal, but if a bad pixel (ie., a pixel with a ridiculously large or small value) is near the object being observed, then it's probably worth throwing out that pixel.
Pick out troublesome pixels using the rec keyword of v:
IDLprompt> v, impackname, /rec |
IDLprompt> bpmap, impackname |
If you are dealing with a series of impacks in a single array, rather than with individiual impacks, use the following form:
IDLprompt> bpmap, impackarrname, arr=IND |
A more automated way of dealing with bad pixels is to run an N-sigma filter. The procedure nsigma is such a filter:
IDLprompt> nsigma, impackname, sig=N |
If you are dealing with a series of impacks in a single array, rather than with individiual impacks, use the following form:
IDLprompt> nsigma, impackarrname, sig=N, arr=IND |
This kind of program has its limitations, particularly in the case of two hot pixels which are adjacent (or nearly so): when nsigma comes to the first hot pixel, it will find a large mean and a large deviation in the neighbors, and so the reference pixel may not fail the filter. Also, this program runs slowly, as it must calculate statistics of a 24-member sample for each and every pixel in the image plane.
Because of its limitations, I'm not convinced that this is a worthwhile step in the process of data reduction, but the code is available if you want to use it.
Ideally, a background subtraction should result in giving near-zero values to most pixels on the array---at least, this should happen to pixels that appear to correspond to blank sky. Sometimes this doesn't happen if, for whatever reason, some overall bias was present in either the foreground or background image. You might find that the average value in the background is, for example, around 25 ADUs (the ADU is the unit a pixel value has before flux calibration), rather than around zero ADUs.
This problem can be corrected with the bkgnorm procedure:
IDLprompt> bkgnorm, impackname |
At this point bkgnorm will compute the mean of the box and, after asking you to confirm the alteration, that mean value will be subtracted from every pixel in the image plane of impackname. This alteration will then be annotated in impackname's header.
If you are dealing with a series of impacks in a single array, rather than with individiual impacks, use the following form:
IDLprompt> bkgnorm, impackarrname, arr=IND |
A final point to make is that bkgnorm reports (by printing to the command window) the RMS of the pixel values found in the box. It would be a good idea to keep a running tally of these values as you reduce the data. If the RMS values are very consistent (more to the point, if RMS2 is fairly consistent), then it doesn't matter. If RMS2 experiences significant variations between images, however, it may be necessary to make use of this information when tessellating the images.