But I wouldn’t recommend the algorithm of that particular script. RMX Harmonizer has a Dekink function. Much better. And it already works as a custom parameter.
Yes, we work with RMX quite a lot but somehow particular points will do not fit 100% in to the raster.
Anyway I will checkout the the plug-in filter method.