Thank you for your replies! They really helped me getting started. One of the things that author does is define a specific shape of the filter (I think to make a smoother transition?) with the following Matlab code:
nyquist = EEG.srate/2;
lower_filter_bound = 4; % Hz
upper_filter_bound = 10; % Hz
transition_width = 0.2;
filter_order = round(3*(EEG.srate/lower_filter_bound));
% create the filter shape
ffrequencies = [ 0 (1-transition_width)*lower_filter_bound lower_filter_bound upper_filter_bound (1+transition_width)*upper_filter_bound nyquist ]/nyquist;
idealresponse = [ 0 0 1 1 0 0 ];
filterweights = firls(filter_order,ffrequencies,idealresponse);
So ffrequencies
defines the frequencies of interest, normalized to the nyquist frequency. And then the shape of the filter is defined by idealresponse
. Is there a way to make a smoother transition (assuming this is the reason) like this in Julia?
Also the filter order here comes out to something like 192, this doesn’t work with Butterworth(192)
. What exactly is this value? And is it the same as the filter order for butterworth and the “order- n
FIR filter” (sorry if this latter part may be beyond the scope of this discussion)