Added variables to change the window based on the P and S wave arrivals