thresholddetection packageΒΆ