added first attempt at a function to calculate smoothness parameter, uncertain on the filtering/smoothing strategy I want at the moment