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

Home » Public Forums » archive » Re: MISSING_VALUE
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_VALUE [message #43344 is a reply to message #43250] Wed, 30 March 2005 05:52 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Matthias Demuzere writes:

> Now the problem has moved. When the dataset is initially read in with
> read_ascii, I get the value NaN where it should....
>
> BUT....I declare empty arrays (with zero's) in which I put a part of the
> original array. So where there is the value NaN, my new array now shows
> 0....Any solutions?
> Hope I made myself clear!

In general, setting missing values to NaN should probably be done
in the last stage of data preparation, if possible, since it is
typically MUCH easier to work with numbers than with, well, not
numbers. I would probably set the missing values from READ_ASCII
to something easily recognizable as not a valid value (e.g.
-99999.9) and do all your array manipulation with these
numbers. Then, at the end, find all the -99999.9s and turn
them into NaNs.

The only other solution you have is to find the NaNs in your
original array and set the corresponding values in your new
array to NaN. But that is harder to do:

http://www.dfanning.com/tips.check_nan.html

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: C Alignment/IDL structures
Next Topic: IDLWAVE EMACS QUESTION

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

Current Time: Sat Oct 11 14:20:32 PDT 2025

Total time taken to generate the page: 1.19983 seconds