title: Unexpected result from simple convolution with numpy
body: <p>I have not done DSP in a while but I hand't expected my grasp of the basics to slip this far.
  I have a script where I am convolving a tone with a complex exponential.  The result of which I expect to be a shifted tone.  My result is quite unexpected - I am getting 3 tones and none of them are at the frequency I expect.  Can someone explain why I'm getting these results?</p>
  
  <p>Here is the script.</p>
  
  <pre><code>import sys
  import numpy
  import math
  import scipy
  from pylab import *
  
  def gen_tone(f, fs, length):
      t = linspace(0, length, length * fs)
      return cos(2.0 * pi * f * t)
  
  def gen_exp(f, fs, length):
      t = linspace(0, length, length * fs)
      return numpy.exp(1.0j * 2 * pi * f * t)
  
  def plot_fft(f, fs):
      FFT = abs(scipy.fft(f, 1024)) / f.size
      figure()
      plot(FFT)
  
  f100 = gen_tone(8000, 44100, 1)
  f200j = gen_exp(1000, 44100, 1)
  
  res = scipy.signal.fftconvolve(f100, f200j, 'full')
  
  plot_fft(f100, 44100)
  plot_fft(f200j, 44100)
  plot_fft(res, 44100)
  
  show()
  </code></pre>