예제 #1
0
파일: test_cohen.py 프로젝트: dafx/pytftb
 def test_pseudo_wv_energy(self):
     """Test the energy property of the pseudo WV representation."""
     signal, _ = fmsin(128)
     signal = signal / 128.0
     tfr = cohen.pseudo_wigner_ville(signal)
     x = np.sum(np.sum(tfr))
     y = np.sum(np.abs(signal) ** 2) * 128
     self.assertAlmostEqual(x, y, places=3)
예제 #2
0
 def test_pseudo_wv_energy(self):
     """Test the energy property of the pseudo WV representation."""
     signal, _ = fmsin(128)
     signal = signal / 128.0
     tfr = cohen.pseudo_wigner_ville(signal)
     x = np.sum(np.sum(tfr))
     y = np.sum(np.abs(signal)**2) * 128
     self.assertAlmostEqual(x, y, places=3)
예제 #3
0
파일: test_cohen.py 프로젝트: dafx/pytftb
 def test_pseudo_wv_reality(self):
     """Test the reality property of the pseudo WV representation."""
     signal, _ = fmsin(128)
     tfr = cohen.pseudo_wigner_ville(signal)
     self.assertTrue(np.all(np.isreal(tfr)))
예제 #4
0
 def test_pseudo_wv_reality(self):
     """Test the reality property of the pseudo WV representation."""
     signal, _ = fmsin(128)
     tfr = cohen.pseudo_wigner_ville(signal)
     self.assertTrue(np.all(np.isreal(tfr)))