docstr: check the transform of a negative impulse at a random place 
docstr_tok: ["check","the","transform","of","a","negative","impulse","at","a","random","place"]
code: def test_impulse_negative(self):
      """check the transform of a negative impulse at a random place"""
      win_s = 256
      i = int(floor(random() * win_s))
      impulse = -0.1
      f = fft(win_s)
      timegrain = fvec(win_s)
      timegrain[0] = 0
      timegrain[i] = impulse
      fftgrain = f(timegrain)
      # self.plot_this ( fftgrain.phas )
      assert_almost_equal(fftgrain.norm, abs(impulse), decimal=5)
      if impulse < 0:
          # phase can be pi or -pi, as it is not unwrapped
          # assert_almost_equal ( abs(fftgrain.phas[1:-1]) , pi, decimal = 6 )
          assert_almost_equal(fftgrain.phas[0], pi, decimal=6)
          assert_almost_equal(
              np.fmod(fftgrain.phas[-1], pi), 0, decimal=6
          )
      else:
          # assert_equal ( fftgrain.phas[1:-1] == 0, True)
          assert_equal(fftgrain.phas[0], 0)
          assert_almost_equal(
              np.fmod(fftgrain.phas[-1], pi), 0, decimal=6
          )
      # now check the resynthesis
      synthgrain = f.rdo(fftgrain)
      # self.plot_this ( fftgrain.phas.T )
      assert_equal(fftgrain.phas <= pi, True)
      assert_equal(fftgrain.phas >= -pi, True)
      # self.plot_this ( synthgrain - timegrain )
      assert_almost_equal(synthgrain, timegrain, decimal=6)
  
imports: from numpy.testing import TestCase
  from numpy.testing import assert_equal, assert_almost_equal
  import numpy
  from aubio import fvec, fft, cvec
  from math import pi, floor
  from random import random
label_desc: Use image node_id 5 for calling the aubio_fft_test_case obj's underlying member method code with example usage: obj.test_impulse_negative() without return types