title: Python FFT - Output fft is the same as input function?
body: <p>I am trying to perform an FFT on data from a simulation that has an oscilating shape. When I run the scipy FFT, the output is the same as the input and I can't figure out why. My code is below:</p>
  <pre><code>tstart = 7.5000000000039813e-2
  rho = 0.80272956E-04
  V = 4773.706375394508
  Aref = 0.203911
  Pnondim = 0.5 * rho * V**2 * Aref
  
  df1 = pd.read_csv('screenP.csv')
  P1 = -np.array(df1[:])/Pnondim
  CT = 1.52
  Ax1 = P1 + CT
  steps1 = len(P1)
  dt1 = 2e-7
  tend1 = tstart + steps1*dt1
  t1 = np.linspace(tstart,tend1,steps1) * 1000
  plt.plot(t1,Ax1)
  plt.show()
  
  X = fftpack.rfft(Ax1)
  freq = fftpack.rfftfreq(len(Ax1), dt1)
  
  plt.plot(freq, np.abs(X))
  plt.xlabel('Frequency (Hz)'), plt.ylabel('Power')
  plt.show()
  </code></pre>
  <p>where screenP is data output from a CFD solver.
  The original curve and the fft output are shown below.</p>
  <p><a href="https://i.stack.imgur.com/8iPa8.png" rel="nofollow noreferrer">https://i.stack.imgur.com/8iPa8.png</a></p>
  <p><a href="https://i.stack.imgur.com/1Eja9.png" rel="nofollow noreferrer">https://i.stack.imgur.com/1Eja9.png</a></p>
  <p>Any help would be much appreciated.</p>