Adding missing docstring.
Implemented a different window selection algorithm.

Based on sliding cross correlation windows.
Modifying the proprocessing filter.

Now exactly the same as in the source time function.