title: MathNet.Filtering Bandpass parameters
body: <p>I'm trying to use MathNet filters to apply a band pass filter to a signal; I'm using the <code>MathNet.Filtering.OnlineFiter.CreateBandpass(..)</code> method, to be precise.</p>
  
  <p>The problem is, I'm not getting the expected results and I'm getting confused by the method's parameters. I've got a signal sampled at 1Khz, and I want to remove everything outside the 4 to 6 Hz range. What is the correct way to call the method <code>CreateBandpass(..)</code>?</p>
  
  <hr>
  
  <p><strong>Edit</strong></p>
  
  <p>This is the code, as requested in a comment:</p>
  
  <pre><code>OnlineFilter bandPass = CreateBandpass(ImpulseResponse.Finite, samplingRate, 3, 7);
  postProcessedData = bandPass.ProcessSamples(preProcessedData);
  </code></pre>
  
  <p>The source is a sinewave at exactly 5 Hz with some relatively high frequency noise (like 30-70 hz); the amplitude of the signal is around 20 peak-peak, centred at 0 (so -10 to +10). The filtered signal is a sinewave at 5 Hz with no noise and an amplitude, peak-peak, of 2.1</p>
  
  <hr>
  
  <p><strong>P.S.</strong></p>
  
  <p>This happens too with a test wave, by the way. If a generate a pure sinewave (whatever the frequency) and filter it around its frequency, I obtain a sinewave of the same frequency and a totally unrelated amplitude. On the other hand if I FFT (still using MathNet) the wave and remove the components I'm not interested into, I can then rebuild the wave at the expected amplitude and totally clean from noise.</p>