structure use [message #31346] |
Mon, 01 July 2002 15:51 |
patrick
Messages: 15 Registered: July 2001
|
Junior Member |
|
|
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.
Another question, hopefully really easy this time...I've been
attempting to use idl to visualize data or otherwise just program for
the better part of two years. I get pulled away from the programming
to perform other tasks very frequently so the results of my learning
are, well....mixed. Before I started using idl I hadn't programmed at
all in several years since taking fortran in college. I've taken two
classes from RSI and have the books from the course and also Dr.
Fanning's book. The problem I have with these books is that I haven't
learned much from them because I don't perceive them as about idl as a
programming language (no offense to any of the authors). For example
if I went out and bought an O'Reilly or some other simple step by step
discussing perl or C as a programming language. What I'm looking for
is a good, simple to follow book with lots of examples (I hesitate to
say a dummies guide because I can't stand the writing style). I
noticed several additional books on Dr. Fanning's website, what is the
opinion on these? 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.
Regards,
Patrick
|
|
|