Changeset 4


Ignore:
Timestamp:
06/30/09 10:49:35 (3 years ago)
Author:
jwise
Message:

Peak files with "datavar" for partiview can now be read.

Location:
trunk/TOOLS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/TOOLS/hdf5_read_routines.pro

    r3 r4  
    2626    endelse 
    2727    secondslash = strpos(lines[0], '/', 1) 
    28     firstgrid = strmid(lines[0], 0, secondslash+1) 
    29     lines = lines[where(strmatch(lines, firstgrid+'*'))] 
     28    ;firstgrid = strmid(lines[0], 0, secondslash+1) 
     29    lastgrid = strmid(lines[n_elements(lines)-1], 0, secondslash+1) 
     30    lines = lines[where(strmatch(lines, lastgrid+'*'))] 
    3031    lines = strmid(lines, secondslash+1) 
    3132    ec = strpos(lines, 'Dataset')-1 
  • trunk/TOOLS/read_peaks.pro

    r1 r4  
    1414; read file 
    1515  i = 0 
    16   nst = strarr(100) 
     16  maxlines = 100 
     17  nst = strarr(maxlines) 
    1718  while (not EOF(unit)) DO BEGIN 
    1819      line = '' 
    1920      readf,unit,line 
    2021; lines that contain a #  are comment lines ! 
    21       if (strpos(line,'#') eq -1) then BEGIN 
     22      if ((strpos(line,'#') eq -1) and (strpos(line,'datavar') eq -1)) then BEGIN 
    2223          nst(i) = strtrim(strcompress(line),2) 
    2324          i = i + 1 
     25          if (i ge maxlines) then break 
    2426      ENDIF ELSE PRINT, 'line',i,' is a comment line' 
    2527  END 
Note: See TracChangeset for help on using the changeset viewer.