PRO printfst,unit,string_array ; This little routine prints the elements of a string array one ; line at a time to the specified logical unit. FOR k=0,N_ELEMENTS(string_array)-1 DO PRINTF,unit,string_array(k) RETURN END PRO ucall,yr,mo,day,script=script,quiet=quiet IF N_PARAMS() LT 3 THEN BEGIN MESSAGE,'Usage: ucall,yr,mo,day',/INFORMATIONAL RETURN ENDIF ds=STRING(day,FORMAT='(I2.2)') @isitdos IF KEYWORD_SET(script) THEN $ IF dos $ THEN OPENW,scrunit,'c:\idl\steele\uc'+ds+'.bat',/GET_LUN $ ELSE BEGIN OPENW,scrunit,'/jasper/cnsr3_data1/scripts/uc'+ds,/GET_LUN PRINTF,scrunit,'#! /bin/csh -f' ENDELSE tncf=0 start=SYSTIME(1) ; First check out the airglow and calibration images it=[2,5] FOR hi=0,1 DO BEGIN tt=imagetype(it(hi)) fc=STRING(BYTE(firstchars(it(hi)))+13B) FOR ic=0,1 DO BEGIN FOR jf=0,4 DO BEGIN gp=iroot+dd+tt+dd ip=STRING(gp,cc,ic,dd,ff,jf,dd,fc,ds,ic,jf $ ,FORMAT='(A,A1,I1,2A1,I1,A1,A1,A2,2I1,"???.???")') cf=finkfile(ip,COUNT=ncf) ; cf=finkfile('/jasper/cnsr3_data1/air/c0/f0/t'+ds+'00060.???',COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN kiexpand,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN printfst,scrunit,script ENDFOR ; (k) tncf=tncf+ncf ENDFOR ; (jf) ENDFOR ; (ic) ENDFOR ; (hi) ; Then check out the auroral images tt=imagetype(0) fc='n' FOR ic=0,1 DO BEGIN jf=2 gp=iroot+dd+tt+dd ip=STRING(gp,cc,ic,dd,ff,jf,dd,fc,ds,ic,jf $ ,FORMAT='(A,A1,I1,2A1,I1,A1,A1,A2,2I1,"???.???")') cf=finkfile(ip,COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN kiexpand,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN printfst,scrunit,script ENDFOR ; (k) tncf=tncf+ncf ENDFOR ; (ic) ; Finally check out the dark frames tt=imagetype(3) fc='q' FOR ic=0,1 DO BEGIN gp=iroot+dd+tt+dd ip=STRING(gp,cc,ic,dd,fc,ds,ic $ ,FORMAT='(A,A1,I1,2A1,A2,I1,"????.???")') cf=finkfile(ip,COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN kiexpand,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN printfst,scrunit,script ENDFOR ; (k) tncf=tncf+ncf ENDFOR ; (ic) ; Sample of how it used to be done ; cf=finkfile('/jasper/cnsr3_data1/air/c0/f1/t'+ds+'01060.???',COUNT=ncf) ; IF ncf GE 1 THEN $ ; FOR k=0,ncf-1 DO BEGIN ; kiexpand,cf(k),/rm,script=script ; IF KEYWORD_SET(script) THEN printfst,scrunit,script ; ENDFOR ; tncf=tncf+ncf IF KEYWORD_SET(script) THEN BEGIN CLOSE,scrunit FREE_LUN,scrunit IF dos THEN BEGIN SPAWN,'c:\idl\steele\uc'+ds+'.bat' SPAWN,'del c:\idl\steele\uc'+ds+'.bat' ENDIF ELSE BEGIN SPAWN,'chmod 744 /jasper/cnsr3_data1/scripts/uc'+ds SPAWN,'/usr/net/rsh smith /jasper/cnsr3_data1/scripts/uc'+ds SPAWN,'rm /jasper/cnsr3_data1/scripts/uc'+ds ENDELSE ENDIF finish=SYSTIME(1) wrilist,yr,mo,day,quiet=quiet weedout,yr,mo,day,quiet=quiet alldone=SYSTIME(1) IF NOT KEYWORD_SET(quiet) THEN BEGIN PRINT,finish-start,tncf $ ,FORMAT='(F6.1," s elapsed in expanding ",I0," files:")' IF tncf GT 0 THEN PRINT,(finish-start)/tncf $ ,FORMAT='(F5.2," s per file")' PRINT,alldone-finish $ ,FORMAT='(F6.1," s elapsed in writing image lists and weeding out bad files")' PRINT,STRING(7B),FORMAT='(A)' ENDIF RETURN END