Started with the derivative approach, see description

-- maxfrequencyclean now contains a numerical derivative function, and
the start of the new approad. The results are very bad right now, I hope
this can be fixed but I am tired now.
waterfallplot with max frequency plot overlayed