Problems with Spatial Filter

Known Issues and Problems with BCI2000
Locked
Bgabin
Posts: 2
Joined: 21 Sep 2011, 00:06

Problems with Spatial Filter

Post by Bgabin » 31 Aug 2012, 17:34

I have been using a custom spatial filter for offline analysis through MatLab with the bci2000chain function. Everything seemed to be going correctly, but when I ran test data (sign waves on just a few channels) through it I discover that the out put of the filter was being assigned to seemingly random channels. I can't figure out what is causing this. Can anyone help?

The param file I am using is:

Code: Select all

Storage string SubjectSession= 002 001 % % // three-digit session number
Source int SourceCh= 57 16 1 % // number of digitized and stored channels
Source int SampleBlockSize= 1 256 1 % // number of samples transmitted at a time
Source int SamplingRate= 256 256Hz 1 % // sample rate
Source list ChannelNames= 57 AFz AF3 AF4 Fz F1 F2 F3 F4 F5 F6 F7 F8 FCz FC1 FC2 FC3 FC4 FC5 FC6 FT7 FT8 Cz C1 C2 C3 C4 C5 C6 T7 T8 CPz CP1 CP2 CP3 CP4 CP5 CP6 Pz P1 P2 P3 P4 P5 P6 P7 P8 POz PO3 PO4 PO7 PO8 Oz O1 O2 EOGL EOGR Tac // list of channel names
Source floatlist SourceChOffset= 57 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 % % // Offset for channels in A/D units
Source floatlist SourceChGain= 57 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.003 % % // gain for each channel (A/D units -> muV)

Source intlist SourceChList= 0 0 1 128 // list of channels to digitize
Source intlist SourceChDevices= 4 16 16 16 9 16 1 17 // number of digitized channels per device
Source int NumBuffers= 5 1 2 32 // number of software buffers to use
Source string DeviceIDMaster= UB-2009.04.21 // deviceID for the device whose SYNC goes to the slaves
Source int FilterEnabled= 1 1 0 1 // Enable pass band filter (0=no, 1=yes)
Source float FilterHighPass= 0.1 0.1 0 50 // high pass filter for pass band
Source float FilterLowPass= 60 60 0 4000 // low pass filter for pass band
Source int FilterModelOrder= 8 8 1 12 // filter model order for pass band
Source int FilterType= 1 1 1 2 // filter type for pass band (1=BUTTERWORTH, 2=CHEBYSHEV)
Source int NotchEnabled= 1 1 0 1 // Enable notch (0=no, 1=yes)
Source float NotchHighPass= 58 58 0 70 // high pass filter for notch filter
Source float NotchLowPass= 62 62 0 4000 // low pass filter for notch filter
Source int NotchModelOrder= 4 4 1 10 // filter model order for notch filter
Source int NotchType= 1 1 1 2 // filter type for pass band (1=CHEBYSHEV, 2=BUTTERWORTH)
Source list DeviceIDs= 4 UB-2009.04.21 UB-2009.04.24 UB-2009.04.23 UB-2009.04.22 // list of USBamps to be used (or auto)
Source int DigitalInput= 0 0 0 1 // enable digital input:  0: false, 1: true (enumeration)
Source int DigitalOutput= 0 0 0 1 // enable digital output on block acquisition (boolean)
Source string DigitalOutputEx= % // expression for output on digital output 2 (expression)
Source int SignalType= 1 0 0 1 // numeric type of output signal:  0: int16, 1: float32 (enumeration)
Source int AcquisitionMode= 0 0 0 2 // data acquisition mode:  0: analog signal acquisition, 1: calibration, 2: impedance (enumeration)
Source int CommonGround= 0 0 0 1 // internally connect GNDs from all blocks:  0: false, 1: true (enumeration)
Source int CommonReference= 0 0 0 1 // internally connect Refs from all blocks:  0: false, 1: true (enumeration)
Source int AlignChannels= 0 0 0 1 // align channels in time (0=no, 1=yes)
Source floatlist SourceChTimeOffset= 0 0 % % // time offsets for all source channels (may be empty)

Source list TransmitChList=       57       1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 // list of transmitted channels

