# There are a few basic steps to the reduction process, often referred to as "OTZF": Overscan, Trim, Zero, Flat. # [ Note: We no longer need to do corrections for dark leakage, fringing, and non-uniform illuminations. # Corrections for fringing and non-uniform illuminations are only important for I (or z) band. ] # 0. Preliminary Tasks # Copy raw data to a processing directory (e.g., "proc/"). # Remove undesired images from the processing directory: pointing images, focus images, images with low flux counts, high seeing, etc. # Do your processing work below in a different directory, a directory where you place a copy of the raw data (i.e., don't overwrite the raw data). # 1. Update headers to indicate what type of image each fits file represents. hedit @bias.list ccdtype bias add+ verify- hedit @bias.list imagetype zero add+ verify- hedit @object.r.list ccdtype object add+ verify- hedit @object.r.list imagetype object add+ verify- hedit @flat.list ccdtype flat add+ verify- hedit @flat.list imagetype flat add+ verify- # 2. Combine bias images using zerocombine. task prevu=/d/crow1/tools/iraf/galphot/sep00/prevu.cl zerocombine input=@bias.list output=masterbias.fit combine=average reject=minmax ccdtype=zero process=no delete=no clobber=no # 3. Determine the overscan and trim sections. disp a023 1 implot a023 :l 1000 1100 :c 1000 1100 # [ typing 'e' twice will define a zoomed-in box and 'r' replots; I found biassec=[2150:2200,1:2048] trimsec=[55:2100,1:2048] ] # 4. Overscan-subtract and trim the flats and objects. ccdproc @flat.list ccdtype=flat fixpix=no overscan=yes trim=yes zerocor=yes darkcor=no flatcor=no biassec=[2150:2200,1:2048] trimsec=[55:2100,1:2048] zero=masterbias ccdproc @object.r.list ccdtype=object fixpix=no overscan=yes trim=yes zerocor=yes darkcor=no flatcor=no biassec=[2150:2200,1:2048] trimsec=[55:2100,1:2048] zero=masterbias # 5. Combine flats. MAKE SURE TO COMBINE SEPARATE FILTERS SEPARATELY. flatcombine input=@flat.list output=master_r_flat.fit combine=median reject=avsigclip ccdtype=flat subsets=yes process=no delete=no clobber=no scale=mode # 6. Flat-field your object frames for flats ccdproc @object.r.list ccdtype=object fixpix=no overscan=no trim=no zerocor=no darkcor=no flatcor=yes flat=master_r_flat