Beispiel #1
0
 def test_cfrequency(self):
     """
     """
     cfreq = freqattributes.central_frequency(self.data_win_bc, self.fs, self.smoothie, self.fk)
     rms = np.sqrt(np.sum((cfreq[0] - self.res[:, 18]) ** 2) / np.sum(self.res[:, 18] ** 2))
     self.assertEqual(rms < 1.0e-5, True)
     rms = np.sqrt(np.sum((cfreq[1] - self.res[:, 19]) ** 2) / np.sum(self.res[:, 19] ** 2))
     self.assertEqual(rms < 1.0e-5, True)
Beispiel #2
0
 def test_cfrequency_no_win(self):
     cfreq = freqattributes.central_frequency(self.data_win_bc[0], self.fs, self.smoothie, self.fk)
     rms = (cfreq - self.res[0, 18]) / self.res[0, 18]
     self.assertTrue(rms < 1.0e-5)