;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;; pro parse_threshold, filename f = file_info(filename) if ~f.exists then message, 'File not found.' ; Open file for reading openr, lun, filename, /get_lun type = 'temp' ; Get the file header: readf, lun, type first=-1l last=-1l i=0l nlines = 0 counts= fltarr(32,32,16) while not eof(lun) and last EQ -1l do begin temp = 'string' readf, lun, temp split = strsplit(temp, /extract) if n_elements(split) le 3 or n_elements(split) gt 5 then continue if strcmp(split[2], 'PIXEL') then begin xi = fix(split[3]) yi = fix(split[4]) line = 0 endif else begin counts[xi, yi, line] = float(split[3]) line++ endelse endwhile close,lun free_lun, lun end