added new window_peak detector method which should give a much more sophisticated test of whether a peak is an AP or not