%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@% Reducing the Lockman Hole Mosaic Images 06.12.00 %@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@% Notes ----- 1. To display all 8 extensions (i.e. each of the 8 CCDs, as one Mosaic image), use "mscdisplay". This requires that you have: reset stdimage = imt4096 The displayed images will be binned up from 8k sqare to the 4096 display. (This produces some aliasing.) 2. To display an individual CCD from a given frame, use the extension number in square brackets: e.g. display dflat258[6] 3 See pg. 1 for the chip -> extension number scheme. 3. Check against Buell's notes on the web! http://www.noao.edu/noao/noaodeep/Dflat.html 4. Beware! Here there be passive voice. 5. To read off of DLT (do the following in IRAF): a) allocate mtm b) epar mscrfits (tapefil specifies the mtc number of the files you want) PACKAGE = mscred TASK = mscrfits input = mtm Input tape output = junk Output file(s) (tapefil= 114-149) Tape file list (listonl= no) List only? (shortli= yes) Short listing? (longlis= no) Long listing? (offset = 0) Offset for numbering of output disk filenames (origina= yes) Restore original file name? (mode = ql) c) deallocate Reducing (short version) -------- All tasks in xdwred.mscred. 1. Cross-talk correct all frames with ccdproc. (Necessary for calibs; could do objs later.) 2. Fix chip 5/6 of bias frames. Combine with zerocombine to make bias frame. 3. Fix chip 5/6 of dome flats. Combine with flatcombine (set ccdproc to bias subtract) for dome flat. 4. Pupil correct I, z, Bw dome flats. 5. Process object frames with ccdproc using dome flat and bias frame: xtalkco = yes oversca = yes trim = yes fixpix = yes zerocor = yes flatcor = yes 6. Make pupil template. Pupil correct I, z, Bw object frames. 7. Make fringe template. Fringe correct object frames. 8. Make sky flat. Flatten object frames. Reducing (long version; example is night 1 and night 2 of run H: 11.02.99 and 11.03.99) -------- 1. Prepare bias frames for combining. a) First you need to check chips 5 and 6 for bad regions (bias jumps). This means you need to split up the individual CCD extensions from the main bias frames ("zeros"). PACKAGE = mscred TASK = mscsplit input = zero164 List of input MEF files (output = ) List of output root names (mefext = .fits) MEF filename extension (delete = yes) Delete MEF file after splitting? (verbose= yes) Verbose? (fd1 = ) (fd2 = ) (mode = ql) b) Now you'll have, for instance zero164_1 thru zero164_8, each of which is a separate CCD. Display chips 5 and 6 and note which images have bias jumps. c) Fix the bad images with task "fixchip6". You may first have to load it with: task fixchip6=/home/deepopt/iraf/scripts/fixchip6.cl Careful here. First change the names of the bad files to include "bp" in the suffix. These will be the input files; the output files will be fixed files under the *original* name. PACKAGE = mscred TASK = fixchip6 inlist = @list.bpfix Image(s) for correction outlist = @list.bpout Output image(s) (verbose= yes) Verbose? (inimgli= tmp$cor8358l) (outimgl= tmp$cor8358m) (mode = ql) where: list.bpfix ---------- zero011bp_6.fits zero012bp_5.fits zero012bp_6.fits zero080bp_6.fits zero081bp_6.fits zero082bp_6.fits zero083bp_6.fits zero084bp_6.fits zero085bp_6.fits zero086bp_6.fits zero087bp_5.fits zero087bp_6.fits and: list.bpout ---------- zero011_6.fits zero012_5.fits zero012_6.fits zero080_6.fits zero081_6.fits zero082_6.fits zero083_6.fits zero084_6.fits zero085_6.fits zero086_6.fits zero087_5.fits zero087_6.fits d) Now recombine the zero???_?.fits files into one file with 8 extensions, under the original name with task mscjoin. Since we originall split up all of the "zero" frames, we have to rejoin all of the zero frames. Some will involve correct CCDs; some will not. Since even the corrected frames have their original names, we treat them the same. PACKAGE = mscred TASK = mscjoin input = @list.zero List of input root names (output = @list.zero) List of output MEF names (delete = yes) Delete input images after joining? (verbose= yes) Verbose? (fd1 = ) (fd2 = ) (mode = ql) where: list.zero -------- zero001 zero002 zero003 zero004 zero005 zero011 zero012 zero013 zero014 zero015 zero016 zero017 zero018 zero019 zero020 zero021 zero047 zero048 zero049 zero050 zero051 zero077 zero078 zero079 zero080 zero081 zero082 zero083 zero084 zero085 zero086 zero087 zero088 zero089 zero090 zero091 zero092 zero093 zero094 zero095 zero096 e) Now that you have the original (CCD-6-corrected) zeros back, combine them with task zerocombine to make a bias frame. PACKAGE = mscred TASK = zerocombine input = @inzero.list List of zero level images to combine (output = Zero991102A) Output zero level name (combine= average) Type of combine operation (reject = crreject) Type of rejection (ccdtype= zero) CCD image type to combine (process= yes) Process images before combining? (delete = yes) Delete input images after combining? (scale = none) Image scaling (statsec= ) Image section for computing statistics (nlow = 0) minmax: Number of low pixels to reject (nhigh = 1) minmax: Number of high pixels to reject (nkeep = 1) Minimum to keep (pos) or maximum to reject (neg) (mclip = yes) Use median in sigma clipping algorithms? (lsigma = 3.) Lower sigma clipping factor (hsigma = 3.) Upper sigma clipping factor (rdnoise= rdnoise) ccdclip: CCD readout noise (electrons) (gain = gain) ccdclip: CCD gain (electrons/DN) (snoise = 0.) ccdclip: Sensitivity noise (fraction) (pclip = -0.5) pclip: Percentile clipping parameter (blank = 0.) Value if there are no pixels (mode = ql) where: zero001.fits zero002.fits zero003.fits zero004.fits zero005.fits zero011.fits zero012.fits zero013.fits zero014.fits zero015.fits zero016.fits zero017.fits zero018.fits zero019.fits zero020.fits zero021.fits That you have process = yes means that you should check the task ccdproc parameters. You want: overscan = yes trim = yes fixpix = yes 2. Make Dome Flat. Be a little weary. Coming up will be pupil correction. We'll make a dome flats out of frames that have merely been bias-corrected. The combined flat will still have to be pupil-corrected (by dividing by a pupil-correction template--as opposed to the object frames, which will get pupil-corrected (and fringe corrected, in the case of I band data) by *subtracting* the pupil-correction template). Hm. a) Fix CCD 5/6 exactly as above. Check CCD 5/6 for bias jumps in dome flats. Split those frames with bias jumps with mscsplit. Append "bp" to the affected frames. Load task fixchip6. Run it on affected frames extensions. Join the split frames under their original names. b) Epar ccdproc and add zerocorrection = yes and give it the name of the appropriate bias frame. This will get called by flatcombine so that the flat frames get bias-corrected before combining. c) Now combine dome flats with flatcombine. Don't bother making separate lists for the different filters, but do keep your different nights straight. (Could set "ccdtype" to "dome flat", but it should grab this from the header.) PACKAGE = mscred TASK = flatcombine input = @list.dflat_n2 List of flat field images to combine (output = Dflat991103) Output flat field root name (combine= average) Type of combine operation (reject = ccdclip) Type of rejection (ccdtype= ) CCD image type to combine (process= no) Process images before combining? (subsets= yes) Combine images by subset parameter? (delete = no) Delete input images after combining? (clobber= no) Clobber existing output image? (scale = mode) Image scaling (statsec= ) Image section for computing statistics (nlow = 1) minmax: Number of low pixels to reject (nhigh = 1) minmax: Number of high pixels to reject (nkeep = 1) Minimum to keep (pos) or maximum to reject (neg) (mclip = no) Use median in sigma clipping algorithms? (lsigma = 3.) Lower sigma clipping factor (hsigma = 3.) Upper sigma clipping factor (rdnoise= rdnoise) ccdclip: CCD readout noise (electrons) (gain = gain) ccdclip: CCD gain (electrons/DN) (snoise = 0.) ccdclip: Sensitivity noise (fraction) (pclip = -0.5) pclip: Percentile clipping parameter (blank = 1.) Value if there are no pixels (mode = ql) 3. Pupil correct Dome Flat. (I band, z band, Bw band (which is "UB") only.) CAREFUL: a) "lmedian = no" for R band (which you don't pupil-correct anyway) and Bw (which you do pupil correct). b) "lmedian = yes" for I band and z band. CAREFUL: type is set to ratio here. When we use mscpupil to to carve the pupil template out of the sflatV1XXX, we'll set it to data. Load task mscpupil. Let 'er rip--watch lmedian! PACKAGE = mscred TASK = mscpupil input = Dflat99102I.fits List of input images output = Dflat99102Iwop.fits List of output images (masks = BPM) List of masks (type = ratio) Output type (lmedian= yes) Subtract line-by-line median? (xc = 27.) Pattern center offset (pixels) (yc = 9.) Pattern center offset (pixels) (rin = 300.) Radius of inner background ring (pixels) (drin = 20.) Width of inner background ring (pixels) (rout = 1500.) Radius of outer background ring (pixels) (drout = 20.) Width of outer background ring (pixels) (funcin = chebyshev) Inner azimuthal background fitting function (orderin= 2) Inner azimuthal background fitting order (funcout= spline3) Outer azimuthal background fitting function (orderou= 2) Outer azimuthal background fitting order (rfuncti= spline3) Radial profile fitting function (rorder = 40) Radial profile fitting order (abin = 0.) Azimuthal bin (deg) (astep = 0.) Azimuthal step (deg) (niterat= 3) Number of rejection iterations (lreject= 3.) Low rejection rms factor (hreject= 3.) High rejection rms factor (datamin= INDEF) Minimum good data value (datamax= INDEF) Maximum good data value (verbose= yes) Print information? (fd = ) (mode = ql) 4. Flatten Object frames (first pass, with dome flats). Divide object frames by (pupil-corrected) dome flats. Do this with ccdproc, by turning on the flatten switch and giving the appropriate flat name. Unlike your calibration frames, your data frames haven't been processed at all yet... so they still need to be bias-subracted, trimmed, etc. When entering the flat name, be sure and specifiy the pupil-corrected verion where appropriate! (This may mean ditching or hiding the un-pupil-corrected version.) Note that you don't have to sort objects and flats by filter... ccdproc applies the right dome flat to the right data automatically. We will make a second-pass flattening with a sky flat, which gets created out of the dome-flattened object frames. Also, we'll eventually have to fix CCD 5/6 in the object frames, too. PACKAGE = mscred TASK = ccdproc images = @list.obj List of Mosaic CCD images to process (output = ) List of output processed images (bpmasks= ) List of output bad pixel masks (ccdtype= ) CCD image type to process (noproc = no) List processing steps only? (xtalkco= yes) Apply crosstalk correction? (oversca= yes) Apply overscan strip correction? (trim = yes) Trim the image? (fixpix = yes) Apply bad pixel mask correction? (zerocor= yes) Apply zero level correction? (darkcor= no) Apply dark count correction? (flatcor= yes) Apply flat field correction? (sflatco= no) Apply sky flat field correction? (merge = no) Merge amplifiers from same CCD? (saturat= INDEF) Saturation (+val=e-, -val=ADU) (xtalkfi= mscdb$noao/CCDMosaThin1/xtalk.dat) Crosstalk file (biassec= !biassec) Overscan strip image section (trimsec= !trimsec) Trim data section (fixfile= BPM) List of bad pixel masks (zero = Zero*) List of zero level calibration images (dark = ) List of dark count calibration images (flat = Dflat*) List of flat field images (sflat = SflatV2runIBw.fits) List of secondary flat field images (minrepl= 1.) Minimum flat field value (interac= no) Fit overscan interactively? (functio= legendre) Fitting function (order = 1) Number of polynomial terms or spline pieces (sample = *) Sample points to fit (naverag= 1) Number of sample points to combine (niterat= 1) Number of rejection iterations (low_rej= 3.) Low sigma rejection factor (high_re= 3.) High sigma rejection factor (grow = 0.) Rejection growing radius (fd = ) (fd2 = ) (mode = ql) 5. Make Sky Flat. (At the same time, this involves removing pupil ghosts from the object frames, and removing fringes from the object frames.) THE FOLLOWING IS FOR I (AND z) BAND ONLY. R has no pupil, no fringes. Bw has pupil, no fringes. a) The first thing to do is to combine many images (of the same filter) together to make a "version 1" sky flat. This sky flat will contain fringes and the pupil ghost, which will have to be removed. Do the combining with sflatcombine: PACKAGE = mscred TASK = sflatcombine input = @list_I.obj List of images to combine (output = SflatV1runHn2) Output sky flat field root name (combine= average) Type of combine operation (reject = ccdclip) Type of rejection (ccdtype= object) CCD image type to combine (subsets= yes) Combine images by subset parameter? (scale = mode) Image scaling (statsec= ) Image section for computing statistics (nkeep = 1) Minimum to keep (pos) or maximum to reject (neg) (nlow = 1) minmax: Number of low pixels to reject (nhigh = 1) minmax: Number of high pixels to reject (mclip = yes) Use median in sigma clipping algorithms? (lsigma = 6.) Lower sigma clipping factor (hsigma = 3.) Upper sigma clipping factor (rdnoise= rdnoise) ccdclip: CCD readout noise (electrons) (gain = gain) ccdclip: CCD gain (electrons/DN) (snoise = 0.) ccdclip: Sensitivity noise (fraction) (pclip = -0.5) pclip: Percentile clipping parameter (blank = 1.) Value if there are no pixels (grow = 3.) Radius (pixels) for neighbor rejection (fd = ) (mode = ql) Here, we're using 40 I band flats from night 2. Hopefully, the resulting pupil template will apply well to the entire run. The result is SflatV1runHn2, a first pass sky flat that contains fringes and the pupil ghost. b) Now make a pupil template with mscpupil. The idea here is to carve out just the pupil for the version 1 skyflat. We will use this pupil template to remove the pupil from the object frames, and then combine those object frames to make a version 2 sky flat. CAREFUL: set type = data set lmedian = no PACKAGE = mscred TASK = mscpupil input = SflatV1runHn2I.fits List of input images output = puptemp_runHn2I List of output images (masks = BPM) List of masks (type = data) Output type (lmedian= no) Subtract line-by-line median? (xc = 27.) Pattern center offset (pixels) (yc = 9.) Pattern center offset (pixels) (rin = 300.) Radius of inner background ring (pixels) (drin = 20.) Width of inner background ring (pixels) (rout = 1500.) Radius of outer background ring (pixels) (drout = 20.) Width of outer background ring (pixels) (funcin = chebyshev) Inner azimuthal background fitting function (orderin= 2) Inner azimuthal background fitting order (funcout= spline3) Outer azimuthal background fitting function (orderou= 2) Outer azimuthal background fitting order (rfuncti= spline3) Radial profile fitting function (rorder = 40) Radial profile fitting order (abin = 0.) Azimuthal bin (deg) (astep = 0.) Azimuthal step (deg) (niterat= 3) Number of rejection iterations (lreject= 3.) Low rejection rms factor (hreject= 3.) High rejection rms factor (datamin= INDEF) Minimum good data value (datamax= INDEF) Maximum good data value (verbose= yes) Print information? (fd = ) (mode = ql) c) Remove pupil from object frames with rmpupil. Syntax: obj???.fits -> obj???p.fits CAREFUL: If you're making an I band sky flat, only process the I band objects, etc. PACKAGE = mscred TASK = rmpupil input = obj103.fits List of input mosaic exposures output = test List of output mosaic exposures template= Puptemp_runHn2I.fits Template mosaic exposure (type = difference) Type of removal (extname= im[2367]) Extensions for fit (blkavg = 8) Block average factor (fudge = 1.) Fudge factor (scale = INDEF) Scale (INDEF for automatic estimate) (interac= yes) Interactive? (mscexam= no) Examine corrections with MSCEXAM? (verbose= yes) Verbose output? newscale= -1. Scale (0=done, -1=abort, -2=new blkavg) newblk = 4 New block average factor (fd1 = ) (fd2 = ) (fd3 = ) (mode = ql) First run this interactively on one object frame and check that you're happy with the pupil removel. Then check a few others, and then run it non-interactively on the whole batch of object frames. The interactive option picks a scaling that you may not like (it also blkavgs, which you might want to change to better observing the removal job). Play around until you determine a scale you like (I liked 0.8 for night 2), and then change: scale = INDEF to scale = 0.8 before running in batch mode. (Also, don't forget to turn interactive off.) Before proceeding, you should check that your scaling was good for all the frames. It probably won't be. Throw those frames out of the next the next step--you don't want them introduced into your sky flat. Later, you will have to do a better pupil subtraction so that these object frames look properly reduced. Actually, maybe you'd better just do this whole thing interactively. It'll be tedious, but it looks like the necessary scaling changes quite a bit. d) Now make version 2 sky flat out of the pupil-subtracted object frames. This sky flat will contain the fringes, but not the pupil. PACKAGE = mscred TASK = sflatcombine input = @list_I.obj//p List of images to combine (output = SflatV2runHn2I) Output sky flat field root name (combine= average) Type of combine operation (reject = ccdclip) Type of rejection (ccdtype= object) CCD image type to combine (subsets= yes) Combine images by subset parameter? (scale = mode) Image scaling (statsec= ) Image section for computing statistics (nkeep = 1) Minimum to keep (pos) or maximum to reject (neg) (nlow = 1) minmax: Number of low pixels to reject (nhigh = 1) minmax: Number of high pixels to reject (mclip = yes) Use median in sigma clipping algorithms? (lsigma = 6.) Lower sigma clipping factor (hsigma = 3.) Upper sigma clipping factor (rdnoise= rdnoise) ccdclip: CCD readout noise (electrons) (gain = gain) ccdclip: CCD gain (electrons/DN) (snoise = 0.) ccdclip: Sensitivity noise (fraction) (pclip = -0.5) pclip: Percentile clipping parameter (blank = 1.) Value if there are no pixels (grow = 3.) Radius (pixels) for neighbor rejection (fd = ) (mode = ql) Notice that we are combining the obj???p frames here. From this version 2 sky flat, we will make a pupil template. e) Make fringe template. This is pretty involved. The idea is that the version 2 sky flat contains both the pix-to-pix structure properly belonging to the sky flat as well as the actual fringes. For fringe subtraction, we want a fringe template to contain ONLY the fringes; we don't want to inadvertently subtract off that pix-to-pix structure (which we ought to be dividing out later). The thing to do is to split the version 2 sky flat into it component CCDs. Then median filter these things with fmedian. This will remove the fringes, leaving only the pix-to-pix structure. We then subtract these modified CCDs from the orignal version 2 sky flat component CCDs, which we then recombine. Now, the version 2 sky flat is a true fringe template, since it lacks the pix-to-pix structure. Here's how: i) Split the version 2 sky flat with mscsplit. PACKAGE = mscred TASK = mscsplit input = SflatV2runHn2I.fits List of input MEF files (output = ) List of output root names (mefext = .fits) MEF filename extension (delete = yes) Delete MEF file after splitting? (verbose= yes) Verbose? (fd1 = ) (fd2 = ) (mode = ql) ii) Run fmedian on the split sky flat, to remove the fringes. e.g. SflatV2runHn2I_?.fits -> SflatV2runHn2I_nf_?.fits ("nf" = no fringe) PACKAGE = imfilter TASK = fmedian input = @list.median_in Input images to be filtered output = @list.median_out Output images xwindow = 257 X window size of median filter ywindow = 257 Y window size of median filter (hmin = -32768) Minimum histogram bin (hmax = 32767) Maximum histogram bin (zmin = INDEF) Pixel value corresponding to hmin (zmax = INDEF) Pixel value corresponding to hmax (zloreje= INDEF) Lowside pixel value cutoff (zhireje= INDEF) High side pixel value cutoff (unmap = yes) Unmap the digitized values ? (boundar= nearest) Boundary (constant,nearest,reflect,wrap) (constan= 0.) Constant for boundary extension (verbose= yes) Print messages about actions taken by the task (mode = ql) where: list.median_in -------------- SflatV2runHn2I_1.fits SflatV2runHn2I_2.fits SflatV2runHn2I_3.fits SflatV2runHn2I_4.fits SflatV2runHn2I_5.fits SflatV2runHn2I_6.fits SflatV2runHn2I_7.fits SflatV2runHn2I_8.fits list.median_out --------------- SflatV2runHn2I_nf_1.fits SflatV2runHn2I_nf_2.fits SflatV2runHn2I_nf_3.fits SflatV2runHn2I_nf_4.fits SflatV2runHn2I_nf_5.fits SflatV2runHn2I_nf_6.fits SflatV2runHn2I_nf_7.fits SflatV2runHn2I_nf_8.fits iii) Subtract these no-high-frequency frames from the original split frames to make the fringe template. Run something like: imarith SflatV2runHn2I_1.fits - SflatV2runHn2I_nf_1.fits FritempHn2I_1.fits imarith SflatV2runHn2I_2.fits - SflatV2runHn2I_nf_2.fits FritempHn2I_2.fits imarith SflatV2runHn2I_3.fits - SflatV2runHn2I_nf_3.fits FritempHn2I_3.fits imarith SflatV2runHn2I_4.fits - SflatV2runHn2I_nf_4.fits FritempHn2I_4.fits imarith SflatV2runHn2I_5.fits - SflatV2runHn2I_nf_5.fits FritempHn2I_5.fits imarith SflatV2runHn2I_6.fits - SflatV2runHn2I_nf_6.fits FritempHn2I_6.fits imarith SflatV2runHn2I_7.fits - SflatV2runHn2I_nf_7.fits FritempHn2I_7.fits imarith SflatV2runHn2I_8.fits - SflatV2runHn2I_nf_8.fits FritempHn2I_8.fits iv) Now join the individual fringe templates with mscjoin: PACKAGE = mscred TASK = mscjoin input = FritempHn2I List of input root names (output = FritempHn2I) List of output MEF names (delete = yes) Delete input images after joining? (verbose= yes) Verbose? (fd1 = ) (fd2 = ) (mode = ql) f) Fringe-subtract the data using rmfringe and the new fringe template. rmfringe works much like rmpupil--pick the scaling, etc. Syntax obj???p.fits -> obj???pf.fits PACKAGE = mscred TASK = rmfringe input = @list.fritemp List of input mosaic exposures output = @list.fritemp//f List of output mosaic exposures template= FritempHn2I.fits Template mosaic exposure (extname= ) Extensions for fit (blkavg = 4) Block average factor (scale = 1.) Scale (interac= no) Interactive? (mscexam= no) Examine corrections with MSCEXAM? (verbose= yes) Verbose output? newscale= -1. Scale (0=done, -1=abort, -2=new blkavg) newblk = New block average factor (fd1 = ) (fd2 = ) (fd3 = ) (mode = ql) where: list.fritemp ------------ obj103p obj104p obj105p obj106p obj107p obj108p obj109p obj110p obj111p obj112p obj125p obj128p obj129p obj130p obj131p obj132p obj133p obj134p obj135p obj136p obj137p obj138p h) Combine these pupil-subtracted, fringe-subracted object frames together to make the final sky flat. PACKAGE = mscred TASK = sflatcombine input = @list.skycomb List of images to combine (output = SflatV3runHn2) Output sky flat field root name (combine= average) Type of combine operation (reject = ccdclip) Type of rejection (ccdtype= object) CCD image type to combine (subsets= yes) Combine images by subset parameter? (scale = mode) Image scaling (statsec= ) Image section for computing statistics (nkeep = 1) Minimum to keep (pos) or maximum to reject (neg) (nlow = 1) minmax: Number of low pixels to reject (nhigh = 1) minmax: Number of high pixels to reject (mclip = yes) Use median in sigma clipping algorithms? (lsigma = 6.) Lower sigma clipping factor (hsigma = 3.) Upper sigma clipping factor (rdnoise= rdnoise) ccdclip: CCD readout noise (electrons) (gain = gain) ccdclip: CCD gain (electrons/DN) (snoise = 0.) ccdclip: Sensitivity noise (fraction) (pclip = -0.5) pclip: Percentile clipping parameter (blank = 1.) Value if there are no pixels (grow = 3.) Radius (pixels) for neighbor rejection (fd = ) (mode = ql) where: ----- obj103pf.fits obj104pf.fits obj105pf.fits obj106pf.fits obj107pf.fits obj108pf.fits obj111pf.fits 6. Sky flatten object frames with ccdproc. 7. Now cosmic ray zap. ?. Astrometry (for matching CCDs). (Could do this to the object frames any time!) Buell's Original Notes on Fringe Subtraction (when making Sky Flat) ------------------------------------------------------------------- Make Sflat using sflatcombine of objXXXp.fits, call version 2. This will contain fringe only, but also variations of flat field. use mscsplit to break up the image. Use fmedian (see printout, also in ReductionNotes/saveparms1 as fmedian.....params) input = "SflatV2runEI_5.fits" Input images to be filtered output = "SflatV2runEIfmb_5.fits" Output images xwindow = 257 X window size of median filter ywindow = 257 Y window size of median filter (hmin = -32768) Minimum histogram bin (hmax = 32767) Maximum histogram bin (zmin = INDEF) Pixel value corresponding to hmin (zmax = INDEF) Pixel value corresponding to hmax (zloreject = INDEF) Lowside pixel value cutoff (zhireject = INDEF) High side pixel value cutoff (unmap = yes) Unmap the digitized values ? (boundary = "nearest") Boundary (constant,nearest,reflect,wrap) (constant = 0.) Constant for boundary extension (verbose = yes) Print messages about actions taken by the task (mode = "ql") Note, that currently (June 2000) fmedian params are different. I think the ones in the above print out are correct, but here are the current ones. lpar fmedian input = "@infmedian" Input images to be filtered output = "@outfmedian" Output images xwindow = 129 X window size of median filter ywindow = 129 Y window size of median filter (hmin = -20000) Minimum histogram bin (hmax = 30000) Maximum histogram bin (zmin = -20000.) Pixel value corresponding to hmin (zmax = 30000.) Pixel value corresponding to hmax (zloreject = -20000.) Lowside pixel value cutoff (zhireject = 30000.) High side pixel value cutoff (unmap = yes) Unmap the digitized values ? (boundary = "nearest") Boundary (constant,nearest,reflect,wrap) (constant = 0.) Constant for boundary extension (verbose = yes) Print messages about actions taken by the task (mode = "ql") fmedian was to produce an image without the high-frequency features, which are hopefully dominated by the fringing. Then subtract the these *fm_X.fits frames from the SflatV2 to produce the fringe_template. Here is the short cl script, was call it mkfringe.cl, this specific example located in /d7/k9810d/mkfringeEI.cl imarith SflatV2runEI_1.fits - SflatV2runEIfm_1.fits fringeEI_1.fits imarith SflatV2runEI_2.fits - SflatV2runEIfm_2.fits fringeEI_2.fits imarith SflatV2runEI_3.fits - SflatV2runEIfm_3.fits fringeEI_3.fits imarith SflatV2runEI_4.fits - SflatV2runEIfm_4.fits fringeEI_4.fits imarith SflatV2runEI_5.fits - SflatV2runEIfm_5.fits fringeEI_5.fits imarith SflatV2runEI_6.fits - SflatV2runEIfm_6.fits fringeEI_6.fits imarith SflatV2runEI_7.fits - SflatV2runEIfm_7.fits fringeEI_7.fits imarith SflatV2runEI_8.fits - SflatV2runEIfm_8.fits fringeEI_8.fits Then use mscjoin to recombine above files. Use the fringe correction frame, example fringeEI.fits, in rmfringe to correct all of the objXXXp.fits files and make them obj***pf.fits files. Combine these files with sflatcombine to make final skyflat. Apply this to ccdproc to the obj***pf.fits files. They are now ready for "zapping" and msccmatch if you have not already done that step.