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

Home » Public Forums » archive » doubt in IDL Smooth in 2D with NaN values and /edge
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
doubt in IDL Smooth in 2D with NaN values and /edge [message #49525] Fri, 28 July 2006 16:19
Alain is currently offline  Alain
Messages: 3
Registered: July 2006
Junior Member
Smooth is currently not available in GDL. I am using Smooth quiet
frequently. So I decided to rewrite it for GDL. The problem was to
write a test suite to check how good was my draft
(hope to submit it soon to GDL team !).

One nice test is to check whether the SMOOTH operation is invariant by
"rotation"
(if fact a transposition). If A is the test signal, a square matrix,
smooth(a,3) and transpose(smooth(transpose(a),3)) should be equal.

With IDL, in 2D case, when we have NaN, I thinks somethings goes wrong
when /Edge is set. It was reproduce on several computers at my lab.
(IDL 5.5, 6.0, 6.1 and 6.2)

a=REPLICATE(0.,9,9)
a(4,4)=20.
a(3,4)=!value.f_nan
b=transpose(a)

print, total(smooth(a,3,/nan)-transpose(smooth(b,3,/nan)))
(should be Zero, OK !)

print, total(smooth(a,3,/nan,/edge)-transpose(smooth(b,3,/nan,/edge )))
I was expecting Zero, Not OK !

What is your opinion ?
Thank You

Alain

PS: I founded nothing about that in this newsgroup archive
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: negative return values after FFT
Next Topic: rotation matching of 2D images

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

Current Time: Wed Oct 08 19:21:46 PDT 2025

Total time taken to generate the page: 0.00605 seconds