changed operation of erosion so it uses Sigma as peak intensity