Flt spectrum

From SCCN
Jump to: navigation, search

Select a frequency portion of the data in an epoched data set.

Signal = flt_spectrum(Signal, FrequencySpec)

flt_select can be used to implement spectral filtering of the data. This is done by specifying one or more frequency windows (or a function of frequency), to which the data should be restricted. Spectral filtering is critical, on one hand, to separate oscillatory processes of interest (e.g. thalamo-cortical loops) from other signal contents (e.g., muscle artifacts, slow cortical potentials) and on the other hand to isolate slow cortical potentials (e.g. some event-related negativity) from higher-frequency signal content.


Contents

Input Arguments

Signal

epoched data set

FrequencySpec: frequency-domain selection, can be specified as one of the following * [low high] or [low high; low high; low high; ...] for a brickwall filter or sum of brickwall filters (numbers in Hz) * [low_begin low_end high_begin high_end; ...] for a linearly sloped filter or sum of sloped filters (numbers in Hz) * function_handle for an arbitrary function of frequency (in Hz) low and high frequencies are generally inclusive


Output Arguments

Signal

subset of the data set


Examples:

% apply a 10-15Hz band-pass filter
eeg = flt_spectrum(eeg,[10 15])


% apply a filter which retains 10-15 Hz and 20-25 Hz ranges
eeg = flt_spectrum(eeg,[10 15; 20 25]);


% apply a filter which retains 10-15 Hz but with linear falloffs at both edges
eeg = flt_spectrum(eeg,[7 10 15 17]);


% apply a filter which retains 10-15 Hz and 25-30Hz but with linear falloffs at the edges
eeg = flt_spectrum(eeg,[7 10 15 17; 22 25 30 33]);


% apply a filter whose frequency response is specified by a function
% (here: an unnamed function implementing 7-30 Hz brickwall)
eeg = flt_spectrum(eeg,@(f)f>7&f<30)


% apply a filter whose frequency response is specified by a function
% (here: a smooth sine-based function with peaks at 12 and 25 Hz)
func = @(f)(f>7&f<30).*(1-cos((f-(7+30)/2)/(7-30)*pi*4));
eeg = flt_spectrum(eeg,func)


% retain the original data (i.e., do nothing)
eeg = flt_spectrum(eeg,[])


References

[1] Oppenheim, A.V., and R.W. Schafer, "Discrete-Time Signal Processing",

Prentice-Hall, 1989.
Christian Kothe, Swartz Center for Computational Neuroscience, UCSD
2010-06-28