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

Home » Public Forums » archive » NaN problems
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: NAN Problem [message #69392 is a reply to message #43584] Thu, 14 January 2010 00:49 Go to previous messageGo to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
David Fanning schrieb:
> Folks,
>
> Consider this sequence of commands on my IDL 7.0.1
> LINUX version.
>
> IDL> a = Findgen(11)
> IDL> a[0] = !Values.F_NAN
> IDL> Print, Min(a), Max(a)
> NaN NaN
> IDL> b = Findgen(11)
> IDL> b[1] = !Values.F_NAN
> IDL> Print, Min(b), Max(b)
> 0.00000 10.00000
>
> What do you make of that? This is giving me a great
> deal of touble today while trying to elminate bad
> values from an image. :-(
>
> I have the same results with my Windows IDL 7.1.2
> version, except I do get a warning about a floating
> illegal operand with variable b, which I don't get
> on LINUX.
>
> Cheers,
>
> David
>
>
>

Hi David

For some reason the nan keyword was introduced

NAN

Set this keyword to cause the routine to check for occurrences of the
IEEE floating-point values NaN or Infinity in the input data. Elements
with the value NaN or Infinity are treated as missing data. (See Special
Floating-Point Values (Application Programming) for more information on
IEEE floating-point values.)

IDL> print, min(a,/nan)
1.00000
IDL> print, min(b,/nan)
0.00000


I try to avoid nan values.

Because not all operators do have the possibility to set nan operations
by a keyword. Frank has added some
http://www.fz-juelich.de/icg/icg-1/idl_icglib/idl_source/idl _work/fh_lib/f_ge.pro
functions because he likes nan.

cheers
Reimar
[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
Previous Topic: NAN Problem
Next Topic: Re: aggregate pixel values within shapes or another raster

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

Current Time: Fri Oct 10 22:09:32 PDT 2025

Total time taken to generate the page: 0.24144 seconds