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

Home » Public Forums » archive » Re: do SMOOTH not on all 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: do SMOOTH not on all data [message #32685] Wed, 30 October 2002 17:16 Go to previous message
air_jlin is currently offline  air_jlin
Messages: 22
Registered: July 2001
Junior Member
hi Dave,

how about setting the values of -9999 to NaN and then use the /Nan
keyword in SMOOTH? this would mean you'd convert your data to
floating, but i'm assuming that's ok with you since you're smoothing
it:

novalid=WHERE(array eq -9999)
array=FLOAT(array)
array[novalid] = !VALUES.F_NAN
result=SMOOTH(array,5,/Nan)

hope this helps!

best,
-Johnny


-------------------------------------------
Johnny Lin
CIRES, University of Colorado
Work Phone: (303) 735-1636
Web: http://cires.colorado.edu/~johnny/
-------------------------------------------


David Oesch <oesch@giub.unibe.ch> wrote in message news:<3DC00163.2010308@giub.uninovalid=WHERE(array NE -9999)be.ch>...
> Hi outthere,
>
> I just want to use SMOOTH on a 2D array. But some data are bad (-9999)
> and should not be considered in the smoothing process. Well trying to
> assign those bad data like this
> novalid=WHERE(array NE -9999)
> result=SMOOTH(array(novalid),5)
>
> DOES not work.
>
> I think the solution is using 'NaN' option, but how to I assign -9999 as
> NaN as the !VALUES.F_NAN is write protected?
>
> Cheers
>
> Dave
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: IDL 5.6 Where?
Next Topic: How to transfer variables between files

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

Current Time: Wed Oct 08 18:26:24 PDT 2025

Total time taken to generate the page: 0.00234 seconds