Merge pull request #518 from pyr/feature-riemann-threshold