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

Home » Public Forums » archive » Re: rebin and !values.f_nan
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: rebin and !values.f_nan [message #54886 is a reply to message #54885] Sun, 15 July 2007 09:20 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Nick writes:

> I have regular arrayed data (1440*720). I'd like to change this data
> to 360*180 array.
> So I use 'Rebin' function.
> But these data have NaN value.
> If I use Rebin and there is a NaN value, new array becomes also NaN.
>
> For example, if there is only one NaN in the old array, the new-array
> becomes NaN. But I want to make a new array except NaN data. This
> situation makes residual data wasteful.
>
> A = [1.5,2.5,3.6,4,7,8.8,9.0,!values.f_nan]
> print, rebin(A, 1)
> ;result is 'NAN'
> ;That I expected value is mean(A, /nan)
>
> Is there any know-how to change array except NaN?

Well, you seem to know how to change your array.
Why don't you just find the NANs, change them to
what you want them to be, then do the REBIN?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: rebin and !values.f_nan
Next Topic: for loops for total newbies

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

Current Time: Sun Oct 12 02:14:28 PDT 2025

Total time taken to generate the page: 1.60099 seconds