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

Home » Public Forums » archive » Re: Reading in data question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Reading in data question [message #66135 is a reply to message #66126] Fri, 17 April 2009 10:37 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
tomandwilltamu08@gmail.com writes:

> After going back through your code carefully, it all makes perfect
> sense and is very well written. I'm not sure I could have thought of
> that myself - but I guess thats why I'm the guy asking the question
> and you're the guy answering the question...

I'll just point out one other thing for the article you
are writing. The nice thing about arrays of structures
is that you can easily pull vectors out of the structure
fields.

So, in the example yesterday, if you wanted a vector
of all the "int_1" values in the third "unit" in the
file, you can do this:

IDL> d = unpackData(data[2])
IDL> help, d
D STRUCT = -> <Anonymous> Array[5]
IDL> vector = Reform(d.int_1[*])
IDL> print, vector
1 2 3 4 5

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Is there a command which could tell a CDF file is good or not?
Next Topic: correlation d'images

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

Current Time: Sat Oct 11 19:00:22 PDT 2025

Total time taken to generate the page: 0.56616 seconds