detect spindles works well, even if very basic. Transformation of the data occurs outside of the function and it only uses one threshold