Re: Missing Data Programming Contest [message #65980 is a reply to message #65978] |
Thu, 09 April 2009 08:59   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> You should assume:
>
> 1. The data can be any data type except complex or string.
>
> 2. The missing value *could* be !VALUES.F_NAN.
>
> 3. Unsophisticated users might be using your program,
> so, for example, they might pass in a missing value
> such as 594.32.
>
> No, this is NOT my homework! But I do need it ASAP. ;-)
Thanks all, for your help. This was a more difficult problem
than I expected it to be, but this was probably due to my
program structure more than anything else. I was hoping for
a general solution, but couldn't see my way through to that.
Maybe next time.
In the end, I ended up replacing "missing" values with
NANs, and then dealing with those just before processing.
This is always complicated, of course, by not knowing
a priori what kind of data you are talking about, so there
is complicated code to deal with all of that. It's a bit
of a dog's dish, but at least it works. :-)
Cheers,
David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|