Brian Thorne skrev: > Thanks for the replies! I tried your code Sturla, and although it goes > fast, it doesn't seem to be doing quite the same thing as the ndimage > filter. > Did you see gain < 1 near the edges? If you did, I'll leave it as an excercise how to fix it (it is incredibly easy). Sturla