title: How to apply FFT on raw signal using Python
body: <p>I'm new in processing signals and need your help.</p>
  
  <p>I have acquired a 10 seconds raw PPG (Photoplethysmogram) signal from my TI AFE4490. My hardware is calibrated and I'm using 250 samples per second to record those signal. I acquired 2500 points at the end.</p>
  
  <p>You can see the image, the points and the code below.</p>
  
  <p><strong>Top: My raw PPG Signal - Bottom: Trying apply an FFT:</strong>
  <img src="https://i.stack.imgur.com/vOAWD.png" alt="Top: My raw PPG Signal - Bottom: Trying apply an FFT"></p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>RED, IR, nSamples, sRate = getAFESignal()
  
  
  period = 1/sRate
  
  plt.figure(1)
  
  plt.subplot(2,1,1)
  x = np.linspace(0.0, nSamples*period, nSamples)
  y = IR
  plt.xlabel("Time (s)")
  plt.ylabel("Voltage (V)")
  plt.plot(x,y)
  
  plt.subplot(2,1,2)
  yf = fft(y)
  xf = np.linspace(0.0, 1.0/(2.0*period), nSamples//2) 
  plt.xlabel("Frequency (Hz)")
  plt.ylabel("Gain")
  plt.plot(xf, 2.0/nSamples * np.abs(yf[0:nSamples//2])) 
  
  plt.grid()
  plt.show()
  </code></pre>
  
  <p>The function <code>getAFEsignal()</code> is just a function to read a .txt file and put all into two numpy arrays.</p>
  
  <p>Here you can find the .txt file: <a href="http://jdoodle.com/a/Cr3" rel="nofollow noreferrer">Raw signal file</a></p>
  
  <p>As you can see, I didn't apply the FFT correctly, and I need this to discover which frequencies I need to filter. Do you know what I'm doing wrong, and if is possible to apply FFT on this signal?</p>