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

Home » Public Forums » archive » IDL 4.0.1, best way to deal with missing/bad data
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: IDL 4.0.1, best way to deal with missing/bad data [message #5818 is a reply to message #5783] Thu, 22 February 1996 00:00 Go to previous messageGo to previous message
f055 is currently offline  f055
Messages: 29
Registered: April 1995
Junior Member
->>>>> "Bill" == William Thompson <thompson@orpheus.nascom.nasa.gov> writes:
Bill> The trouble with using NaN values is ......... <cut>

Another problem with NaN is (I've just discovered to my cost) that there's
no way to represent it in integer or long variables - only double or floats.

I've been using NaN since upgrading to IDL4, and have just realised an error
in a couple of my programs: I read in a dataset, set all missing data to
!values.f_nan. Then, to replicate someone else's results who did some
analysis with a precision of 1 decimal place, I rounded all my values to
1 d.p. with:

fd = float( round( fd*10. ) ) / 10.

The round, of course, altered all values to integer and set all !values.f_nan
to zeros, which I then converted back to floats. I never noticed, oops.
If I'd known, I could've kept a copy of the original fd and used that to
remask the new fd where appropriate. But even so, I'm sure some applications
would want to use data as ints or longs with some kind of missing code.


......................... Dr Tim Osborn . t.osborn@uea.ac.uk
.... ___/.. __ /.. /.. /. Senior Research Associate . phone:01603 592089
... /..... /. /.. /.. /.. Climatic Research Unit . fax: 01603 507784
.. /..... __/.. /.. /... School of Environmental Sciences.
. /..... /\ ... /.. /.... University of East Anglia .
____/.._/..\_..____/..... Norwich NR4 7TJ .
......................... UK .
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Printing problems from IDL in Windows 95
Next Topic: Problem with stereographic projection

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

Current Time: Mon Dec 01 11:21:56 PST 2025

Total time taken to generate the page: 0.07792 seconds