pro metrics,out ; This program produces a summary of the parameters from the hc_comp.out ; files. It is to be used to create plots of the probe test metrics. ; The program reads the test logs from: /users/csee/data/log.list ; The hc_comp.out file is expected to be in: ./post/anal_results ; The output file is: /users/csee/data/metrics.data if n_params() eq 0 then out=0 ;write to output file for out=1 ; Log=['/DF301/1Oct96/Log/DISR#3_Bench_Health_Chk.2','/DF302/11Oct96/Log/DISR#3_LEFT_on_probe_11Oct96.1 ; ','] cd,'',current=cdir & cd,cdir ;_________________________________________ ;Read in Logs from File maxlogs=15 log=strarr(maxlogs) date=strarr(maxlogs) inlog='' & indate='' n=0 ;log counter cd,'/users/csee/data' close,3 openr,3,'log.list' while not eof(3) do begin readf,3,inlog, indate, format='(a59,a10)' log(n)=sstr(inlog) date(n)=sstr(indate) n=n+1 endwhile close,3 nlogs=n ;number of logs read in ;_________________________________________ ;Initialization ;General line='' num='' a='' & b='' & c='' & d='' & e='' & f='' label='' status='' ;Darkcurrent dark=fltarr(nlogs,3) ;darks(Log,memory/image/serial) ccdtemp=fltarr(nlogs,3) ;IR irtemp='' csp='' upmax='' upave='' downmax='' downave='' irtemps=fltarr(nlogs,3) upmaxs=fltarr(nlogs,3) upaves=fltarr(nlogs,3) downmaxs=fltarr(nlogs,3) downaves=fltarr(nlogs,3) ;Shutter shut=fltarr(nlogs,4) ;shut(log,upclose/upopen/dnclose/dnopen) ;ULVS ulvs=fltarr(nlogs,3,3) ;ulvs(log,bright/b-d/summed,Max/Min/Ave) ;SA sa=fltarr(nlogs,8,3) ;sa(log,brights & summed 1/2/3/4,max/mim/ave) ;DLVS dlvs=fltarr(nlogs,2,3) ;dlvs(log,bright & summed,max/mim/ave) ;Image image=fltarr(nlogs,3,3,3) ;image(log,M/S/HRI,sq.rt/none/comp,max/mim/ave) imagetemp=fltarr(nlogs,3) ;imagetemp(log,sq.rt/none/comp) ;Full full=fltarr(nlogs,3) ;full(log,Max/Min/Ave), 8ms bright ;Violets violets=fltarr(nlogs,4) ;violets(log,Bright_D/Bright_U/Dark_D/Dark_U) ;Heaters fpheat=fltarr(nlogs) auxheat=fltarr(nlogs) ;Cal Lamps cal=fltarr(nlogs,3) ;cal(log,lamp 1/2/3), lamp power ;Sun Sensor Lamp SS=fltarr(nlogs,3) ;SS(log,power/reading/dn per watt) ;_________________________________________ ;Begin Reading in data from hc_comp.out files for n=0,nlogs-1 do begin print,log(n) cd,log(n)+'/post/anal_results' close,1 openr,1,'hc_comp.out' ;_________________________________________ Darkcurrent: q=0 while q eq 0 do begin readf,1,label,format='(a5)' if sstr(label) eq 'Dark' then begin q=1 print,'**Darkcurrent' for k=0,1 do readf,1,label for i=0,2 do begin readf,1,label,rate,temp,format='(a23,T25,f8.3,T36,f7.2)' dark(n,i)=rate ccdtemp(n,i)=temp endfor endif endwhile ;_________________________________________ IR: q=0 while q eq 0 do begin readf,1,label,status,irtemp,csp, upmax, upave, downmax, downave, $ format='(a7,a16,A10,a30,T67,A8,T76,A8,T85,A8,T94,A8)' if sstr(label) eq 'First' then begin q=1 print,'**IR' for j=0,2 do begin irtemps(n,j)=irtemp upmaxs(n,j)=float(upmax) upaves(n,j)=float(upave) downmaxs(n,j)=float(downmax) downaves(n,j)=float(downave) readf,1,label readf,1,label readf,1,label readf,1,label,status,irtemp,csp, upmax, upave, downmax, downave, $ format='(a7,a16,A10,a30,T67,A8,T76,A8,T85,A8,T94,A8)' endfor endif endwhile ;_________________________________________ Shutter: while not eof(1) do begin readf,1,label,format='(a4)' if sstr(label) eq 'Time' then begin print,'**Shutter" readf,1,label for i=0,3 do begin readf,1,a,b,c,format='(a15,T16,3f10.3)' shut(n,i)=float(c) for j=0,2 do readf,1,label endfor goto,ULVS endif endwhile ;_________________________________________ ULVS: while not eof(1) do begin readf,1,label,format='(a8)' if sstr(label) eq 'ULVS #:5' then begin print,'**ULVS' for j=0,2 do begin ;type counter for k=0,2 do readf,1,label readf,1,a,b,c,d,e,f,format='(a13,T14,f5.1,T24,a4,T32,f7.1,T40,f7.1,T48,f7.1)' ulvs(n,j,0)=float(d) ulvs(n,j,1)=float(e) ulvs(n,j,2)=float(f) endfor goto,SA1 endif endwhile ;_________________________________________ SA1: while not eof(1) do begin readf,1,label,format='(a6)' if sstr(label) eq 'SA #4,' then begin print,'**SA" for j=0,3 do begin for k=0,2 do readf,1,label readf,1,a,b,c,d,format='(a23,T24,3f8.1)' sa(n,j,0)=float(b) sa(n,j,1)=float(c) sa(n,j,2)=float(d) endfor goto,SA2 endif endwhile SA2: while not eof(1) do begin readf,1,label,format='(a20)' if sstr(label) eq 'SA #4, Dark, Summed' then begin for j=4,7 do begin for k=0,2 do readf,1,label readf,1,a,b,c,d,format='(a23,T24,3f8.1)' sa(n,j,0)=float(b) sa(n,j,1)=float(c) sa(n,j,2)=float(d) endfor goto,DLVS endif endwhile ;_________________________________________ DLVS: while not eof(1) do begin readf,1,label,format='(a9)' if sstr(label) eq 'DLVS dark' then begin print,'**DLVS' j=0 ;Bright for k=0,2 do readf,1,label ;skip down 3 readf,1,a,b,c,d,e,f,format='(a19,T20,f5.1,T30,a4,T38,f7.1,T46,f7.1,T54,f7.1)' dlvs(n,j,0)=float(d) dlvs(n,j,1)=float(e) dlvs(n,j,2)=float(f) j=1 ;Summed bright for k=0,6 do readf,1,label ;skip down 7 readf,1,a,b,c,d,e,f,format='(a19,T20,f5.1,T30,a4,T38,f7.1,T46,f7.1,T54,f7.1)' dlvs(n,j,0)=float(d) dlvs(n,j,1)=float(e) dlvs(n,j,2)=float(f) goto,Image endif endwhile ;_________________________________________ Image: while not eof(1) do begin readf,1,label,format='(a16)' if sstr(label) eq 'Image, HRI dark' then begin print,'**Image" m=0 ;processing counter, sq. rooted for j=0,2 do begin ;M/S/HRI counter for k=0,2 do readf,1,label ;skip down 3 readf,1,a,b,c,d,e,format='(a,T23,4f9.1)' imagetemp(n,m)=float(b) image(n,j,m,0)=float(c) image(n,j,m,1)=float(d) image(n,j,m,2)=float(e) endfor for k=0,4 do readf,1,label ;skip down 6 for m=1,2 do begin ;processing counter, unprocessed & compressed for j=0,2 do begin ;M/S/HRI counter for k=0,2 do readf,1,label ;skip down 3 readf,1,a,b,c,d,e,format='(a,T23,4f9.1)' imagetemp(n,m)=float(b) image(n,j,m,0)=float(c) image(n,j,m,1)=float(d) image(n,j,m,2)=float(e) endfor endfor goto,Full endif endwhile ;_________________________________________ Full: while not eof(1) do begin readf,1,label,format='(a14)' if sstr(label) eq '1.0 sec dark' then begin print,'**Full' for k=0,2 do readf,1,label ;skip down 3 readf,1,a,b,c,d,format='(a22,T23,3f9.1)' full(n,0)=float(b) full(n,1)=float(c) full(n,2)=float(d) goto,Violets endif endwhile ;_________________________________________ Violets: print,'**Violets' for k=0,7 do readf,1,label ;skip down 8 for j=0,3 do begin readf,1,a,b,format='(a14,i4)' violets(n,j)=float(b) for k=0,2 do readf,1,label ;skip down 3 endfor ;_________________________________________ Heaters: while not eof(1) do begin readf,1,format='(a24,a12)',line,num line=strtrim(line,2) & num=strtrim(num,2) if line eq 'Focal Plane Heater Rate:' then begin print,'**Heaters' print,num num=float(num) fpheat(n)=num num='' endif if line eq 'Aux Board Heater Rate:' then begin print,num num=float(strtrim(num,2)) auxheat(n)=num num='' goto,CalLamps endif endwhile ;_________________________________________ CalLamps: while not eof(1) do begin readf,1,label,format='(a6)' if sstr(label) eq 'Lamp 3' then begin print,'**Cal Lamps' readf,1,label ;skip down 1 line for j=0,2 do begin readf,1,a,b,c,d,format='(a11,T12,a1,T16,2f9.3)' cal(n,j)=float(c)*float(d) endfor goto,SS endif endwhile ;_________________________________________ SS: while not eof(1) do begin readf,1,label,format='(a28)' if sstr(label) eq 'Voltage' then begin print,'**Sun Sensor Lamp' readf,1,a,b,c,d,format='(a16,T17,2f10.3,T41,f7.1)' SS(n,0)=float(b)*float(c) SS(n,1)=float(d) SS(n,2)=float(d)/(float(b)*float(c)) endif endwhile close,1 endfor ;end of logs loop (n) ;_________________________________________ Output: if out eq 1 then begin close,2 openu,2,'/users/csee/data/metrics.data',/append printf,2,'' printf,2,'___________________________________' printf,2,'Created on ',systime(0) ;_________________________________________ ;Logs printf,2,'' for n=0,nlogs-1 do printf,2,n+1,Log(n),Date(n),format='(i3,T10,a,T70,a)' ;_________________________________________ Fields: printf,2,'' printf,2,'' field=12345.678 printf,2,field,field,field,field,field,field,field, $ format='("Label Area",T15,"Date Field",7F10.3) ;_________________________________________ ;Darkcurrent printf,2,'' printf,2,format='("Darkcurrent",T20,"Date",T30,"dn/sec.",T40,"Temp.")' printf,2,' Memory Zone' for n=0,nlogs-1 do printf,2,n+1,date(n),dark(n,0),ccdtemp(n,0),format='(i3,T15,a10,2f10.3)' printf,2,' Image Zone' for n=0,nlogs-1 do printf,2,n+1,date(n),dark(n,1),ccdtemp(n,1),format='(i3,T15,a10,2f10.3)' printf,2,' Serial Register' for n=0,nlogs-1 do printf,2,n+1,date(n),dark(n,2),ccdtemp(n,2),format='(i3,T15,a10,2f10.3)' ;_________________________________________ ;IR printf,2,'' printf,2,'IR Closed-Open Data' printf,2,format='("No.",T20,"Date",T30,"Temp",T40,"Upmax",T50,"Upave",T60,"Downmax",T70,"Downave")' for j=0,2 do begin printf,2,'Measurement #',j+1 for n=0,nlogs-1 do begin printf,2,n+1,date(n),irtemps(n,j),upmaxs(n,j),upaves(n,j), $ downmaxs(n,j),downaves(n,j), format='(i3,T15,a10,T25,5f10.3) endfor endfor ;_________________________________________ ;Shutter printf,2,'' printf,2,'Shutter, 8ms fraction' printf,2,'Up Closed' for n=0,nlogs-1 do printf,2,n+1,date(n),shut(n,0),format='(i3,T15,a10,f10.3)' printf,2,' Up Open' for n=0,nlogs-1 do printf,2,n+1,date(n),shut(n,1),format='(i3,T15,a10,f10.3)' printf,2,' Down Closed' for n=0,nlogs-1 do printf,2,n+1,date(n),shut(n,2),format='(i3,T15,a10,f10.3)' printf,2,' Down Open' for n=0,nlogs-1 do printf,2,n+1,date(n),shut(n,3),format='(i3,T15,a10,f10.3)' ;_________________________________________ ;ULVS printf,2,'' printf,2,format='("ULVS",T20,"Date",T30,"Max.",T40,"Min.",T50,"Ave.")' printf,2,' Bright' for n=0,nlogs-1 do printf,2,n+1,date(n),ulvs(n,0,0),ulvs(n,0,1),ulvs(n,0,2), $ format='(i3,T15,a10,3f10.3)' printf,2,' Bright-Dark' for n=0,nlogs-1 do printf,2,n+1,date(n),ulvs(n,1,0),ulvs(n,1,1),ulvs(n,1,2), $ format='(i3,T15,a10,3f10.3)' printf,2,' Summed' for n=0,nlogs-1 do printf,2,n+1,date(n),ulvs(n,2,0),ulvs(n,2,1),ulvs(n,2,2), $ format='(i3,T15,a10,3f10.3)' ;_________________________________________ ;Solar Aureole printf,2,'' printf,2,format='("Solar Aureole",T20,"Date",T30,"Max.",T40,"Min.",T50,"Ave.")' label=strarr(9) label=['SA #1, Bright','SA #2, Bright','SA #3, Bright','SA #4, Bright',$ 'SA #1, Summed','SA #2, Summed','SA #3, Summed','SA #4, Summed',''] for i=0,7 do begin printf,2,label(i) for n=0,nlogs-1 do printf,2,n+1,date(n),sa(n,i,0),sa(n,i,1),sa(n,i,2), $ format='(i3,T15,a10,3f10.3)' endfor ;_________________________________________ ;DLVS printf,2,'' printf,2,format='("DLVS",T20,"Date",T30,"Max.",T40,"Min.",T50,"Ave.")' printf,2,' Bright' for n=0,nlogs-1 do printf,2,n+1,date(n),dlvs(n,0,0),dlvs(n,0,1),dlvs(n,0,2), $ format='(i3,T15,a10,3f10.3)' printf,2,' Summed' for n=0,nlogs-1 do printf,2,n+1,date(n),dlvs(n,1,0),dlvs(n,1,1),dlvs(n,1,2), $ format='(i3,T15,a10,3f10.3)' ;_________________________________________ ;Image printf,2,'' printf,2,format='("Image",T20,"Date",T30,"Max.",T40,"Min.",T50,"Ave.",T60,"Temp.")' label1=strarr(3) label2=strarr(3) label1=['MRI','SLI','HRI'] label2=[' Sq,rt',', none',' comp.'] for j=0,2 do begin ;processing for i=0,2 do begin ;M/S/HRI counter printf,2,label1(i)+label2(j) for n=0,nlogs-1 do printf,2,n+1,date(n),image(n,i,j,0),image(n,i,j,1), $ image(n,i,j,2),imagetemp(n,j),format='(i3,T15,a10,4f10.3)' endfor endfor ;_________________________________________ ;Full printf,2,'' printf,2,format='("Full",T20,"Date",T30,"Max.",T40,"Min.",T50,"Ave.")' printf,2,' 8ms Bright' for n=0,nlogs-1 do printf,2,n+1,date(n),full(n,0),full(n,1),full(n,2), $ format='(i3,T15,a10,3f10.3)' ;_________________________________________ ;Violets printf,2,'' printf,2,format='("Violet")' printf,2,' Down, Bright' for n=0,nlogs-1 do printf,2,n+1,date(n),violets(n,0),format='(i3,T15,a10,f10.3)' printf,2,' Up, Bright' for n=0,nlogs-1 do printf,2,n+1,date(n),violets(n,1),format='(i3,T15,a10,f10.3)' printf,2,' Down, Dark' for n=0,nlogs-1 do printf,2,n+1,date(n),violets(n,2),format='(i3,T15,a10,f10.3)' printf,2,' Up, Dark' for n=0,nlogs-1 do printf,2,n+1,date(n),violets(n,3),format='(i3,T15,a10,f10.3)' ;_________________________________________ ;Heaters printf,2,'' printf,2,'Focal Plane & Aux Board Heater Rates' printf,2,format='("No.",T20,"Date",T30,"Focal",T40,"Aux.")' for n=0,nlogs-1 do begin printf,2,n+1,date(n),fpheat(n),auxheat(n),$ format='(i3,T15,a10,2f10.3) endfor ;_________________________________________ ;Cal lamps printf,2,'' printf,2,format='("Cal lamp Power",T20,"Date",T30,"Lamp1",T40,"Lamp2",T50,"Lamp3")' for n=0,nlogs-1 do printf,2,n+1,date(n),cal(n,0),cal(n,1),cal(n,2), $ format='(i3,T15,a10,3f10.3)' ;_________________________________________ ;Sun Sensor Lamp printf,2,'' printf,2,format='("Sun Sensor",T20,"Date",T30,"power",T38,"reading",T48,"dn/watt")' for n=0,nlogs-1 do printf,2,n+1,date(n),ss(n,0),ss(n,1),ss(n,2), $ format='(i3,T15,a10,g10.3,f10.3,g10.3)' close,2 endif ;This is the end of the output if statement close,1 stop end