test that peak frequency is the frequency of a sine wave