Detecting onset using a variance window and linear degression+constant instead of just a constant