[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Anisotropic smoothing operations





Jaco van Gorkom wrote:

> >...
> > 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.
>

Hello,


That's a good idea.  I'm not sure how to implement it in my situation.

I am using a routine for building a 2d grid from scattered data.  The grid is initialized with a user
defined MISSING value (in my case, NAN.)  The data is sprinkled over the grid then smoothed with the
moving boxcar.  This sprinkle/smooth sequence is repeated a number of times.   Using SMOOTH, the NANs
are replaced by (real) smoothed values as the influence of the scattered data values grows outward.  It
is possible (likely) that there will be NANs remaining on the grid after the sprinkle/smooth iterations
have been completed.  These areas will be in the regions of the grid where the original data values are
sparse.   That is the effect I would like to achieve.


Thanks,

Ben


--
Ben Tupper
248 Lower Round Pond Road
POB 106
Bristol, ME 04539

Tel: (207) 563-1048
Email: PemaquidRiver@tidewater.net