function return_dimm_wsec,sec1,min1,hr1,date1,sec2,min2,hr2,date2 DIMM_dir='/nfs/slac/g/ki/ki08/lsst/CPanalysis/DIMM/' readcol,DIMM_dir+'DIMM_numbers.txt',year,month,date,hr,minute,sec,fwhm,$ meandx,mstrehlstrlt2,mstrehlstr2t2,$ format='(d,d,d,d,d,d,f,f,f,f)' ;Number of lines in file is 1539 DIMM=dblarr(5,1539) for i=0,1538 do begin juldate,[year(i),month(i),date(i),hr(i),minute(i),sec(i)],jd DIMM(0,i)=fwhm(i) DIMM(1,i)=meandx(i) DIMM(2,i)=mstrehlstrlt2(i) DIMM(3,i)=mstrehlstr2t2(i) DIMM(4,i)=jd endfor if hr1 ne hr2 then begin region=where(((minute gt min1) and (hr eq hr1) and (date1 eq date)) or $ ((minute lt min2) and (hr eq hr2) and (date2 eq date))) endif else begin region=where(((sec gt sec1) and (minute ge min1) $ and (hr eq hr1) and (date1 eq date)) and $ ((sec lt sec2) and (minute le min2) $ and (hr eq hr2) and (date2 eq date))) endelse if region(0) ne -1 then begin startreg=region(0) stopreg=region(n_elements(region)-1) return,DIMM(*,startreg:stopreg) endif else begin b=fltarr(5,1) return,b endelse end