View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

CCDPROC - undoing flat field corrections

Frank Valdes wrote on Dec 03, 1997


Q:  I used the wrong flat field for some frames - how do I effectively undo
this?


A:  I assume you are asking how to undo the CCDPROC flat fielding in a
corrected image rather than returning to the raw data.  In the simple and
usual case where the incorrect flat field and the object image are the
same size you can use IMARITH.  The steps are to multiply by the
incorrect flat field, divide by the scaling factor given in the flat
field header, and remove the header keyword flagging the operation
as being done.  You can then return to CCDPROC again to apply the correct
flat field.

	cl> imarith obj * wrongflat objcor
	cl> imarith objcor / <ccdmean> objcor
	cl> hedit objcor flatcor del+ verify-

where obj is the image you want to uncorrect, wrongflat is the
incorrect flat, <ccdmean> is the value of the CCDMEAN keyword in the
flat field image header, and objcor is the fixed image.  You could do
the above steps "in-place" (i.e. modify the original object image) by
using the same image name for output as for input.  You can also do a
set of images using @lists for the input and output.

Let us know if you have questions about this.

Last post on Dec 03, 1997