[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bad data in structure (NaN HowTo?)
Thanks to both Pavel and Craig for their help.
> In your case, I'd automate the search for numerical fields, because I
> wouldn't be able to go through 450 fields myself. None of my business,
> but are you sure this is the best way to organize the data?
I am certainly open to suggestions on how to organize this data... It is
spectroscopic remote sensing data and during measurements I get a dump of
all of the sensor data (every 2 seconds) and one high resolution spectrum
of the atmosphere. The 400+ items in the structure correspond to
instrument readings (i.e. exact GMT time, spacecraft orientation data,
latitude, longitude, etc...) and different data-streams (i.e. point arrays
for each useful spectral window, an oversampled pointing mirror array,
gyro arrays, etc...). The real kicker is that I am grouping a series of
these measurements together as an array of structures as it is then much
easier to plot and manipulate this beastly data with 'plot,
atcalc.ind_time, atrl.latitude'. My real problem here is that
occasionally I get data drop out in key areas and I have to fiddle to fill
my structure in C. At the moment, if a calculated string is garbled I
fill with an empty string which is no problem. For all others (shorts,
longs, floats and doubles) I am using '-12345' to indicate bad data.
Although I can try and use data thresholds to flag this as bad data when
plotting, it tends to make a mess of things when I write files or do
analyses. What would people suggest I do for bad ints, shorts, longs, and
floats? Should I try to handle this better in C so as to avoid the
problem in IDL?
All of my structures are created in ANSI C from data which originates in
SQL databases. I currently interface to IDL via call_external (I am
looking at the alternatives to call_external but for the moment this
works).
All of this begs the question, how much data can one person plot and
interpret at one time? The answer is: you'd be surprised! but you do need a
*big* monitor :) and an 11x17 printer.
Cheers,
Randall