Signal processing in Torch
- install spuce
luarocks build https://raw.githubusercontent.com/unifyid/lgm/master/rocks/lgm-scm-1.rockspec
lgm = require 'lgm'
SAMPLE_FREQ = 100
CUTOFF_FREQ = 10
NYQUIST_FREQ = 2 * SAMPLE_FREQ
FCD = CUTOFF_FREQ/NYQUIST_FREQ
filt = lgm.designIIR(lgm.IIR.CHEBY1, 8, FCD, 0.001)
x = torch.randn(100)\add(42)
xf = lgm.filtfilt(filt, x)
lgm.destroyFilter(filt)