User Reference:SourceFilter

From BCI2000 Wiki
Revision as of 18:56, 23 May 2014 by Jhill (talk | contribs) (Parameters)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Most EEG amplifiers offer filtering in hardware. Generally, they have a line noise hum filter, or "notch filter", built in, and perform some high pass filtering. For amplifiers that do not provide these filters themselves, there is the SourceFilter as a software solution.

Unlike other filters, the SourceFilter filter will be applied immediately after data acquisition, and it will modify the data which will be saved to disk, i.e., it will behave just as if it were a hardware filter built into the amplifier.



Configures the notch filter. The proper setting depends on your country.

  • 0: disabled,
  • 1: at 50Hz (Europe, Asia, Africa, parts of South America)
  • 2: at 60Hz (North America, parts of South America).

The notch filter is realized as a 2x3rd order Chebychev bandstop.


Configures the high pass filter:

  • 0: disabled,
  • 1: at 0.1Hz.
  • 2: at 1Hz.

The high pass filter is realized as a 1st order IIR filter.


Configures the low pass filter:

  • 0: disabled,
  • 1: at 9Hz,
  • 2: at 30Hz,
  • 3: at 40Hz,
  • 4: at 70Hz.

The low pass filter is realized as a 2nd order Butterworth IIR filter.


This is a list of indices to the channels should be left unfiltered (for example, hardware triggers and other auxiliary channels).


Generally, the SourceFilter will be available in source modules connecting to amplifiers that require it. Adding the SourceFilter to modules that do not yet contain it requires recompilation.

To add the SourceFilter to a new or existing source module, edit its CMakeLists.txt file by adding a line


above the line containing BCI2000_ADD_SIGNAL_SOURCE_MODULE. Re-run CMake, and recompile.

If you are not using CMake, add the following files to the project:


Also, make sure that the following include paths are set in your project:


After recompiling and linking, your source module will use the SourceFilter to preprocess recorded data.

See also

User Reference:Filters, Programming Howto:Building BCI2000