Changeset 4368223 for tests


Ignore:
Timestamp:
Nov 7, 2007, 4:53:29 PM (17 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
4b6937b, f218f29
Parents:
e86676b (diff), d57d1de (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge from bastille

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/python/fft.py

    re86676b r4368223  
    8383      for channel in range(1, channels):
    8484        self.assertEqual(0., cvec_read_norm(fftgrain, channel, index))
     85        self.assertEqual(0., cvec_read_phas(fftgrain, channel, index))
     86
    8587    # 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
    8695    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)))
    8898    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
    94100    del fftgrain
    95101    del input
Note: See TracChangeset for help on using the changeset viewer.