Re: structure use [message #31340 is a reply to message #31333] |
Tue, 02 July 2002 11:49   |
btupper
Messages: 55 Registered: January 2002
|
Member |
|
|
On 1 Jul 2002 15:51:18 -0700, patrick@es.ucsc.edu (Patrick McEnaney)
wrote:
> Folks- This one should be easy I guess. I'm using a pointer to a 3d
> structure array to store ascii data so I can create simple plots. I've
> got the structure set as such:
>
> profiledata=fltarr(11,9999,3)
>
> Then when I access the data I just call (*pstate).profiledata(5,*,0)
> for a specific column of data, (*pstate) is the pointer. Here's my
> problem, and I'm challenged when it comes to fixing bugs so don't
> laugh if the fix is really obvious, my file sizes vary from just a few
> hundred samples to several thousand samples depending on the rate the
> instrumentation is set at. So if the file is 500 lines I'm reading in
> 500 valus in an array that 9999 samples long, the result is a decent
> profile of data but there are lots of unwanted data values plotting as
> well. So I want to plot just the good values and not the zeroes but
> the use of a structure doesn't allow changing a field size no matter
> if I use a named or anonymous type from what I've read. The question
> is, how do I just read the good values and ignore the zeroes.
>
Hi Patrick, Are you using a SeaBird CTD? If so, there is a line in
the ASCII header of a converted file that tells you how many records
(rows) are in the file... I think it is NQUAN.
If you are using this instrument, you could use the file readers we
have developed. I would have to hunt around a bit, but they aren't
too far away.
> What I'm essentially looking for is an IDL
> programming guide for non-programmer scientists and I'd like to get an
> opinion before buying.
In addition to David's book, you *really* should have Liam Gumley's
book, "Practical IDL Programming" (www.gumley.com) Each is
indispensible to me.
Ben
|
|
|