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

Home » Public Forums » archive » skips while reading tab delimited 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
skips while reading tab delimited data [message #24244] Tue, 20 March 2001 07:51 Go to next message
Christophe Fraser is currently offline  Christophe Fraser
Messages: 5
Registered: February 2001
Junior Member
We run IDL 5.2 on our network and I have 5.4 on my laptop. While reading in
tab delimited data into an array, IDL 5.2 skips whole lines of data, but 5.4
does not. I find this a bit alarming. Am I doing something weird?

Cheers, Christophe Fraser
Re: skips while reading tab delimited data [message #24288 is a reply to message #24244] Sun, 25 March 2001 09:16 Go to previous messageGo to next message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Christophe Fraser wrote:
>
> I use exactly the same code and the same data. But I've never has this
> problem before either. The data is generated from some C Code, so it
> shouldn't have hidden Windows symbols in it. But as it doesn't occur in 5.4,
> I guess I should just stick to that.
> Cheers, Christophe

How did you read, tell us a bit more!

Did you something like:

header=make_array(/string,1)
values=make_array(/float,5,10)

openr,lun,file,/get_lun
readf,lun,header
readf,lun,values
free_lun,/lun


I have never seen such a problem as you described.

regards

Reimar


>
>> Do both versions use the same code to read the data ? I never had IDL
>> skip anything I did not tell it to.
>>
>> Cheers,
>> Pavel
>>
>> Christophe Fraser wrote:
>>>
>>> We run IDL 5.2 on our network and I have 5.4 on my laptop. While reading
> in
>>> tab delimited data into an array, IDL 5.2 skips whole lines of data, but
> 5.4
>>> does not. I find this a bit alarming. Am I doing something weird?
>>>
>>> Cheers, Christophe Fraser

--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg1/
=============================================
a IDL library at ForschungsZentrum J�lich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml

http://www.fz-juelich.de/zb/text/publikation/juel3786.html
Re: skips while reading tab delimited data [message #24342 is a reply to message #24288] Tue, 27 March 2001 05:50 Go to previous messageGo to next message
Christophe Fraser is currently offline  Christophe Fraser
Messages: 5
Registered: February 2001
Junior Member
Well if you're interested, here's the code that reads in the data:

dataread=0
if dataread eq 0 then begin
CD, 'U:\VAIO2\C Code\residual'
Nloops = 200L
NR0Steps = 200L+1
arraydet = dblarr(3,NR0Steps)
arraystoc = dblarr(3,(NR0Steps)*Nloops)
OpenR, 1, 'residual1.txt'
ReadF, 1, arraydet
ReadF, 1, arraystoc
Close, 1
endif

Cheers, Christophe.

> How did you read, tell us a bit more!
>
> Did you something like:
>
> header=make_array(/string,1)
> values=make_array(/float,5,10)
>
> openr,lun,file,/get_lun
> readf,lun,header
> readf,lun,values
> free_lun,/lun
>
>
> I have never seen such a problem as you described.
>
> regards
>
> Reimar
>
>
>>
>>> Do both versions use the same code to read the data ? I never had IDL
>>> skip anything I did not tell it to.
>>>
>>> Cheers,
>>> Pavel
>>>
>>> Christophe Fraser wrote:
>>>>
>>>> We run IDL 5.2 on our network and I have 5.4 on my laptop. While
reading
>> in
>>>> tab delimited data into an array, IDL 5.2 skips whole lines of data,
but
>> 5.4
>>>> does not. I find this a bit alarming. Am I doing something weird?
>>>>
>>>> Cheers, Christophe Fraser
>
> --
> Reimar Bauer
>
> Institut fuer Stratosphaerische Chemie (ICG-1)
> Forschungszentrum Juelich
> email: R.Bauer@fz-juelich.de
> http://www.fz-juelich.de/icg/icg1/
> =============================================
> a IDL library at ForschungsZentrum J�lich
> http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
>
> http://www.fz-juelich.de/zb/text/publikation/juel3786.html
Re: skips while reading tab delimited data [message #24472 is a reply to message #24342] Wed, 28 March 2001 01:26 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Christophe Fraser wrote:
>
> Well if you're interested, here's the code that reads in the data:
What kind of line end character did you wrote.

is it LF or CR LF.


I learned that's IDL on windows need CR LF. And I am sure
if you wrote the data by IDL you will be able to read it
correctly. If you have a HEX Editor you will see the differences.


regards
Reimar



>
> dataread=0
> if dataread eq 0 then begin
> CD, 'U:\VAIO2\C Code\residual'
> Nloops = 200L
> NR0Steps = 200L+1
> arraydet = dblarr(3,NR0Steps)
> arraystoc = dblarr(3,(NR0Steps)*Nloops)
> OpenR, 1, 'residual1.txt'
> ReadF, 1, arraydet
> ReadF, 1, arraystoc
> Close, 1
> endif
>
> Cheers, Christophe.
>
>> How did you read, tell us a bit more!
>>
>> Did you something like:
>>
>> header=make_array(/string,1)
>> values=make_array(/float,5,10)
>>
>> openr,lun,file,/get_lun
>> readf,lun,header
>> readf,lun,values
>> free_lun,/lun
>>
>>
>> I have never seen such a problem as you described.
>>
>> regards
>>
>> Reimar
>>
>>
>>>
>>>> Do both versions use the same code to read the data ? I never had IDL
>>>> skip anything I did not tell it to.
>>>>
>>>> Cheers,
>>>> Pavel
>>>>
>>>> Christophe Fraser wrote:
>>>> >
>>>> > We run IDL 5.2 on our network and I have 5.4 on my laptop. While
> reading
>>> in
>>>> > tab delimited data into an array, IDL 5.2 skips whole lines of data,
> but
>>> 5.4
>>>> > does not. I find this a bit alarming. Am I doing something weird?
>>>> >
>>>> > Cheers, Christophe Fraser
>>
>> --
>> Reimar Bauer
>>
>> Institut fuer Stratosphaerische Chemie (ICG-1)
>> Forschungszentrum Juelich
>> email: R.Bauer@fz-juelich.de
>> http://www.fz-juelich.de/icg/icg1/
>> =============================================
>> a IDL library at ForschungsZentrum J�lich
>> http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
>>
>> http://www.fz-juelich.de/zb/text/publikation/juel3786.html

--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg1/
=============================================
a IDL library at ForschungsZentrum J�lich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml

http://www.fz-juelich.de/zb/text/publikation/juel3786.html
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: constrained_min
Next Topic: Re: Mac OS X (was: IDL i/o on G4)

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

Current Time: Fri Oct 10 07:06:45 PDT 2025

Total time taken to generate the page: 1.03633 seconds