pro ir,i ; ;This program plots ir files. It is to be run from the test Log ;in which the files exist. ;The pass parameter is the index of the file you wish to plot ;(first file i=0, 2nd file i=1, etc) ;If the data is from a combined read the DLIS is first, and the ;ULIS is second. You have a whole 2 seconds to look at it! ;Enjoy, ;Chuck See ;test for # of input parameters if n_params() eq 0 then i=0 cd,'./DB/Ir',current=cdir ;establishes cdir as current directory ;spawn,'ls',files,/noshell ;<= this works, but not portable files=findfile('*_Ir',count = nfiles) ;<= this works, but not for many files ;spawn,'lsf',files s=size(files) nfiles=s(1) if (nfiles eq 0) then begin print, '****No files found here!****' goto, exit endif if i eq 0 then print,nfiles,' files found' !p.multi=[0,1,1] istring = strcompress(string(i)) d_irread,files(i),h,p,g siz=size(p) ;for descent ir's... if siz(2) eq 24 then begin !p.multi=[0,1,2] r=p(*,8:15)-p(*,0:7) ;DLIS Closed-Open !x.title = 'Pixel Number' !y.title = 'Azimuth Number' surface,r,az=45,title='DLIS, Max= '+sstr(max(r)),charsize=2 r=p(*,20:23)-p(*,16:19) ;ULIS Closed-Open surface,r,az=45,title='ULIS, Max= '+sstr(max(r)),charsize=2 if min(p(10:149,*)) le 15000 then $ print,string(7B),'** Warning, possible saturation of Ir,',istring wait,2 goto,exit endif if siz(2) eq 4 then !p.multi=[0,1,2] ;for combo files if min(p(10:149,0)) le 15000 then $ print,string(7B),'** Warning, possible saturation of Ir,',istring ;for simple ulis or dlis files !x.title = 'Pixel Number' !y.title = 'IR data, Shutter Closed-Open, DN' r=p(*,1)-p(*,0) ;Shutter Closed-Open. plot,r,title='IR data from file: '+files(i)+' i='+istring ;for ircomb files... if siz(2) eq 4 then begin if min(p(10:149,2)) le 15000 then $ print,string(7B),'** Warning, possible saturation of ULIS,',istring s=p(*,3)-p(*,2) ;Upward looking data for Combined reads plot,s,title='ULIS data from file: '+files(i)+' i='+istring wait,1 endif ; wait,2 exit: stop cd,cdir end