PRO rdvasc,file,img,cols,rows ; Routine to read ASCII-formatted Viking image files (my only way ; of accessing the noise-corrected image files I used for my thesis) ; DPS, Tue Aug 3 14:45:54 MDT 1993 ; open the input file OPENR,inunit,file,/GET_LUN ; read the dimensions of the following image c=1 & r=c READF,inunit,c,r PRINT,c,r,FORMAT='("The image is ",I3," columns by ",I3," rows")' ; skip a blank line in the file s='' READF,inunit,s ; a FLOAT array is needed to read in the entire file fimg=FLTARR(4,c,r) READF,inunit,fimg CLOSE,inunit FREE_LUN,inunit ; extract the BYTE-valued raw data (which have been noise-corrected) img=REFORM(BYTE(fimg(0,*,*)),c,r) cols=c rows=r ; We're done RETURN END