HOW TO MAKE A SHUTTER CORRECTION FOR CTIO TELESCOPES: The idea is to create an image of the error in the shutter. The logic was borrowed from Stetson (thanks Peter!). We will create an image where every pixel is the increment in time that a 1s exposure is really seeing. That is, if a pixel has a value of 0.063, the 1s exposure actually was 1.063s at that position. Most of our iris shutters have errors of this level. Typically the shutter is open 0.08s more in the center and 0.06s in the corners. As far as I can tell, the error is really constant. That is, in the center a 1s exposure is really 1.080s and a 5s exposure is 5.080s. ==>Shutter images: 6 20s dflats 5 20x1s focus frames. The idea here is to alternate 20 sec dflats and 20 1 sec focus frames. I use the R filter with the cb filter and take domes for this. Do this once during the run. 20s is the nominal time. You can change the time, but be sure to change the "shut1" script for any new integration time you get. To do the sequence: 0. Turn on dome lights. Let them be on for at least 10min. 1. Set fnrows=0 in telpars. This means that there will be no shifts during the focus image. Set nfexpo=20. This means there will be 20 focus exposures in a single focus sequence. telpars.fnrows = 0 telpars.nfexpo = 20 telpars.fdelta = 0 2. Take a 20sec R dome. 3. Take a focus frame. Here we will set exposure time to 1 sec and take 20 exposures. The shutter will open and close 20 times. What I do is to start the focus sequence and hit ``RETURN'' 20 times. This focus frame should also be in R. 4. Take a 20sec R dome 5. Take a 20 x 1 sec focus etc. You should keep on doing this until you have at least 5 focus frames. Begin and end with the 20sec dome flats. This can be done in the afternoon. It only needs to be done once during the run. I take this many images because the FF tends to jump around. 1 dflat 20sec 1 focus 20x1sec 2 dflat 20sec 2 focus 20x1sec 3 dflat 20sec 3 focus 20x1sec 4 dflat 20sec 4 focus 20x1sec 5 dflat 20sec 5 focus 20x1sec 6 dflat 20sec Average the 20x1 and 20 second images into test1 and test2. If you are paranoid, you can also take 10x2s, 5x4s, whatever, to prove to yourself that the error is linear. Cut and paste the following scripts. shut1.cl: # # makes shutter image - change "20" for whatever your exptime is # input: # test1 = 20x1sec average (I used a straight median) # test2 = 20sec exposure # # delta = 20(R-1)/(20-R) # imarith.pixtype = "real" imarith.calctype = "real" imarith.verbose = yes imar test1 / test2 R imar R - 1. temp1 imar temp1 * 20. temp1 imar R - 20. temp2 imar temp2 * -1. temp2 imar temp1 / temp2 temp3 fmedian temp3 shut 49 49 zmin=-1 zmin=1 hedit shut title "Shutter image" up+ ver- imdel temp1.imh,temp2.imh,temp3.imh,R.imh display shut 1 zs- zr- z1=-0.1 z2=0.1 # beep # # the output image is a frame which has "delta t" in each pixel # where delta t is the time (in seconds) from 1 second that the # pixel actually saw. Thus if the value is -0.039, that means the # pixel saw (1-0.039)s instead of 1 second. This image is input into # task "shut2" # shut2.cl: # # task to create correction images for short exposures. These images are # multiplicative. That is, if you have an image with a 4 sec exposure # you would do: # # imar image * 4sec image # hedit image SHUTCOR "Corrected by 4sec" add+ ver- show+ # # my rule of thumb is that if the correction is less than 1%, forget it. # # inputs "shut" from script shut1 # imarith.pixtype = "real" imarith.calctype = "real" imarith.verbose = yes # # 0.2 sec # imdel temp*.imh imar shut * 0. temp1 imar temp1 + 0.2 temp1 imar shut + temp1 temp2 imar temp1 / temp2 0.2sec hedit 0.2sec title "0.2sec correction" add+ up+ ver- # # 0.5 sec # imdel temp*.imh imar shut * 0. temp1 imar temp1 + 0.5 temp1 imar shut + temp1 temp2 imar temp1 / temp2 0.5sec hedit 0.5sec title "0.5sec correction" add+ up+ ver- # # 1 sec # imdel temp*.imh imar shut * 0. temp1 imar temp1 + 1. temp1 imar shut + temp1 temp2 imar temp1 / temp2 1sec hedit 1sec title "1sec correction" add+ up+ ver- # # 2 sec # imdel temp*.imh imar shut * 0. temp1 imar temp1 + 2. temp1 imar shut + temp1 temp2 imar temp1 / temp2 2sec hedit 2sec title "2 sec correction" add+ up+ ver- # # 3 sec # imdel temp*.imh imar shut * 0. temp1 imar temp1 + 3. temp1 imar shut + temp1 temp2 imar temp1 / temp2 3sec hedit 3sec title "3 sec correction" add+ up+ ver- # # 4 sec # imdel temp*.imh imar shut * 0. temp1 imar temp1 + 4. temp1 imar shut + temp1 temp2 imar temp1 / temp2 4sec hedit 4sec title "4 sec correction" add+ up+ ver- # # 5 sec # imdel temp*.imh imar shut * 0. temp1 imar temp1 + 5. temp1 imar shut + temp1 temp2 imar temp1 / temp2 5sec hedit 5sec title "5 sec correction" add+ up+ ver- # # 6 sec # imdel temp*.imh imar shut * 0. temp1 imar temp1 + 6. temp1 imar shut + temp1 temp2 imar temp1 / temp2 6sec hedit 6sec title "6 sec correction" add+ up+ ver- # # 7 sec # imdel temp*.imh imar shut * 0. temp1 imar temp1 + 7. temp1 imar shut + temp1 temp2 imar temp1 / temp2 7sec hedit 7sec title "7 sec correction" add+ up+ ver- # # 8 sec # imdel temp*.imh imar shut * 0. temp1 imar temp1 + 8. temp1 imar shut + temp1 temp2 imar temp1 / temp2 8sec hedit 8sec title "8 sec correction" add+ up+ ver- # # 9 sec # imdel temp*.imh imar shut * 0. temp1 imar temp1 + 9. temp1 imar shut + temp1 temp2 imar temp1 / temp2 9sec hedit 9sec title "9 sec correction" add+ up+ ver- # # 10 sec # imdel temp*.imh imar shut * 0. temp1 imar temp1 + 10. temp1 imar shut + temp1 temp2 imar temp1 / temp2 10sec hedit 10sec title "10sec correction" add+ up+ ver- # # 11 sec # imdel temp*.imh imar shut * 0. temp1 imar temp1 + 11. temp1 imar shut + temp1 temp2 imar temp1 / temp2 11sec hedit 11sec title "11sec correction" add+ up+ ver- # # 12 sec # imdel temp*.imh imar shut * 0. temp1 imar temp1 + 12. temp1 imar shut + temp1 temp2 imar temp1 / temp2 12sec hedit 12sec title "12sec correction" add+ up+ ver- # # # 13 sec # imdel temp*.imh imar shut * 0. temp1 imar temp1 + 13. temp1 imar shut + temp1 temp2 imar temp1 / temp2 13sec hedit 13sec title "13sec correction" add+ up+ ver- # # # 14 sec # imdel temp*.imh imar shut * 0. temp1 imar temp1 + 14. temp1 imar shut + temp1 temp2 imar temp1 / temp2 14sec hedit 14sec title "14sec correction" add+ up+ ver- # # # 15 sec # imdel temp*.imh imar shut * 0. temp1 imar temp1 + 15. temp1 imar shut + temp1 temp2 imar temp1 / temp2 15sec hedit 15sec title "15sec correction" add+ up+ ver- # # # 16 sec # imdel temp*.imh imar shut * 0. temp1 imar temp1 + 16. temp1 imar shut + temp1 temp2 imar temp1 / temp2 16sec hedit 16sec title "16sec correction" add+ up+ ver- # # # 17 sec # imdel temp*.imh imar shut * 0. temp1 imar temp1 + 17. temp1 imar shut + temp1 temp2 imar temp1 / temp2 17sec hedit 17sec title "17sec correction" add+ up+ ver- # # # 18 sec # imdel temp*.imh imar shut * 0. temp1 imar temp1 + 18. temp1 imar shut + temp1 temp2 imar temp1 / temp2 18sec hedit 18sec title "18sec correction" add+ up+ ver- # # # 19 sec # imdel temp*.imh imar shut * 0. temp1 imar temp1 + 19. temp1 imar shut + temp1 temp2 imar temp1 / temp2 19sec hedit 19sec title "19sec correction" add+ up+ ver- # # # 20 sec # imdel temp*.imh imar shut * 0. temp1 imar temp1 + 20. temp1 imar shut + temp1 temp2 imar temp1 / temp2 20sec hedit 20sec title "20sec correction" add+ up+ ver- # beep shutcor.cl: # # stupid script to make a task to correct for shutter errors # assumes you have made images which you multiply into your data # to take out shutter error, image of the form 1sec,0.5sec,20sec, etc. # task shutcor = /uw50/nick/nickcl/shutcor.cl # procedure shutcor (images) string images { prompt = 'input images' } real itmax {20., prompt='Maximum integration time for corretion'} struct *imglist begin string imgfile,img,tempfile,imcor1,imcor2,s1,s2,clout real exptime task $sed = $foreign delete("tmp$tmp*", >> "dev$null") imgfile=mktemp("tmp$tmp1") tempfile="shutc.cl" imglist=imgfile hselect(images, "$I", yes, >> tempfile) sed("s/.fits//",tempfile, >> imgfile) delete(tempfile) clout = "scor.cl" delete(clout, >>& "dev$null") while (fscan (imglist, img) != EOF) { hselect(img,"exptime",expr=yes) | scan(exptime) if (exptime > itmax) { goto CONTINUE } imcor1=str(exptime)//"sec" print(imcor1) | sed("s/\\\.sec/sec/") | scan(imcor2) s1="imar "//img//" * "//imcor2//" "//img s2="hedit "//img//" SHUTCOR "//'"Corrected by '//imcor2//'"'//" add+ up+ ver- show+" print(s1, >> clout) print(s2, >> clout) CONTINUE: } delete(imgfile) end