pro datatemps,i ;This program displays the ccd temperature for files in the DB subdirectories. ;It is to be run from any one of the DB subdirectroies (like ./DB/Ir) ;in displays temperature for each file in the directory ; ;files=findfile('*',count = nfiles) pwd files=t_getfil('*MMX*') & siz=size(files) & nfiles=siz(1) ;for lots of files if n_params() eq 0 then $ ;read,'There are ',sstr(nfiles),' files here. Which header would you like? (1 to ',sstr(nfiles),'): ',i print,'There are ',sstr(nfiles),' files here. print,'' ;if i lt 1 or i gt nfiles then begin & print,'There is no file by that number ',sstr(i) & goto,exit2 & endif ;if i out of range if (nfiles eq 0) then begin print, '****No data files found here!****' goto, exit endif ;if i eq 1 then print,nfiles,' files found' print,'File CCD Temp' for n=0,nfiles-1 do begin if strpos(files(n),'Ir') ne -1 then goto,ir ;for IR files use d_irread d_read,files(n),h0,p0 print,files(n),' ',d_value(h0,22) endfor goto,exit ir: d_irread,files(i-1),h0,p0,g0 d_shead,h0 exit: ;d_shead,h0,'c:\idl_temp.txt' ;spawn,'notepad c:\idl_temp.txt' exit2: ;stop end