Window selection algorithm suitable for phase-based measurements.
Inspired by LASIF's window picking algorithm.