findScale function

Find an appropriate smoothing parameter