title: PSD of signal in numpy and how to scale it
body: <p>I am trying to compute and plot the power spectral density (PSD) of a stochastic signal.
  Reading the <a href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#module-numpy.fft" rel="nofollow">numpy documentation</a> for <code>np.fft.fft</code>, it mentions that if <code>A = fft(a)</code> then <code>np.abs(A)</code> is its amplitude spectrum and <code>np.abs(A)**2</code> is its power spectrum. </p>
  
  <p>My question is, does it take care of the necessary division (one typically have to do in Matlab) over the number of bins etc to scale it properly?</p>
  
  <p>For example, if <code>x</code> is my original signal is in V (Volts) and I do:</p>
  
  <pre><code>X = np.fft(x)
  X = np.abs(X) #is that in Volts/Hz too? 
                #Do I have to divide by len(X) or anything else to scale it?
  P = X**2      #is that in V^2/Hz? Do i have do do anything to scale it properly?
  </code></pre>
  
  <p>I believe numpy doc could have elaborated a little bit more on that. In Matlab I know you have to take care of it by yourself, but what is the case in numpy?</p>