title: How to downsample a signal preserving spikes?
body: <p>I'm analyzing a signal sampled at 200Hz for 6-8 seconds, and the important part are the spikes, that lasts 1 second at max. Think for example to an earthquake... </p>
  
  <p>I have to downsample the signal by a factor 2. I tried:</p>
  
  <pre class="lang-py prettyprint-override"><code>from scipy import signal
  
  signal.decimate(mysignal, 2, ftype="fir")
  signal.resample_poly(mysignal, 1, 2)
  </code></pre>
  
  <p>I get the same result with both the functions: the signal is resampled, but the spikes, positive and negative ones, are diminished.</p>
  
  <p>I wrong the function, or I have to pass a custom FIR filter?</p>