YALO optical channel. Data from 20030313 These are new instructions to reduce the data with the new Stetson format. It is pretty much the same as the old stuff, with the addition of new *.inf files, new *.tfm files, and a new way of reducing CCDSTD. Note that all data taken Feb 2003 and later are with the new CCD and we must change the bad pix masks. DATA REDUCTION: -3. You will be using a package I defined: nickcl. To use this easily put in the "login.cl" (not loginuser.cl) the following: reset nickcl = /uw50/nick/nickcl/ task nickcl.pkg = "nickcl$nickcl.cl" -2. Make sure you have aliases setup for the data: We will use a directory structure as: /uw54/nick/sn/sn01cn | | 20020313 | ------------------ | | | | opt ir .daophot setenv o20020313 /uw55/reu7/mar13 alias o20020313 "cd $o20020313" setenv i20020313 /uw55/reu7/mar13 alias i20020313 "cd $i20020313" You can also set them up for IRAF as: loginuser.cl: set o20020313 = /uw54/nick/sn/sn01cn/20020313/opt/ set i20020313 = /uw54/nick/sn/sn01cn/20020313/ir/ 1. Make a setup file that points to a unique uparm: copy /uw50/nick/daophot/optfiles/yalo_new/opt/setup . setup: set stdimage = imt2048 set uparm = /uw50/nick/uparm/yaloccd/ noao ctio nickcl imred digi apphot astu ccdred ccdred.instrument = "myiraf$yalo_ccd.dat" ccdred.ssfile = "myiraf$yalo_ccd.sub" loadit.format = "2048" loadit.statsec = "700:800,700:800" keep Run: cl < setup 2. Change to imh cpimh *.fits del+ 3. Fix the header and add the JD and AIRMASS correctly. You can run "yalohead" to do the addition of epoch, ctio, and jd-old. It also runs setjd and setairmass. yalohead ccd*.imh If you need to run setjd or setairmass: files ccd*.imh > in1 setjd @in1 date="UTDATE" time="UT" exposure="EXPTIME" epoch="EQUINOX" setairmass @in1 The secz and airmass should be about the same, or something is wrong: hsel r*.imh $I,airmass,secz yes setjd @in1 date="UTDATE" time="UT" exposure="EXPTIME" epoch="EQUINOX" 3.5 Insert the aziumth into the data. This should run trivially. All it does is to add a flag of 1 or -1 depending on if the object is E or W. azimuth: images = "@in1" input images (latitude = -30.16527778) Observatory latitude (calaz = no) Calculate azimuth? (flagit = yes) Use AZFLAG instead of AZIMUTH? (update = yes) Update azimuth into header? (imglist = "tmp$tmp15007a") (mode = "ql") azimuth @in1 4. Run ccdyalo on all the data. This will make [OT] images called rccd*.imh. Make sure the raw images are format [2144,2048], or ccdyalo will not work correctly. ccdyalo ccd*.imh 5. There are lots of wild pixels. Run: imrep rccd*.flat?.imh value=65535 lower=65535 upper=INDEF imrep rccd*.flat?.imh value=0 lower=INDEF upper=-100 5.5 If there are U twilight skies, you must combine these using "flatcomb" flatcomb rccd011217skyu*.imh imren FlatU rccd011217.flatu.imh 6. Now run ccdpr on the data. Run ccdlist first to see if the filters and imagetyp are correct. ccdl rccd*.imh Then a dry run: ccdpr rccd*.imh nop+ Then ccdpr rccd*.imh images = "rccd*.imh" List of CCD images to correct (output = "") List of output CCD images (ccdtype = "") CCD image type to correct (max_cache = 0) Maximum image caching memory (in Mbytes) (noproc = no) List processing steps only?\n (fixpix = no) Fix bad CCD lines and columns? (overscan = no) Apply overscan strip correction? (trim = no) Trim the image? (zerocor = yes) Apply zero level correction? (darkcor = no) Apply dark count correction? (flatcor = yes) Apply flat field correction? (illumcor = no) Apply illumination correction? (fringecor = no) Apply fringe correction? (readcor = no) Convert zero level image to readout correction? (scancor = no) Convert flat field image to scan correction?\n (readaxis = "line") Read out axis (column|line) (fixfile = "") File describing the bad lines and columns (biassec = "") Overscan strip image section (trimsec = "") Trim data section (zero = "rccd*.bias") Zero level calibration image (dark = "") Dark count calibration image (flat = "rccd*.flat?.imh") Flat field images (illum = "") Illumination correction images (fringe = "") Fringe correction images (minreplace = 1.) Minimum flat field value (scantype = "shortscan") Scan type (shortscan|longscan) (nscan = 1) Number of short scan lines\n (interactive = yes) Fit overscan interactively? (function = "median") Fitting function (order = 8) Number of polynomial terms or spline pieces (sample = "*") Sample points to fit (naverage = 1) Number of sample points to combine (niterate = 3) Number of rejection iterations (low_reject = 2.5) Low sigma rejection factor (high_reject = 2.5) High sigma rejection factor (grow = 0.) Rejection growing radius (mode = "ql") The data are now reduced to [OTZF]. 7. To create the *.inf file. First I like to make the names shorter, because I have fat fingers. imren rccd010630.0*.imh %rccd010630.0%r%*.imh (or whatever) The new Stetson format has the *.mch file as the last field (which makes COLLECT easier to run) but it also means that you have to put the *.mch information into the *.inf file now. In addition, the *.inf file does not have the file title anymore, which is too bad. We will make two versions of the *.inf file. The *.dat version is the old one which can be used for bookkeeping. del in*,junk* files r*.imh | sed s/.imh// > in1 hsel @in1 $I,CCDFLTID,utmiddle,airmass,exptime,hjd,title,ha yes > junk.dat !$myprog/prog3a junk.dat 0 o20020313 /uw50/nick/daophot/irafstuff/filters_yalo_new.dat To make the official version you must edit in the *.mch file and the azimuth of the telescope. I will later make a program to do this automatically, but for right now, edit in a KEYWORD called MCHFILE with this information. In general, pick the V image as the master image. hsel @in1 $I,title,CCDFLTID yes | sort col=2 > in2 Edit in2 to add the MCHFILE info. in2: hedit r031.imh MCHFILE r031 add+ ver- hedit r030.imh MCHFILE r031 add+ ver- hedit r033.imh MCHFILE r031 add+ ver- hedit r032.imh MCHFILE r031 add+ ver- hedit r038.imh MCHFILE r038 add+ ver- etc. Now do: del junk.dat hsel @in1 $I,CCDFLTID,utmiddle,airmass,azflag,exptime,hjd,mchfile yes > junk.dat !$myprog/prog3b junk.dat 0 o20020313 /uw50/nick/daophot/irafstuff/filters_yalo_new.dat You will now have a correct *.inf file. ty /uw50/nick/daophot/irafstuff/filters_yalo_new.dat 'V' 1 'B' 2 'I' 3 'R' 4 'U' 5 8. You can run fixpix on the data, if you want to make pretty images. Dont do this on the data you will use to measure photometry. fixpix r???.imh mask=mask.pl 9. Divide by the mask image (see below if you don't have a mask image). You only need to make a mask every few weeks or so. Don't waste your time doing lots of masks! If the mask image has good=0, bad=1, you must first do: imar r???.imh / maskdao r???.imh divzero=65535 MAKING THE MASK To avoid confusion with the badpixels, I am going to reduce these data always into 2048:2048, and merely mask off the bad pixels. badpix: # badpix for reduced data format YALO CCD [2048,2048] #BIASSEC1 [8:32,1:2048] #BIASSEC2 [2113:2142,1:2048] #DATASEC1 [49:1072,1:2048] #DATASEC2 [1073:2096,1:2048] #TRIMSEC [49:2096,1:2048] # oct 2000 nbs 207 207 758 2048 303 312 1600 2048 970 970 1116 2048 976 977 1428 2048 1168 1168 1822 2048 1564 1567 1901 2048 1594 1595 1 2048 1606 1606 1 2048 1610 1610 1 2048 1661 1662 810 2048 1686 1686 148 2048 1689 1690 1200 2048 1875 1876 857 2048 1908 1908 1658 2048 1955 1956 1865 2048 1962 1964 573 2048 1972 1972 725 2048 badpix1: # badpix for raw data format YALO CCD [2144,2048] #BIASSEC1 [8:32,1:2048] #BIASSEC2 [2113:2142,1:2048] #DATASEC1 [49:1072,1:2048] #DATASEC2 [1073:2096,1:2048] #TRIMSEC [49:2096,1:2048] # oct 2000 nbs 255 255 758 2048 351 360 1600 2048 1018 1018 1116 2048 1024 1025 1428 2048 1216 1216 1822 2048 1612 1615 1901 2048 1642 1643 1 2048 1654 1654 1 2048 1658 1658 1 2048 1709 1710 810 2048 1734 1734 148 2048 1737 1738 1200 2048 1923 1924 857 2048 1956 1956 1658 2048 2003 2004 1865 2048 2010 2012 573 2048 2020 2020 725 2048 Two steps. Id the bad cols and histogram the low pixels. First step. Find the low pixels. Copy a flat field into temp1. Fix the bad columns. imcopy rccd*.flatv test copy /uw50/nick/daophot/irafcl/yalo/opt/mask?.cl . Now run the mask commands. mask1.cl # string img real midpt img = "temp" imdel("temp*.imh,mask1.imh", >>& "dev$null") imstat(img//"[100:1900:10,100:1900:10]",fields="midpt",form-) | scan(midpt) print(img," ",midpt) imar(img,"/",midpt,"temp1") fixpix temp1 mask=/uw50/nick/daophot/mask/badpix_yalo4 # remove features in the column direction imcopy temp1[*,1000:1200] temp2 fit1d temp2 temp3 fit ax=2 nav=-2048 interact- fun=leg sleep 3 blkavg temp3 temp4 1 2048 blkrep temp4 temp5 1 2048 imar temp1 / temp5 temp6 # remove features in the line direction imcopy temp6[1400:1600,*] temp7 fit1d temp7 temp8 fit ax=1 nav=-2048 interact- fun=leg sleep 3 blkavg temp8 temp9 2048 1 blkrep temp9 temp10 2048 1 imar temp6 / temp10 temp11 # now look at historgram imcopy temp11[150:1900,10:2038] temp12 imhist temp12 z1=0.0 z2=1.5 nbins=100 imhist temp12 z1=0 z2=1 nbins=20 list+ displ temp11 1 zs- zr- z1=0.5 z2=1.5 mask2.cl # now make mask image: good=0, bad=1 # I figure if a pixel is only transmitting 0.50 of the flux, it's bad. imcopy temp11 mask1 imrep mask1 -1 lower=INDEF upper=0.50 imrep mask1 -1 lower=1.2 upper=INDEF imrep mask1 0 lower=0.50 upper=1.2 imar mask1 * -1 mask1 # mask out some of the bad parts of the chip # the last 150 cols seem to be affected by bad CTE. See the flats. imrep mask1[1:28,*] 1 lower=INDEF upper=INDEF # # there is some weirdness going on at the rhs of the chip. Bad CTE? # #imrep mask1[1940:2048,*] 1 lower=INDEF upper=INDEF imrep mask1[2015:2048,*] 1 lower=INDEF upper=INDEF imrep mask1[*,1:14] 1 lower=INDEF upper=INDEF imrep mask1[*,2038:2048] 1 lower=INDEF upper=INDEF # hedit mask1 title "Mask image for YALO 2048:2048 mode" ver- displ mask1.imh 1 zs- zr- z1=0 z2=1 Now make the other mask image. Here badpix is the reduced data pixmap. 0=good,1=bad Now merge the two masks: mask3.cl: badpiximage daop$/mask/badpix_yalo4 mask1 mask2 good=0 bad=1 imar mask1 + mask2 mask imrep mask 1 lower=0.01 upper=INDEF imcopy mask.imh mask.pl hedit mask.pl title "Mask image for YALO 2048:2048 mode" ver- #imdel mask1.imh,mask2.imh # make daomask with 0=bad, 1=good imar mask.imh * -1 maskdao imar maskdao + 1.0 maskdao displ maskdao.imh 1 zs- zr- z1=0 z2=1 There are still some low pixels that can be seen on reduced data. Maybe we need to add these to the mask. If you are going to divide by the mask, don't forget to do it now! BFIND, DAOGROW, DAOMATCH, DAOMASTER, FETCH: Before you start DAOPHOT you should decide if the images, espeically U, are too weak to use the individual frames. In very few cases you will have to combine the data (instructions at the end of this cookbook). If you need to combine, do so now. After you combine, do the follwoing bookkeepping: a. copy the r*.imh,s*.imh individual image to "old". b. Edit the *.inf to add the new combined images. Just copy one of the r*.imh B images to the end of the file and rename it to the SN*.imh images. 0. Copy *.opt files, landolt.lib, *.clb (tfm) files. copy /uw50/nick/daophot/optfiles/yalo_new/opt/*.opt . copy /uw50/nick/daophot/optfiles/yalo_new/opt/yalo_new.tfm . copy /uw50/nick/daophot/optfiles/yalo_new/opt/yalo_new.clb . copy /uw50/nick/daophot/optfiles/yalo_new/opt/landolt.lib . copy /uw50/nick/daophot/optfiles/yalo/opt_new/t1.cl . Rename the *.clb file to the alias of the directory: mv yalo_new.clb o20020313.clb daophot.opt: Read noise = 3.5 Gain = 3.2 FWHM = 6.0 Fitting radius = 6.0 PSF radius = 22 Analytic model PSF = 3 Variable PSF = 2 Extra PSF cleaning passes = 5 High good datum = 20000 Watch progess = -2 Threshold = 7 photo.opt: A1 = 6.0000 A2 = 6.4494 A3 = 7.1234 A4 = 8.0221 A5 = 9.1455 A6 = 10.4935 A7 = 12.0662 A8 = 13.8636 A9 = 15.8857 AA = 18.1325 AB = 20.6039 AC = 23.3000 IS = 24 OS = 35 allstar.opt: Fitting radius = 6.0 IS (Inner sky radius) = 2 OS (Outer sky radius) = 25 Redetermine Centroids = 1 yalo_new.tfm: # M: VBIRU # I: V,B-V,V-I,V-R,U-B I1 = M1 I2 = M2-M1 I3 = M1-M3 I4 = M1-M4 I5 = M5-M2 O1 = M1 + A0 + A1*I2 + A2*X + A3*T O2 = M2 + B0 + B1*I2 + B2*X + B3*T O3 = M3 + C0 + C1*I3 + C2*X + C3*T O4 = M4 + D0 + D1*I4 + D2*X + D3*T O5 = M5 + E0 + E1*I5 + E2*X + E3*T # CLOUD - remove A0,A2,A3 for cloudy weather A3 = 0. B3 = 0. C3 = 0. D3 = 0. E3 = 0. 2. Measure the FWHM as: task sed = $foreign del junk.dat del in* files r???.imh,SN*.imh | sed s/.imh// > in1 yaloshift @in1 etc. Then run !$myprog/prog39yalo junk.dat This outputs fwhm.dat and fwhm1.dat. Use fwhm1.dat. Edit fwhm1.dat to have the appropriate psf variation. If there are lots of stars in the frame, use VAR=1 or 2. If not, use VAR=0. 3. If you have standards, run BFIND2,using thresh about 10 for the bright stars. For SN data, run BYALO. This will do BPASS2 and FINAL2. Use threshold of 8. For most data you can use a var of 1 or 2. If you use BPASS2 alone, edit the psf using: !$myprog/prog11a r042 99 or use dals to remove the galaxy. dals r041 zlow=-10 zhigh=250 red+ If the SN or an important star was missed, run addals to add the object by hand. Sometimes the process will crash because the psf does not converge, or the psf is so bad that all the stars are rejected. To redo these crashed jobs, do: daophot att r048 pickpsf exit Now edit out the galaxy. daophot att r048 psf exit Run FINAL2 on the data you fixed by hand. If you need to do ALLFRAME because the object is very weak, do: a. make a *.mag file using DAOMASTER. Use 1 0.5 2 for input b. renumber the *.mag stars using DAOPHOT c. run BALLFRAME d. run the following program to copy over the *.alf to *.als files !$myprog/prog45 r055 e. make sure the *.mch file is pointing to the *.als data f. run DAOMASTER to update the *.tfr file !/uw50/nick/daophot/perl/daomaster.pl r032.mch 4. If you are doing aperture phot, make the *.lis file as ls -1 *.ap > feb04.lis. The *.lis file should have the same number of lines as the *.inf file. You can check this as wc feb04.lib feb04.inf ls -1 *ap > .lis A note on file names. The following files should have the same name: *.inf, *.lis, *.obs, *.tfm, *.clb. It also helps to call the directory by that name also. For instance, if there are 5 nights, the third night would be in directory n3, and the following files would be created in directory n3: n3.inf, n3.lis, n3.obs, n3.tfm and n3.clb. 5. Then run NDAOGROW. I used 3 unknowns. Last 2 are 0.9 and 0. I used 0.025mag error limits. This produces *.tot files and a summary file *.gro. You can run "sm" at this point to see the growth curves. The command "see n3" will plot up 5 curves that represent the full range of seeing. The command "gro obj100" etc will plot the growth curves. It is important to look at the curves quickly to see if they have appeared to converge. In the new version of DAOGROW, the *.tot files have the sky in them. If you need to rerun DAOGROW, run deldaogrow first. 6. Normally, one runs NDAOMATCH and NDAOMASTER to make the tables for each field. This produces *.mch files for each field. Peter's philosophy here is to have a directory with template images and *.tot files for the standards. You run NDAOMATCH starting with that file, and then feed in the program frames from the night in question. The *.mch file then has as a master image the template image. This works well provided that DAOMATCH runs flawlessly with all the program data. I don't know if NDAOMATCH works better now. What I have done is to use yalocenter to make a junk file with shifts and run the following program. Put "als" or "tot" as needed. del in* files r???.imh,SN*.imh | sed s/.imh// > in1 hsel @in1 $I,title yes hsel @in1 $I,title yes | grep "2001du" - | fields - 1 > indu hsel @in1 $I,title yes | grep "2001cz" - | fields - 1 > incz hsel @in1 $I,title yes | grep "2001cn" - | fields - 1 > incn hsel @in1 $I,title yes | grep "2001bt" - | fields - 1 > inbt hsel @in1 $I,title yes | grep "2001X" - | fields - 1 > inx yalocen @in41 !$myprog/prog52b junk.dat als This asks if you want to run daomaster. Do it. !/uw50/nick/daophot/perl/daomaster.pl r032.mch 7. Display each first image in the *.mch files. Run the iraf task "fetch" and then the fortran task "fetch" to make the *.fet files. The IRAF fetch inputs either an "a" key or an "x" key. Use the "a" key if the object looks like it can be centered. If the object is near a bad pix, use the "x" key. NOTE THAT THERE IS A NEW VERSION OF FETCH. I NEED TO MODIFY IT TO WORK IN THE IRAF TASK. I have written a program to speed up the fetch part. I have copied *.fet files to the SN directories. For the YALO data, the difference between nights is merely a shift. Calculate a shift between your present image (using imexam) and a given fet star near the center of the chip. Calculate (xnew-xold_fet,ynew-yold_fet). Then run: !$myprog/prog54 /uw52/nick/sn/sn01x/opt/SN2001x.fet r032 75 -7 !$myprog/prog54 /uw52/nick/sn/sn01bt/opt/SN2001bt.fet r032 75 -7 !$myprog/prog54 /uw52/nick/sn/sn01cn/opt/SN2001cn.fet r032 75 -7 !$myprog/prog54 /uw52/nick/sn/sn01cz/opt/SN2001cz.fet r032 75 -7 !$myprog/prog54 /uw52/nick/sn/sn01du/opt/SN2001du.fet r032 75 -7 !$myprog/prog54 /uw52/nick/sn/sn01el/opt/SN2001el.fet r032 75 -7 This will output a file called r032.fet which is the correct fet file. This way yoy don't have to id the stars every time. I have placed an image (/4, converted to short format) in these directories that correspond to the *.fet file 8. Now, if you are doing standards, enter the data into NCOLLECT. This runs much more easily than in the past. nick% ncollect Name of output photometry file: o20020313 Creating new file. Label for magnitude 1: v Label for magnitude 2: b Label for magnitude 3: i Label for magnitude 4: r Label for magnitude 5: u Label for magnitude 6: New output file name (default OVERWRITE): File with exposure information (default NONE): o20020313 Typical FWHM, maximum radius: 2 10 Photometry-filename prefix: ==> Enter NONE if there are no psf files. <== Default filename extension (default als): NONE Input .TOT file: The .TOT file cannot have a *.imh ending. Calculate the mean differences between the library (*.lib) and output (*.net) values. I have a program called prog55b. This inputs the two files and sorts on the name. It outputs the mean differences (use cols 26,45,63,80 for V, B-V, V-R, and V-I) !$myprog/prog55b landolt.lib o20010710.net Then tweak as: A0 ==> AO - (d(B-V)+d(V)) B0 ==> B0 - d(V) D0 ==> D0 - (d(V)-d(V-I)) 9. Now you run NCCDSTD to get the transformations. This new program inputs a *.lib and *.obs file which have the same magnitude order. head landolt.lib 5 FILTERS: V B I R U tphe-a 14.651 0.0066 15.444 0.0087 13.810 0.0071 14.216 0.0066 15.824 0.0121 29 12 l92.dat tphe-b 12.334 0.0158 12.739 0.0158 11.799 0.0158 12.072 0.0158 12.895 0.0071 29 17 l92.dat head o20020313.obs 5 MAGNITUDES: (1) v (2) b (3) i (4) r (5) u 4 42 Midnight Star Fil H M X Az Int Mag sigma corr x y sky pg1047 2 23 45 1.274 -1.0 19.000 13.301 0.0036 -0.027 1252.45 1079.36 3.052 obj069 pg1047a 2 23 45 1.274 -1.0 19.000 14.422 0.0061 -0.047 1147.02 1165.27 2.901 obj069 This produces *.rsd files which you can plot with sm. Use "resids highz99r" and "resids highz99i" which inputs the data. There is a macro called rsd.macro that you copied over. Run SM and input: sm : macro read rsd.macro etc This macro plots up the data. Look especially carefully at the UT and X plots to look for trends. Add a "T" term to the solution if needed. 10. Run NCCDAVE to output the *.net and *.ave file. Note that this program will output the specified number of filters in the *.obs file. Again, you can input the VBIRU *.lib file, and the reduced number of filters *.obs file to get out the *.net file. 11. Run NTRIAL to get the final reduced psf photometry. You have to have a fresh copy of the *.tfr file by running daomaster.pl. The pairs file can be used to search for variables. NTRIAL uses the *.mch file to determine what data to input. nick% ntrial Transfer file: obj074 Library file (default obj074.lib): o20020313.net Information file (default obj074.inf): o20020313 Pair file (default obj074.prs): END-OF-FILE FETCH file (default obj074.fet): Critical radius: 8 Output file name (default obj074.fnl): See below for variable star searches SMALLER NUMBER OF FILTERS THAN VBIRU If you have a smaller number of filters than VBIRU, do the following. 1. Make sure the *.obs file has only the filters you want to reduce. For instance, if you want VB but you also have I in the *.obs file, remove the I data. The NCCDSTD program will attempt to reduce all the filters in the *.obs file. 2. Edit the *.tfm file to include only the filters of interest. For instance, I used the following *.tfm file for VI reductions, but inputting the VBIRU *.lib file. Note I had to change the color of O1 (V) from I2 to I3 because I have removed all the B information from the *.obs file. I1 = M1 #I2 = M2-M1 I3 = M1-M3 #I4 = M1-M4 #I5 = M5-M2 O1 = M1 + A0 + A1*I3 + A2*X #O2 = M2 + B0 + B1*I2 + B2*X O3 = M3 + C0 + C1*I3 + C2*X #O4 = M4 + D0 + D1*I4 + D2*X #O5 = M5 + E0 + E1*I5 + E2*X By doing this, NCCDSTD will run on only the VI data. NCCDAVE will only output the VI data. Very simple to use! For NTRIAL, you can use the full *.inf, *.net, and *.clb file (VBIRU) even for the subset of filters. It is the *.mch file that limits the input data. NTRIAL is quite intelligent. For instance, I input the VI data in *.mch file. The *.clb file had the I color term as V-I and the V color term as B-V. The output *.fnl file had the I data correct, but no V data because it lacked the B filter for the color term. But the program still ran. 11. Clean up the disk by running cleanupdao cleanup del junk* and cleanpix DONE! If the SN is too faint, there are two options. Option 1 is the best. Option 1. 1. For most of the data, there will be at least 3 frames. Generally it is the U or B data that are the weakest. hsel @inx $I,CCDfltid yes | grep "B" - | fields - 1 > inxb hsel @inbt $I,CCDfltid yes | grep "B" - | fields - 1 > inbtb hsel @incn $I,CCDfltid yes | grep "B" - | fields - 1 > incnb hsel @in1 $I,CCDfltid,title yes | grep "U" - | grep "SN" - | fields - 1 > inu hsel @in1 $I,CCDfltid,title yes | grep "B" - | grep "SN" - | fields - 1 > inb hsel @in1 $I,CCDfltid,title yes | grep "V" - | grep "SN" - | fields - 1 > inv hsel @in1 $I,CCDfltid,title yes | grep "R" - | grep "SN" - | fields - 1 > inr hsel @in1 $I,CCDfltid,title yes | grep "I" - | grep "SN" - | fields - 1 > ini # hsel @inx $I,CCDfltid yes | grep "V" - | fields - 1 > inxv # hsel @inx $I,CCDfltid yes | grep "I" - | fields - 1 > inxi # hsel @inx $I,CCDfltid yes | grep "R" - | fields - 1 > inxr ccdsky @inxb run+ cl < sub.cl ==> VERY IMPORTANT!! !mv inb temp ; sed s/r/s/ temp > inb ; rm temp !mv inv temp ; sed s/r/s/ temp > inv ; rm temp !mv inr temp ; sed s/r/s/ temp > inr ; rm temp !mv ini temp ; sed s/r/s/ temp > ini ; rm temp !mv inbtb temp ; sed s/r/s/ temp > inbtb ; rm temp !mv incnb temp ; sed s/r/s/ temp > incnb ; rm temp 2. Shift the frames. del junk.dat yalocen @inxb !$myprog/prog48a junk.dat cl < shift.cl displ temp10 1 zs- zr- z1=-25 z2=250 displ temp11 2 zs- zr- z1=-25 z2=250 etc. 3. Combine the frames. First run noise model to get the correct values. stsdas hst wfpc noisem s021 Then combine as: t1.cl imdel t.imh,t.pl # B imcomb temp??.imh t plf=t.pl comb=ave reject=ccd lth=-200 hth=60000 \\ gain=3.2 rdn=11 snoise=0.20 lsig=4 hsig=4 blank=65535 displ t.imh 1 zs- zr- z1=-20 z2=250 displ t.pl 2 imren t.imh SN2001xb.imh imren t.pl pl/SN2001xb.pl Remove the header keyword to the BPM file: hedit SN*.imh BPM del+ 4. Do the following bookkeeping: a. Edit the "inx" file to remove the indivudaul B frames and add this new combined frame. b. Update the *.inf file. No need to get rid of the old B frames here. c. Update the *.mch file if needed. Option 2. 1. Run ALLFRAME. To do this, you need a *.tfr file, a *.mag file (both output from DAOMASTER), and the allframe.opt file: allframe.opt: CE (CLIPPING EXPONENT) = 6.00 CR (CLIPPING RANGE) = 2.50 GEOMETRIC COEFFICIENTS = 6 MINIMUM ITERATIONS = 5 PERCENT ERROR (in %) = 0.75 IS (INNER SKY RADIUS) = 2 OS (OUTER SKY RADIUS) = 30 WATCH PROGRESS = 2 MAXIMUM ITERATIONS = 50 PROFILE ERROR (in %) = 5.00 For the mag file, I run it through DAOPHOT once , sort it on y ("3") and renumber. This is not important. 2. Queue the allframe task with BALLFRAME. I found it took about 40min per set to run in batch. 3. After it is done, run !$myprog/prog45 r055 This creates a file you run as source r055.cl which removes the old *.als and *.mag files and copies the *.alf and *.nmg files to those positions. 4. Then redo the *.tfr file as !/uw50/nick/daophot/perl/daomaster.pl r032.mch