pro standard, directory=dir @compile_opt.pro ; On error, return to caller ;+ ; NAME: ; STANDARD ; PURPOSE: ; Calculates the calibration data from a set of standard images from ; the Hilltop telescope ; CATEGORY: ; CALLING SEQUENCE: ; standard ; INPUTS: ; Read from file ; OUTPUTS: ; Written to ascii file STANDARD.TXt ; CALLS: ; getscan ; SIDE EFFECTS: ; RESTRICTIONS: ; PROCEDURE: ; The calibration data are written into the text file STANDARD.TXT. ; This is the file read by DEN2STANDARD to do the actual calibration ; of real data. ; MODIFICATION HISTORY: ; APR-1995, Paul Hick (UCSD) ;- if n_elements(dir) eq 0 then dir = '' if checkdir(dir, tmp) then message, 'error parsing directory : ',dir dir = tmp ;file names files = ['sg28504','sg28508','sg28516','sg28532', $ 'sg29404','sg29408','sg29416','sg29432', $ 'sr28304', $ 'sr28501','sr28502','sr28504','sr28508', $ 'sr29404','sr29408', $ 'br2831733','br2831755','br2831826','br2831830',$ 'r2831733', 'r2831755', 'r2831826', 'r2831830'$ ] ;x-coordinate of center of occulting disk xcs = [ 390.5, 390.5, 390.5, 390.5, $ 394.5, 394.5, 390.5, 390.5, $ 380.0, $ 381.0, 381.0, 381., 381.0, $ 384.0, 384.0, $ 761.5,761.5,761.5,761.5, $ 761.5,761.5,761.5,761.5 $ ] ;y-coordinate of center of occulting disk ycs = [ 357.5, 357.5, 357.5, 357.5, $ 358.0, 358.0, 358.0, 358.0, $ 348.0, $ 348.0, 348.0, 348.5, 347.0, $ 349.0, 349.0, $ 697.5,697.5,697.5,697.5, $ 697.5,697.5,697.5,697.5 $ ] rsgreen = 240 ; occulting disk radius if green standard image rsred = 233 ; occulting disk radius in red standard image rgreen = 480 rred = 463 nfiles = n_elements(files) openw,/get_lun,iu,'standard.txt' printf,iu, '; file - t - xc - yc - r - dr - den - plywood (av-min-max) - slope - intercept' for i=0,nfiles-1 do begin xc = xcs[i] yc = ycs[i] case strmid(files[i],0,1) of 'g': r = rgreen 'r': r = rred 'b': r = rred 's': begin case strmid(files[i],1,1) of 'g': r = rsgreen 'r': r = rsred endcase end endcase r = 1.021*r dr = 0.35 status = flt_read( filepath(root=dir,files[i]+'.fts'), nx ,nx=2) nx = fix(nx[1,2]) file = filepath(root=dir,files[i]+'.bin') stat = bin_read(file,im,nx=nx) ; Calculate an average density over an annulus over an annulus just outside ; the occulting disk with radial extend of 0.35 times the radius. den = getscan(im,xc,yc,r, dr=dr, dpa=360.,pa=0,nscan=nden) ; Calculate an average density over the area covered by the occulting disk. ; This number is used as a measure of the background fog on the film ply = getscan(im,xc,yc,(1./25.)*r,dr=22.,dpa=360.,pa=0,minmax=minmax) t = float(strmid(files[i],5,2)) printf, iu, format='(A,I3,2F6.1,I4,F5.2,5F8.2)', $ files[i], fix[t], xc, yc, r, dr, den, ply, minmax, den-minmax[0] endfor free_lun, iu return & end