Data Reduction Steps
**Preliminary...seek corrections**
For this example, I am using data taken on the Mauna Kea 88" on the 19th and 20th of May, 2001.
The raw data for the 19th lived in /gryll/data8/buie/rawfits/mko/010519. I made a directory within that called "raw" and moved the data there, for reasons having to do with the docal.pro script.
First, I made the directory /gryll/data6/buie/reduced/0105mko and copied all the .pro files from the previous Mauna Kea session---found in /gryll/data6/buie/reduced/0104mko---into it. These served as templates to be edited with the appropriate information.
mkcal.pro. The items in red needed to be edited:
pushd,'/gryll/data8/buie/rawfits/mko/010519'
mkbias,'010519.','b1',450,15,crop=[20,2067,0,2047],overscan=[2068,2099]
mkflat,'010519.','r',[483,484,485,486,487,503,504,509,523,529,530],0,'010519.b1','[[none]]', $
crop=[20,2067,0,2047],overscan=[2068,2099]
popd
Explanation: the fields "crop" and "overscan" had to be changed this time, but typically if you've copied the .pro files from the same instrument those numbers should not have changed. The 450 in the mkbias line is the first bias file, and there are 15 bias frames. The list of numbers in the mkflat line is a list of science images where there are no repeated objects.
docal.pro:
pushd,'/gryll/data8/buie/rawfits/mko/010519'
keylist='/gryll/data6/buie/reduced/mko88.key'
ccdcal,'010519',483,490,path='raw',keylist=keylist
ccdcal,'010519',502,505,path='raw',keylist=keylist
ccdcal,'010519',509,509,path='raw',keylist=keylist
ccdcal,'010519',522,525,path='raw',keylist=keylist
ccdcal,'010519',529,530,path='raw',keylist=keylist
popd
Explanation: this script calls ccdcal multiple times because there are gaps in the images. For this script to work, the file calib/files.cal must be in the directory raw. The superbias and superflat, made by mkcal.pro, must also be in the calib directory.
The directory in pushd is where the calibrated files go; the script knows to look for raw data in /raw.
files.cal: The writing in blue is NOT in the file.
calib_file_v03
2068 2099 overscan
20 2067 0 2047 crop
+010519.b1 name of superbias file
[none] superdark file, none if n/a
R +010519.r filter and name of superflat
dofind.pro:
pro dofind,num1,num2
ddir='/gryll/data8/buie/rawfits/mko/010519/'
if badpar(num2,[0,2,3],0,caller='siteast: (num2) ',default=num1) then return
root='010519'
for num=num1,num2 do begin
fname=root+'.'+string(num,format='(i3.3)')
if not exists(fname+'.src') and exists(ddir+fname) then $
findsrc,fname,gain=1.74,gap=5,keylist='../mko88.key', $
maxphotsig=66000,/nodisplay,path=ddir,sigthresh=4.0
endfor
end
Explanation: When running dofind.pro, num1 and num2 are the starting and ending files for a chunk with no gaps in it. In our case, we had to run the program several times to avoid gaps.
Several things need to be changed for a given night/detector. For a batch of data, the "gap" keyword needs to be set to the FWHM of typical stars. This can be found using itool and randomly sampling stars.
For a given detector, the following parameters should be set:
keylist: Find the detector's key file and make sure dofind knows where to find it.
maxphotsig: Should be about 500-1000 counts less than the saturation value of the detector. You can use itool's radius profile to find this, or just plot a star in IDL that has a flat top and record the saturation value.
gain: You can use the value in the object header.
domatch.pro:
matchup,'010519',path='/gryll/data8/buie/rawfits/mko/010519',obj='BASENAME'
You're now ready for looking.
Send comments and corrections to Amy Jordan.