Michael Barton wrote: > Tests over the last couple days suggest that r.neighbors may be the, or one > of, the causes. We lose most of the artifacts if we turn off smoothing using > r.neighbors, and the artifacts are much worse with a neighborhood of 7x7 > than 3x3. > > We're probably wrong about the date, however. This seems to only show up > clearly in very long runs (a simulation of 50 recursive models) and is most > pronounced with larger smoothing neighborhoods. Previously we'd done a small > neighborhood of 3x3 and done most of our tests for no more than 10 > iterations. We only did a couple of long ones and were looking more at stats > from the output than the maps themselves. Now we are doing a number of 50+ > iteration runs (the most recent one ran for nearly 600 years simulated > time). > > using a median smoother gives much worse results than a mean smoother, > though a median ought to be better the larger the neighborhood is, since it > should not be affected as much by extreme values.
The nonlinear nature of the median can exacerbate discontinuities. The median chooses a single value from the set of inputs; it doesn't average them. This can make it a poor choice for a smoothing filter, particularly if you are going to calculate derivatives (e.g. r.slope.aspect) on the result. If you want to eliminate outliers, a better option might be an average over some quantile range (e.g. 20%-80%), or a weighted average where values near the median get a larger weight. If you're trying to remove spatial noise, you normally want a filter which gives greater weight to the values nearer the centre. To avoid "contamination" by noise, one method is to use a variety of linear filters and take the median of the results. -- Glynn Clements <[EMAIL PROTECTED]> _______________________________________________ grass-dev mailing list [email protected] http://grass.itc.it/mailman/listinfo/grass-dev

