title: translation in fourier space
body: <p>I'm attempting to animate a simple sine wave image. Logically, this can be accomplished with a Fourier-space image that has power in exactly 1 real component (pixel), and gradually changing the pixel's corresponding imaginary component (phase value). The code below produces a horizontal grating that very gradually shifts downward. Yet the shift is slow, and once the phase exceeds a certain value, the image no longer animates. What are the phase component's units and range? What am I missing here?</p>
  
  <pre><code>import numpy as np, matplotlib as mpimg
  
  f = (np.zeros([33, 33]) + 0j) # blank Fourier image
  f[14, 16] = (1 + 0j) # a single component with power
  
  steps = range(16) # number of images to produce
  for i in range(len(steps)):
      c = np.fft.ifft2(np.fft.ifftshift(f, axes=[0, 1])) # grating image (cartesian)
      mpimg.imsave('grating %02i.png' % i, c, cmap='gray') # save image
      f[14, 16] += complex(0, 1/16.0) # increment phase
  </code></pre>