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

Home » Public Forums » archive » Re: 48 variable limit?
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
Re: 48 variable limit? [message #34979] Tue, 06 May 2003 13:39
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
"Shane Mayor" <shane@ucar.edu> wrote in message
news:4d5b78c4.0305061209.82be99d@posting.google.com...
> I'm very embarassed:...

I hereby declare a contest for most embarassing mistake on
comp.lang.idl-pvwave. First person entries only, and remember: Google News
knows all.

I'll accept this as your entry Shane, but frankly I don't think it's going
to be competitive.

I am biding my time before I submit my entry.

--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
Re: 48 variable limit? [message #34983 is a reply to message #34979] Tue, 06 May 2003 13:29 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Shane Mayor (shane@ucar.edu) writes:

> I'm very embarassed: there is no limit.
> There really are only 48 columns in the file
> when I had totally convinced myself there were 50.
> I'm clearly getting senile. Thanks for your
> suggestions and my apologies for bothering you all.

Oh, goodness. If we all start apologizing for all the
idiotic things we've said on this newsgroup there will
be no end of it.

Cheers,

David

P.S. Let's just say *I* have no intention of going next. :-(

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: 48 variable limit? [message #34987 is a reply to message #34983] Tue, 06 May 2003 13:09 Go to previous message
shane is currently offline  shane
Messages: 3
Registered: June 1998
Junior Member
I'm very embarassed: there is no limit.
There really are only 48 columns in the file
when I had totally convinced myself there were 50.
I'm clearly getting senile. Thanks for your
suggestions and my apologies for bothering you all.

Shane

David Fanning <david@dfanning.com> wrote in message news:<MPG.192073907dc93057989b81@news.frii.com>...
> Shane Mayor (shane@ucar.edu) writes:
>
>> I've been given an ASCII file of numbers 50 columns wide
>> by 6600 rows long, blank-space separated values.
>> I've tried both read_ascii and readf, reads and have concluded
>> that these routines can only read up to 48 variables in a row.
>> Can anybody confirm this and/or suggest alternatives?
>
> Uh, I don't think so. I'd look elsewhere for the problem. :-)
>
> Cheers,
>
> David
Re: 48 variable limit? [message #35000 is a reply to message #34987] Tue, 06 May 2003 07:39 Go to previous message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
"Shane Mayor" <shane@ucar.edu> wrote in message
news:4d5b78c4.0305051207.34690816@posting.google.com...
> Hi,
> I've been given an ASCII file of numbers 50 columns wide
> by 6600 rows long, blank-space separated values.
> I've tried both read_ascii and readf, reads and have concluded
> that these routines can only read up to 48 variables in a row.
> Can anybody confirm this and/or suggest alternatives?
> Thanks much,
> Shane Mayor
> NCAR
> Boulder, CO

Hi Shane,

As a wild guess as to why it doesn't work, are there some columns that
are not seperated by a space (like a -9999 used for a bad data file, in a
column only 4 digits wide)?



I did a quicky test, and it works fine.

Here is the idl code:
filename = 'C:\junktest.txt'
d = read_ascii(filename)
help,d
end

Here is the txt file (54 columns, 3 rows)
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2
3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2
3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2
3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9


And here is the command log
IDL> .GO

% Compiled module: UNIQ.

D STRUCT = -> <Anonymous> Array[1]

IDL> help,d,/st

** Structure <17039a8>, 1 tags, length=648, data length=648, refs=1:

FIELD01 FLOAT Array[54, 3]

IDL> print,d.field01

1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000
1.00000 2.00000 3.00000 4.00000 5.00000 6.00000

7.00000 8.00000 9.00000 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000
7.00000 8.00000 9.00000 1.00000 2.00000 3.00000

4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 1.00000 2.00000 3.00000
4.00000 5.00000 6.00000 7.00000 8.00000 9.00000

1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000

1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000
1.00000 2.00000 3.00000 4.00000 5.00000 6.00000

7.00000 8.00000 9.00000 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000
7.00000 8.00000 9.00000 1.00000 2.00000 3.00000

4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 1.00000 2.00000 3.00000
4.00000 5.00000 6.00000 7.00000 8.00000 9.00000

1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000

1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000
1.00000 2.00000 3.00000 4.00000 5.00000 6.00000

7.00000 8.00000 9.00000 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000
7.00000 8.00000 9.00000 1.00000 2.00000 3.00000

4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 1.00000 2.00000 3.00000
4.00000 5.00000 6.00000 7.00000 8.00000 9.00000

1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000
Re: 48 variable limit? [message #35007 is a reply to message #35000] Mon, 05 May 2003 13:38 Go to previous message
Liam E. Gumley is currently offline  Liam E. Gumley
Messages: 378
Registered: January 2000
Senior Member
"Shane Mayor" <shane@ucar.edu> wrote in message
news:4d5b78c4.0305051207.34690816@posting.google.com...
> I've been given an ASCII file of numbers 50 columns wide
> by 6600 rows long, blank-space separated values.
> I've tried both read_ascii and readf, reads and have concluded
> that these routines can only read up to 48 variables in a row.
> Can anybody confirm this and/or suggest alternatives?

Shane,

Are you reading the data line-by-line like this?

readf, lun, a01, a02, a03, a04, a05, ..., a48

If so, then it's possible you could run into a limit.

Why not try

data = fltarr(50, 6600)
readf, lun, data

Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
Re: 48 variable limit? [message #35008 is a reply to message #35007] Mon, 05 May 2003 13:12 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Shane Mayor (shane@ucar.edu) writes:

> I've been given an ASCII file of numbers 50 columns wide
> by 6600 rows long, blank-space separated values.
> I've tried both read_ascii and readf, reads and have concluded
> that these routines can only read up to 48 variables in a row.
> Can anybody confirm this and/or suggest alternatives?

Uh, I don't think so. I'd look elsewhere for the problem. :-)

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: overload init function in class/object ?
Next Topic: Re: egg timer

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

Current Time: Wed Oct 08 15:17:57 PDT 2025

Total time taken to generate the page: 0.00744 seconds