Changes in / [4368223:e86676b]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/python/fft.py
r4368223 re86676b 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 87 85 # 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 bin86 self.assertCloseEnough((buf_size-1)*some_constant, cvec_read_norm(fftgrain, 0, 0)) 89 87 self.assertCloseEnough(0., cvec_read_phas(fftgrain, 0, 0)) 90 for index in range(1,buf_size/2): 88 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): 91 92 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 95 self.assertCloseEnough((buf_size-1)*some_constant, cvec_read_norm(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))) 98 self.assertCloseEnough(0., cvec_read_norm(fftgrain, 0, buf_size/2+1)) 99 93 self.assertCloseEnough(some_constant, cvec_read_norm(fftgrain, 0, index)) 100 94 del fftgrain 101 95 del input
Note: See TracChangeset
for help on using the changeset viewer.