pro raws print,'' print,'This program prints Raw Image frames from the current log to the screen' cd,'',current=cdir & cd,cdir cd,'DB/Raw' print,'' print,'The current Test Log is ',cdir ;files=findfile('*', count = nfiles) ;wont work for many files spawn,'lsf',files,/noshell s=size(files) nfiles=fix(s(1)) numfiles=sstr(nfiles) ;numfiles=short string (nfiles) if files(0) eq '' then begin & print,'No files found' & goto,exit & endif print,'The number of Raw Images in this log is: ',sstr(nfiles) auto=1 ;for auto=1 tvscl min=0 ;the tvscl min setting max=4095 ;the tvscl max setting ilast=0 ;ilast is the previous value of i print,'' print,'To quit enter -1, To change minimum enter -2, to change maximum enter -3' print,'To autoscale enter -4, to scale from 0 to 2 x average enter -5' print,'To print the current image enter -6' again: i=0 ;make i an integer print,'Which file (from 0 to ',sstr(nfiles-1),')? ' read,i ;i=file index if i eq -1 then goto, exit ;end of program if i eq -2 then begin ;set minimum of stretch auto=0 read,'Min? ',min i=ilast endif if i eq -3 then begin ;set maximum of stretch auto=0 read,'Max? ',max i=ilast endif if i eq -4 then begin ;autoscale to max and min auto=1 i=ilast endif if i eq -5 then begin ;autoscale to 0 and 2 x average auto=2 i=ilast endif if i eq -6 then begin ;prints current image set_plot,'ps' device,filename = '~/idl.ps',/times,/portrait,xsize=7.5,ysize=9,yoffset=1.0,/inches,bits_per_pixel=8 if auto eq 1 then tvscl,bytscl(p,min=min(p),max=max(p),top=255) else tvscl,bytscl(p,min=min,max=max,top=255) ;p>minmin