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

Home » Public Forums » archive » Re: Missing Data Programming Contest
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: Missing Data Programming Contest [message #65997 is a reply to message #65995] Wed, 08 April 2009 12:11 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
> Humm. The only really useful suggestion I've heard so
> far (I forgot my German dictionary today, so I'm not
> sure about Reimar's contribution) is to delete the
> MISSING_VALUE keyword and let the user worry about
> it. Surely this can't be the ONLY suggestion!
>

Well, I'll give the naive answer because I am not certain what the
problem is. If the routine contains a MISSING = missing keyword,
then you can decide whether the user wants a MISSING value or NAN.
(Presumably a missing value rather than NAN is only useful for integer
data.)

do_missing = 0
do_nan = 0
if N_elements(missing) GT 0 then $
if finite(nan) then do_missing = 1 else do_nan = 1

and then you can process data accordingly. For example, to remove
missing values from a variable x

if do_missing then begin
g = where(x NE missing,Ng) ;or use FLOATS_EQUAL for testing
if Ng GT 0 then x = x[g]
endif else if do_nan then x = x[where(finite(x)]

I suspect I am missing something in your question. Or are you just
looking for more speed or elegance? --Wayne
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Is there a function to calculate the determinant of a N×N matrix?
Next Topic: Re: quick question about bouncing balls

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

Current Time: Sun Oct 12 04:39:23 PDT 2025

Total time taken to generate the page: 0.96012 seconds