NeuroAnalyzer tutorials: Process EEG (2)

FIR filters:

NeuroAnalyzer.filter!(eeg, fprototype=:fir, ftype=:bs, cutoff=(45, 55), order=8, window=hanning(127))
NeuroAnalyzer.filter!(eeg, fprototype=:fir, ftype=:lp, cutoff=45.0, order=8, window=hanning(128))

FIR filters with Hamming window generated automatically:

NeuroAnalyzer.filter!(eeg, fprototype=:fir, ftype=:hp, cutoff=0.1, order=8)

Output:

[ Info: Creating HP filter:
[ Info:         Using default window: hamming(4096)
[ Info:         Attenuation: 32 dB
[ Info:         F_pass: 0.1 Hz
[ Info:         F_stop: 0.0 Hz
[ Info:         Transition bandwidth: 0.0004 Hz
[ Info:         Cutoff frequency: 0.0998 Hz

(!) Certain windows (e.g. hanning()) may require DSP.jl to be loaded. NeuroAnalyzer provides additional windows, see generate_window().

IIR filters:

NeuroAnalyzer.filter!(eeg, fprototype=:butterworth, ftype=:lp, cutoff=45.0, order=2)
NeuroAnalyzer.filter!(eeg, fprototype=:butterworth, ftype=:hp, cutoff=0.1, order=8)
NeuroAnalyzer.filter!(eeg, fprototype=:butterworth, ftype=:bs, cutoff=(4, 8), order=8)

NeuroAnalyzer.filter!(eeg, fprototype=:elliptic, ftype=:bs, cutoff=(45, 55), rs=10, rp=1, order=12)

NeuroAnalyzer.filter!(eeg, fprototype=:chebyshev1, ftype=:bs, cutoff=(45, 55), rs=1, order=8)
NeuroAnalyzer.filter!(eeg, fprototype=:chebyshev2, ftype=:bs, cutoff=(45, 55), rp=1, order=8)

Second-order IIR notch filter:

NeuroAnalyzer.filter!(eeg, fprototype=:iirnotch, cutoff=50, bw=2)

Remez filter:

NeuroAnalyzer.filter!(eeg, fprototype=:remez, ftype=:lp, order=128, cutoff=20, bw=0.5)

Polynomial of 8th order:

NeuroAnalyzer.filter_poly!(eeg, order=8)

Savitzky-Golay filter:

NeuroAnalyzer.filter_sg!(eeg, order=6)

Moving average filter:

NeuroAnalyzer.filter_mavg!(eeg, order=2, window=[1, 2, 3, 2, 1])

Moving median filter:

NeuroAnalyzer.filter_mmed!(eeg)

Previewing filter response – see this tutorial.