Changes in / [e86676b:4368223]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/python/fft.py
re86676b r4368223 83 83 for channel in range(1, channels): 84 84 self.assertEqual(0., cvec_read_norm(fftgrain, channel, index)) 85 self.assertEqual(0., cvec_read_phas(fftgrain, channel, index)) 86 85 87 # check norm and phase == 0 in first first and last bin of first channel 88 # check unwrap2pi(phas) ~= pi everywhere but in first and last bin 89 self.assertCloseEnough(0., cvec_read_phas(fftgrain, 0, 0)) 90 for index in range(1,buf_size/2): 91 self.assertCloseEnough(math.pi, aubio_unwrap2pi(cvec_read_phas(fftgrain, 0, index))) 92 self.assertCloseEnough(0., cvec_read_phas(fftgrain, 0, buf_size/2)) 93 self.assertCloseEnough(0., cvec_read_phas(fftgrain, 0, buf_size/2+1)) 94 86 95 self.assertCloseEnough((buf_size-1)*some_constant, cvec_read_norm(fftgrain, 0, 0)) 87 self.assertCloseEnough(0., cvec_read_phas(fftgrain, 0, 0)) 96 for index in range(1,buf_size/2+1): 97 self.assertCloseEnough(some_constant, abs(cvec_read_norm(fftgrain, 0, index))) 88 98 self.assertCloseEnough(0., cvec_read_norm(fftgrain, 0, buf_size/2+1)) 89 self.assertCloseEnough(0., cvec_read_phas(fftgrain, 0, buf_size/2+1)) 90 # check unwrap2pi(phas) ~= pi everywhere but in first bin 91 for index in range(1,buf_size/2+1): 92 self.assertCloseEnough(math.pi, aubio_unwrap2pi(cvec_read_phas(fftgrain, 0, index))) 93 self.assertCloseEnough(some_constant, cvec_read_norm(fftgrain, 0, index)) 99 94 100 del fftgrain 95 101 del input
Note: See TracChangeset
for help on using the changeset viewer.