comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » erratic EOF encountered when reading in similar data
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
erratic EOF encountered when reading in similar data [message #44709] Tue, 12 July 2005 08:11
Catherine is currently offline  Catherine
Messages: 1
Registered: July 2005
Junior Member
Hi
I'm having trouble understanding why I sometimes cannot read in data
due to an EOF encounter which is not supposed to be there.
All my data files are in the same format (on visual inspection) :
Header with 10 lines of information, including how long the data will
be, and then the data itself which consists of floating precision
numbers in 7 columns by 1125 rows.

I read in the file as follows:

if (file) then begin
status=fstat(1)
openr, lun1, file, /get_lun
print, 'Opening : ',file

header = strarr(10)
readf, lun1, header
reads, header[1], version, format="(9X,F4)"

if (version EQ x) then begin
...
studytime = FIX(header[6])
size_array = studytime

data = dblarr(7,size_array)
WHILE NOT EOF(lun1) do readf, lun1, data

close, lun1
free_lun, lun1

end

...

But sometimes I cannot get passed the EOF criterium and wonder whether
it is possible make sure there are no hidden tabs at the end of the
last header line that could prevent it from proceding.
Or perhaps there is something else that I'm doing wrong..
Has anyone else had this before?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: XYZ plotting
Next Topic: single spectra inverse mnf

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:47:29 PDT 2025

Total time taken to generate the page: 0.00530 seconds