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

Home » Public Forums » archive » Re: Anisotropic smoothing operations
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: Anisotropic smoothing operations [message #24843 is a reply to message #24835] Thu, 26 April 2001 03:25 Go to previous message
Jaco van Gorkom is currently offline  Jaco van Gorkom
Messages: 97
Registered: November 2000
Member
Ben Tupper wrote:
> How can I smooth a 2d image with a rectangular (rather than square)
> smoothing window?

Your post presents the answer rather completely already, with demo code and all. Like you, I use
CONVOL for this. I have been wanting to write up a general routine, allowing for fractional
smoothing window widths, circular/elliptical smoothing windows, etc., but I never really got round
to it. I must have all the elements spread somewhere through my codes by now, though. I might post
it in future.

> ...
> Is there a way to make CONVOL treat missing data as SMOOTH does?

What I do is set all NaN values in the input array to zero, do the smoothing with CONVOL, and divide
the result by a similarly smoothed version of the original FINITE(InputArray). Where this division
is one by zero, the output element should be NaN, which you might want to set it to by hand to avoid
the arithmetic error thing. If you want to bother.

Cheers,
Jaco

----------------
Jaco van Gorkom e-mail: gorkom@rijnh.nl
FOM-Instituut voor Plasmafysica "Rijnhuizen", The Netherlands
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Regridding.
Next Topic: Re: sec : U Re: MPI_Plot Was: Something else

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

Current Time: Wed Oct 08 20:10:57 PDT 2025

Total time taken to generate the page: 0.01679 seconds