Skip to content

Instantly share code, notes, and snippets.

import scipy.signal as sp
import numpy as np
import matplotlib.pylab as plt
# low pass functions copied from the web
def butter_lowpass(cutOff, fs, order=5):
nyq = 0.5 * fs
normalCutoff = cutOff / nyq
b, a = sp.butter(order, normalCutoff, btype='low')
return b, a
@josesoyo
josesoyo / Script_filter.fsx
Created February 20, 2018 16:51
Example with MathNet filtering
open System.IO
// test filtering
#r @"packages/MathNet.Filtering.0.4.0/lib/net40/MathNet.Filtering.dll"
open MathNet.Filtering
let readLines (filePath:string) = seq {
use sr = new StreamReader (filePath)
while not sr.EndOfStream do
yield sr.ReadLine ()