Connector list ConnectorInputFilter= 0 // list of state names or signal elements to allow, "*" for any, signal elements as in "Signal(1,0)"
Connector string ConnectorInputAddress= % localhost:20320 % % // IP address/port to read from, e.g. localhost:20320

Filtering:SpatialFilter int SpatialFilterType= 2 2 0 3 // spatial filter type 0: none, 1: full matrix, 2: sparse matrix, 3: common average reference (CAR) (enumeration)
Filtering:SpatialFilter:SpatialFilter matrix SpatialFilter= 105 { In Out Weight } AFz AFz 1 AF3 AF3 1 AF4 AF3 -1 AF4 AF4 1 AF3 AF4 -1 Fz Fz 1 F1 F1 1 F2 F1 -1 F2 F2 1 F1 F2 -1 F3 F3 1 F4 F3 -1 F4 F4 1 F3 F4 -1 F5 F5 1 F6 F5 -1 F6 F6 1 F5 F6 -1 F7 F7 1 F8 F7 -1 F8 F8 1 F7 F8 -1 FCz FCz 1 FC1 FC1 1 FC2 FC1 -1 FC2 FC2 1 FC1 FC2 -1 FC3 FC3 1 FC4 FC3 -1 FC4 FC4 1 FC3 FC4 -1 FC5 FC5 1 FC6 FC5 -1 FC6 FC6 1 FC5 FC6 -1 FT7 FT7 1 FT8 FT7 -1 FT8 FT8 1 FT7 FT8 -1 Cz Cz 1 C1 C1 1 C2 C1 -1 C2 C2 1 C1 C2 -1 C3 C3 1 C4 C3 -1 C4 C4 1 C3 C4 -1 C5 C5 1 C6 C5 -1 C6 C6 1 C5 C6 -1 T7 T7 1 T8 T7 -1 T8 T8 1 T7 T8 -1 CPz CPz 1 CP1 CP1 1 CP2 CP1 -1 CP2 CP2 1 CP1 CP2 -1 CP3 CP3 1 CP4 CP3 -1 CP4 CP4 1 CP3 CP4 -1 CP5 CP5 1 CP6 CP5 -1 CP6 CP6 1 CP5 CP6 -1 Pz Pz 1 P1 P1 1 P2 P1 -1 P2 P2 1 P1 P2 -1 P3 P3 1 P4 P3 -1 P4 P4 1 P3 P4 -1 P5 P5 1 P6 P5 -1 P6 P6 1 P5 P6 -1 P7 P7 1 P8 P7 -1 P8 P8 1 P7 P8 -1 POz POz 1 PO3 PO3 1 PO4 PO3 -1 PO4 PO4 1 PO3 PO4 -1 PO7 PO7 1 PO8 PO7 -1 PO8 PO8 1 PO7 PO8 -1 Oz Oz 1 O1 O1 1 O2 O1 -1 O2 O2 1 O1 O2 -1 EOGL EOGL 1 EOGR EOGL -1 EOGR EOGR 1 EOGL EOGR -1 Tac Tac 1 0 % % // columns represent input channels, rows represent output channels
Filtering:SpatialFilter:SpatialFilter intlist SpatialFilterCAROutput= 0 // when using CAR filter type: list of output channels, or empty for all channels
Filtering:SpatialFilter:SpatialFilter int SpatialFilterMissingChannels= 1 0 0 1 // how to handle missing channels 0: ignore, 1: report error (enumeration)

Connector string ConnectorOutputAddress= % localhost:20320 % % // IP address/port to write to, e.g. localhost:20320
-Bernie Gabin

mellinger
Posts: 1210
Joined: 12 Feb 2003, 11:06

Re: Problems with Spatial Filter

Post by mellinger » 17 Sep 2012, 10:01

Hi,

if you specify names of output channels in your spatial filter definition rather than channel numbers, then channel numbers are chosen automatically. You will then need to identify output channels by their names, which are available in the output of BCI2000chain.

If you need to have a fixed number of output channels with fixed order, then you need to specify a channel's desired index in the spatial filter's output column.

HTH,
Juergen

Locked

Who is online

Users browsing this forum: No registered users and 28 guests