Page 8 of 9

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 17 May 2024, 17:18
by mellinger
Reference In- may not have common mode rejection.
In the schematic you provided some posts ago, there is a triangle after the input switches. That is the symbol for an operational amplifier (opamp) which amplifies the difference between its + and - inputs. Such a circuit always has common mode rejection.
https://en.wikipedia.org/wiki/Operational_amplifier
Many EEG uses Unipolar like in BCI applications. Here is it also possible to cancel common mode in software?
If you subtract the signal of channel A from the signal of channel B, you will automatically cancel any signal C that is common to both:
A = A_0 + C, B = B_0 + C, B - A = B_0 + C - A_0 - C = B_0 - A_0.

This can be done by any software that is able to perform a subtraction of channel data, e.g. the SpatialFilter in BCI2000.

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 02 Jun 2024, 23:02
by whwilbur
mellinger wrote: 17 May 2024, 17:18
Reference In- may not have common mode rejection.
In the schematic you provided some posts ago, there is a triangle after the input switches. That is the symbol for an operational amplifier (opamp) which amplifies the difference between its + and - inputs. Such a circuit always has common mode rejection.
https://en.wikipedia.org/wiki/Operational_amplifier
Many EEG uses Unipolar like in BCI applications. Here is it also possible to cancel common mode in software?
If you subtract the signal of channel A from the signal of channel B, you will automatically cancel any signal C that is common to both:
A = A_0 + C, B = B_0 + C, B - A = B_0 + C - A_0 - C = B_0 - A_0.

This can be done by any software that is able to perform a subtraction of channel data, e.g. the SpatialFilter in BCI2000.
Hi, whenever I ran BCI2000. I always need to go to g.USBamp Demo software just to set the bipolar mode to say 2 and 3. Without doing that. I couldn't see the proper waveforms in the BCI2000 display because it is just displaying channel 2 to ground and channel 3 to ground.

So first question to that programmer in your team with g.USBamp who removed the BipolarChLst parameter. How can you see the display properly *real time* if all you will see it is channel 2 to ground and channel 3 to ground? Yes you can use spatial filtering to deduct channel 2 from channel 3 but it is NOT real time.

Image

Second, if you see will the g.USBamp connections and waveforms displayed above. The Reference or V- is always connected to channel 1, 2, 3 and 4. I say always because if you are just using the ordinary channel 1 to Reference (V-). The other channels still show waveform as it is sharing the V- of bank 1 (see below). So even if you tie up the channel 2, 3, 4 to ground. It can still show up in the waveforms.

Image

If you will tie up channel 2 to 4 and connected it to Ref (V-), the output at Channel 1 will even be more noisy.

So the proper way to use it is either when you setup requires a common reference (V-) with the channel 1 to 4 connecting to the same V- in one bank. Or you use bipolar mode.

Many uses of the g.USBamp is connecting the channel 1 & 2, 3 &4, 5 &6 as bipolar pair. Note this is different to the original formulation of BipolarChLst where you use the other as reference like channel 1 connected to 2 then 3 using 2 as reference, and 4 using 3 as reference. In many actual use. The bipolar pairs are separate like 1,2 and 3,4 and 5,6 where the reference (V-) doesn't use the other pair channel, but separate.

The capability of putting separate bipolar pair is available in the $5000 g.recorder but it is overkill. Is the USBAmpSource.exe in BCI2000 open source? Is it written in C? I don't think it is hard to add the capability of using 8 bipolar pairs in the channel? That is.

Channel 1: bipolar Channel 1 - Channel 2
Channel 3: bipolar Channel 3 - Channel 4
Channel 5: bipolar Channel 5 - Channel 6
Channel 7: bipolar Channel 7 - Channel 8
Channel 9: bipolar Channel 9 - Channel 10
Channel 11: bipolar Channel 11 - Channel 12
Channel 13: bipolar Channel 13 - Channel 14
Channel 15: bipolar Channel 15 - Channel 16

This is how the g.USBamp can properly use separate V+ and V- (by bipolar mode). The 4 banks are designed for 4 channels to share one reference each. If you don't want to share reference. And you use one channel per bank. The open inputs can cause noise as as shown in the displays above beause the references (V-) are being shared. I can actually see the noise in channel 1 from crosstalk with channel 2 to 4 connected to ground (because they are still sharing one reference (V-) per bank.

Therefore I'd like to request for future versions of BCI2000 to include the 8 Bipolar channels capability I just mentioned.

This is the only way to perform experiments where you do parallel factor analysis where you either subtract the noises common to them (or acquire signal common to them all). Also it is important to be able to see them real time. Off line post processing spatial filtering would make you miss the waveforms and make proper connections since you can't see the displays real time. Thank you :)

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 03 Jun 2024, 08:51
by mellinger
BCI2000 online filters are applied in real-time. If you want to see the output of the BCI2000 SpatialFilter, enable the Visualization->Processing Stages->VisualizeSpatialFilter parameter in the Operator's config dialog.
Is the USBAmpSource.exe in BCI2000 open source? Is it written in C?
It is open source. and written in C++. Instructions how to obtain the source code are available on https://www.bci2000.org.

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 03 Jun 2024, 19:27
by whwilbur
mellinger wrote: 03 Jun 2024, 08:51 BCI2000 online filters are applied in real-time. If you want to see the output of the BCI2000 SpatialFilter, enable the Visualization->Processing Stages->VisualizeSpatialFilter parameter in the Operator's config dialog.
Is the USBAmpSource.exe in BCI2000 open source? Is it written in C?
It is open source. and written in C++. Instructions how to obtain the source code are available on https://www.bci2000.org.
The "VisualizeSpatialFilter" is missing in the Operator's config display Processing Stages. See below.

Image

Image

You said if it was not in the graphic config then the batch won't work so maybe the gUSBamp programmer removed the feature.

You can see in the above channel 2 and 3, the waveforms are similar. It is Netech 10uV 50Hz output and it is supposed to show the waveform at channel 2 if bipolar is ran. Without real time display. 8 simultaneous channels would be messy.

So we'd like to request to bring back at least the spatial filter feature. But then isn't it this is also available in the DSP and it can process 8 channels at same time. Using the PC can require even more CPU power that would be very expensive. So using the unit internal DSP would process less lost bytes in the main app.

Therefore, if the spatial filter feature was really removed. And the return is warrantied due to the USBamp channel 1 to 4 sharing just one V- and all the noises I mentioned in my last message. We'd like to request the return of BipolarChLst in next version but ability to define not sequential montages but unique pairs like mentioned before.

Channel 1: bipolar Channel 1 - Channel 2
Channel 3: bipolar Channel 3 - Channel 4
Channel 5: bipolar Channel 5 - Channel 6
Channel 7: bipolar Channel 7 - Channel 8
Channel 9: bipolar Channel 9 - Channel 10
Channel 11: bipolar Channel 11 - Channel 12
Channel 13: bipolar Channel 13 - Channel 14
Channel 15: bipolar Channel 15 - Channel 16

Thank you.

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 04 Jun 2024, 04:27
by mellinger
The SpatialFilter has not been removed. It is just not present in DummySignalProcessing.
Please start up BCI2000 with the gUSBamp source, the P3SignalProcessing, and the DummyApplication modules.

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 04 Jun 2024, 05:52
by whwilbur
mellinger wrote: 04 Jun 2024, 04:27 The SpatialFilter has not been removed. It is just not present in DummySignalProcessing.
Please start up BCI2000 with the gUSBamp source, the P3SignalProcessing, and the DummyApplication modules.
Oh. Thanks. Found it.

Image

Before I'll try the complex input method. I need to know something I couldn't understand since the beginning and couldn't find the help file specific to it. Why are there volume buttons in many parameter. For example in 4800 in the Sampling rate. What would happen if you adjust the 'volume' button to left, middle or right?

Image

In the following. I'm still reading how to do channel 2 minus channel 3 and where are you supposed to enter the choices since there is no entry spaces in VisualizeSpatialFilter above? Many thanks!

https://www.bci2000.org/mediawiki/index ... tialFilter

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 04 Jun 2024, 07:29
by mellinger
Why are there volume buttons in many parameter. For example in 4800 in the Sampling rate. What would happen if you adjust the 'volume' button to left, middle or right?
These are "Parameter level" sliders. They control from 1 to 3 the "advancedness" of a parameter. There is also a global setting under File->Preferences->User Level which is set to 3 by default. If you set it to 2, parameters with an "advancedness" of 3 will not be displayed. If you set it to 1, parameters with "advancedness" levels of 2 and 3 will not be displayed.

This is intended to simplify the user interface for users (ike lab technicians) who need to change only a few parameter settings per experiment (such as subject name).
In the following. I'm still reading how to do channel 2 minus channel 3 and where are you supposed to enter the choices since there is no entry spaces in VisualizeSpatialFilter above?
It's at Filtering->SpatialFilter.

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 04 Jun 2024, 19:07
by whwilbur
mellinger wrote: 04 Jun 2024, 07:29
Why are there volume buttons in many parameter. For example in 4800 in the Sampling rate. What would happen if you adjust the 'volume' button to left, middle or right?
These are "Parameter level" sliders. They control from 1 to 3 the "advancedness" of a parameter. There is also a global setting under File->Preferences->User Level which is set to 3 by default. If you set it to 2, parameters with an "advancedness" of 3 will not be displayed. If you set it to 1, parameters with "advancedness" levels of 2 and 3 will not be displayed.

This is intended to simplify the user interface for users (ike lab technicians) who need to change only a few parameter settings per experiment (such as subject name).
In the following. I'm still reading how to do channel 2 minus channel 3 and where are you supposed to enter the choices since there is no entry spaces in VisualizeSpatialFilter above?
It's at Filtering->SpatialFilter.
I've read the documentation and tried it for an hour.

Image

I have enabled Visualize Spatial output and chose Full Matrix in Filtering. In the Spatial filter matrix (see below). I choose channel 4 as output. I used weight of 1 for channel 2 and weight of 1/2 for channel 3, hopefully to deduct channel 2 and 3. But the output doesn't show the Netech 10uV 50Hz output in channel 4. I used weight of 1 and 1/2 for both too to try to see if there would be any output in channel 4. None. What do you put in the matrix box to properly deduct channel 2 and 3 (channell 2 minus 3) and output it in channel 4? There is an error "Stimuluscode is inaccessible" too. What could have caused it? Thanks.

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 05 Jun 2024, 05:38
by mellinger
There is an error "Stimuluscode is inaccessible" too. What could have caused it? Thanks.
Ah, ok, sorry. Please use SpectralSignalProcessing instead of P3SignalProcessing.
What do you put in the matrix box to properly deduct channel 2 and 3 (channell 2 minus 3) and output it in channel 4?
"Channel 2 minus channel 3" = "Channel 2" * (+1) + "Channel 3" * (-1)
"Rows represent output channels, columns represent input channels"
So enter "+1" in row 4, column 2, and "-1" in row 4, column 3.

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 05 Jun 2024, 07:59
by whwilbur
mellinger wrote: 05 Jun 2024, 05:38
There is an error "Stimuluscode is inaccessible" too. What could have caused it? Thanks.
Ah, ok, sorry. Please use SpectralSignalProcessing instead of P3SignalProcessing.
What do you put in the matrix box to properly deduct channel 2 and 3 (channell 2 minus 3) and output it in channel 4?
"Channel 2 minus channel 3" = "Channel 2" * (+1) + "Channel 3" * (-1)
"Rows represent output channels, columns represent input channels"
So enter "+1" in row 4, column 2, and "-1" in row 4, column 3.

I tried running SpectralSignalProcessing and put the entries in the matrix (see below). But channel 4 is not displaying it and I got the new errors "When processing "(Feedback==0)": Variable "Feedback" does not exist". What does it mean and how to fix it?

Image

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 05 Jun 2024, 09:04
by mellinger
I tried running SpectralSignalProcessing and put the entries in the matrix (see below). But channel 4 is not displaying it and I got the new errors "When processing "(Feedback==0)": Variable "Feedback" does not exist". What does it mean and how to fix it?
Go to Filtering->Normalizer->BufferConditions and set the matrix size to 0, 0.
Also, go to Filtering->Normalizer->UpdateTrigger and set it to "0".
I tried running SpectralSignalProcessing and put the entries in the matrix (see below).
You didn't put the entries into the matrix elements that I suggested. You reverted rows and columns.

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 05 Jun 2024, 19:50
by whwilbur
mellinger wrote: 05 Jun 2024, 09:04
I tried running SpectralSignalProcessing and put the entries in the matrix (see below). But channel 4 is not displaying it and I got the new errors "When processing "(Feedback==0)": Variable "Feedback" does not exist". What does it mean and how to fix it?
Go to Filtering->Normalizer->BufferConditions and set the matrix size to 0, 0.
Also, go to Filtering->Normalizer->UpdateTrigger and set it to "0".
I tried running SpectralSignalProcessing and put the entries in the matrix (see below).
You didn't put the entries into the matrix elements that I suggested. You reverted rows and columns.
https://www.youtube.com/watch?v=GxBk-my ... e=youtu.be

Although the Feedback error was gone after adjusting what you showed. It still won't produce any deduction of channel 2 and 3. I tried many things for half a day to figure it out myself, but couldn't fix it. In the unlisted youtube above showing from Launch so you can see the right configurations used (SpatialSignalProcessing, etc). I even deducted channel 2 from channel 1 in channel 4 in case it would be argued they were similar in size so the deduction would be zero. It is not because in the screenshot below. Channel 2 was showing the Netech 10uV waveform after the bipolar was set in g.USBamp Demo (this is after the session in the youtube). Note I even used the original Operator and gUSBAmpSource and channel 4 just won't show the waveforms of deducted channel 2 and 3. What did I miss? I also share the parameter file I used below. If there is a command I miss or something. Hope people with the g.USBamp equipments you know can assist and try to make it run and detected what I missed. Thanks.

Image

exact Parameter I used:

Visualize:Property%20Sets matrix VisPropertySets= 0 1 // row titles are properties in the form "SRCD.Left", columns are property sets
System:Version matrix OperatorVersion= { Framework Revision Build Config Protocol } 1 3.6.8112 8112,%202024-05-04T20:01:23Z MSVC-19.39.33519.0-AMD64,%20release,%202024-05-06T11:07:38Z,%20juergen@Windows11 USE_OPENMP:ON%20USE_PRECOMPILED_HEADERS:ON%20USE_ASSERTS_IN_RELEASE_BUILDS:OFF 2.5 // operator module version information (noedit)(readonly)
System:Protocol int AutoConfig= 1 1 0 1 // Use AutoConfig protocol extension (boolean)
System:Protocol int OperatorBackLink= 1 1 0 1 // Send final state and signal information to Operator (boolean)
System:Core%20Connections string OperatorIP= 127.0.0.1 127.0.0.1 % % // the Operator module's IP (noedit)(readonly)
Storage:Session string SubjectSession= 000 001 % % // three-digit session number
Source:Signal%20Properties int SourceCh= 8 // number of digitized and stored channels (allow_override)
Source:Signal%20Properties int SampleBlockSize= 8 // number of samples transmitted at a time (allow_override)
Source:Signal%20Properties int SamplingRate= 4800 // sampling rate (allow_override)
Source:Signal%20Properties list ChannelNames= 8 1 2 3 4 5 6 7 8 // list of channel names (allow_override)
Source:Signal%20Properties list SourceChOffset= 8 0 0 0 0 0 0 0 0 // Offset for channels in A/D units (allow_override)
Source:Signal%20Properties list SourceChGain= 8 1 1 1 1 1 1 1 1 // gain for each channel (A/D units per physical unit) (allow_override)
Storage:Data%20Location string DataDirectory= ..\data ..\data % % // path to top level data directory (directory)
Storage:Session string SubjectName= Name Name % % // subject alias
Storage:Session string SubjectRun= 00 00 % % // two-digit run number
Storage:Documentation string ID_System= % // BCI2000 System Code
Storage:Documentation string ID_Amp= % // BCI2000 Amp Code
Storage:Documentation string ID_Montage= % // BCI2000 Cap Montage Code
Visualize:Timing int VisualizeTiming= 1 1 0 1 // visualize system timing (0=no, 1=yes) (boolean)
Visualize:Source%20Signal int VisualizeSource= 1 1 0 1 // visualize raw brain signal (0=no, 1=yes) (boolean)
Visualize:Source%20Signal int VisualizeSourceDecimation= 1 auto % % // decimation factor for raw brain signal
Visualize:Source%20Signal int VisualizeSourceBufferSize= auto auto % % // number of blocks to aggregate before sending to operator
Visualize:Source%20Signal int VisualizeSourceTime= 8s 8s 0 % // how much time in Source visualization
Visualize:Source%20Signal int SourceMin= auto // raw signal vis Min Value
Visualize:Source%20Signal int SourceMax= auto // raw signal vis Max Value
Source:gUSBamp int AcquisitionMode= 0 0 0 2 // data acquisition mode: 0: analog signal acquisition, 1: calibration signal, 2: impedance measurement (enumeration)
Source:gUSBamp int CommonGround= 1 0 0 1 // internally connect GNDs from all blocks: 0: false, 1: true (enumeration)
Source:gUSBamp int CommonReference= 0 0 0 1 // internally connect Refs from all blocks: 0: false, 1: true (enumeration)
Source:gUSBamp int EnableDigitalInput= 0 0 0 1 // enable digital inputs (boolean)
Source:gUSBamp int EnableDigitalOutput= 0 0 0 3 // enable digital output on block acquisition: 0: off, 1: use expressions %28after signal acquisition%29, 2: timing test, 3: use expressions %28before signal acquisition%29 (enumeration)
Source:gUSBamp matrix DigitalOutputEx= 0 { Expression } // Matrix of Expressions for digital output
Source:gUSBamp int DetectDataLoss= 0 0 0 1 // use gUSBamp counter mode to detect data loss (boolean)
Source:gUSBamp int NumBuffers= 2 5 2 % // IO queue length
Source:Buffering int SourceBufferSize= 2s 2s % % // size of data acquisition ring buffer (in blocks or seconds)
Source:gUSBamp list DeviceIDs= 1 auto // list of USBamps to be used (or auto)
Source:gUSBamp string DeviceIDMaster= auto // deviceID for the device whose SYNC goes to the slaves
Source:gUSBamp intlist SourceChList= 1 auto // list of channels to digitize, in terms of physical inputs numbered across all devices
Source:gUSBamp intlist SourceChDevices= 1 8 // number of digitized channels per device
Source:gUSBamp int FilterEnabled= 1 1 0 1 // Enable pass band filter (0=no, 1=yes)
Source:gUSBamp float FilterHighPass= 0.5 0.1 0 50 // high pass filter for pass band
Source:gUSBamp float FilterLowPass= 1000 60 0 4000 // low pass filter for pass band
Source:gUSBamp int FilterModelOrder= 8 8 1 12 // filter model order for pass band
Source:gUSBamp int FilterType= 1 1 1 2 // filter type for pass band (1=BUTTERWORTH, 2=CHEBYSHEV)
Source:gUSBamp int NotchEnabled= 0 1 0 1 // Enable notch (0=no, 1=yes)
Source:gUSBamp float NotchHighPass= 58 58 0 70 // high pass filter for notch filter
Source:gUSBamp float NotchLowPass= 62 62 0 4000 // low pass filter for notch filter
Source:gUSBamp int NotchModelOrder= 4 4 1 10 // filter model order for notch filter
Source:gUSBamp int NotchType= 1 1 1 2 // filter type for pass band (1=CHEBYSHEV, 2=BUTTERWORTH)
Storage:BCI2000FileWriter string FileFormat= dat // format of data file (readonly)
Storage:Documentation string StorageTime= % // time of beginning of data storage
Storage:FileSplitting string FileSplittingCondition= % // when to split files, e.g. "1:25:00" or "1.5GB"
Source:Alignment int AlignChannels= 0 0 0 1 // align channels in time (0=no, 1=yes) (boolean)
Source:Alignment floatlist SourceChTimeOffset= 0 0 % % // time offsets for all source channels (may be empty)
Visualize:Processing%20Stages int VisualizeAlignmentFilter= 0 0 0 1 // Visualize AlignmentFilter output (boolean)
Source:Online%20Processing list TransmitChList= 1 * // list of transmitted channels: Channel names may contain * and ? wildcards, and character ranges enclosed in []; wildcard patterns may be negated by prepending an exclamation mark. Ranges of channels may be specified using : or - to separate begin from end.
Visualize:Processing%20Stages int VisualizeTransmissionFilter= 0 0 0 1 // Visualize TransmissionFilter output (boolean)
Storage:Data%20Location string DataFile= $%7bSubjectName%7d$%7bSubjectSession%7d/$%7bSubjectName%7dS$%7bSubjectSession%7dR$%7bSubjectRun%7d.$%7bFileFormat%7d // name of data file relative to DataDirectory
System:RunManager string DataFileShm= /ftJaMIXtWchfSdkJ // name of shared memory object holding data file name (readonly)
System:Protocol int EventLink= 1 1 0 1 // Send events from Operator to Source module (boolean)
System:Core%20Connections string OperatorAddress= 127.0.0.1:4000 // (noedit)
System:Core%20Connections string SignalSourceIP= 127.0.0.1 // (readonly)(noedit)
System:Core%20Connections string SignalSourcePort= 50315 // (readonly)(noedit)
System:Version matrix SignalSourceVersion= { Framework Revision Build Config Protocol } 1 3.6.7385 7385,%202023-05-28T15:26:16Z MSVC-19.33.31629.0-AMD64,%20release,%202023-05-30T17:14:52Z,%20brunnerlab@DESKTOP-3EM2F9K USE_DYNAMIC_CRT:TRUE%20USE_OPENMP:ON%20USE_PRECOMPILED_HEADERS:ON%20USE_ASSERTS_IN_RELEASE_BUILDS:OFF 2.3 // SignalSource version information (noedit)(readonly)
System:Configuration matrix SignalSourceFilterChain= 8 { Filter%20Name Position%20String } DataIOFilter 0 gUSBampADC 1 NullFileWriter 1 BCI2000FileWriter 1 EDFFileWriter 1 GDFFileWriter 1 AlignmentFilter 1.1 TransmissionFilter 1.2 // SignalSource filter chain (noedit)(readonly)
System:Configuration matrix Filters= 17 1 /1/DataIOFilter /1/gUSBampADC /1/BCI2000FileWriter /1/AlignmentFilter /1/TransmissionFilter /2/SpatialFilter /2/SpectralEstimator/WindowingFilter /2/SpectralEstimator/SpectralEstimatorChoice/IdentityFilter /2/SpectralEstimator/SpectralEstimatorChoice/ARSpectrum /2/SpectralEstimator/SpectralEstimatorChoice/FFTSpectrum /2/LinearClassifier /2/LPFilter /2/ExpressionFilter /2/Normalizer /3/ConnectorInput /3/KeystrokeFilter /3/ConnectorOutput // Filter Directory (noedit)(readonly)
Filtering:Windowing int WindowLength= 0.5s 0.5s % % // Length of window
Filtering:Windowing int Detrend= 0 0 0 2 // Detrend data? 0: no, 1: mean, 2: linear (enumeration)
Filtering:Windowing int WindowFunction= 0 0 0 3 // Window function 0: Rectangular, 1: Hamming, 2: Hann, 3: Blackman (enumeration)
Filtering:Spectral%20Estimation float FirstBinCenter= 0Hz 0Hz % % // Center of first frequency bin (in Hz) (allow_override)
Filtering:Spectral%20Estimation float LastBinCenter= 30Hz 30Hz % % // Center of last frequency bin (in Hz) (allow_override)
Filtering:Spectral%20Estimation float BinWidth= 3Hz 3Hz % % // Width of spectral bins (in Hz) (allow_override)
Filtering:Spectral%20Estimation int OutputType= 0 0 0 2 // 0: Spectral Amplitude, 1: Spectral Power, 2: Coefficients (enumeration) (allow_override)
Filtering:AR%20Spectral%20Estimator int ModelOrder= 16 16 0 % // AR model order
Filtering:AR%20Spectral%20Estimator int EvaluationsPerBin= 15 15 1 % // Number of uniformly spaced evaluation points entering into a single bin value
Filtering:Spectral%20Estimation int SpectralEstimator= 1 1 0 2 // Choice of spectral estimation algorithm, 0: None, 1: AR, 2: FFT (enumeration)
Visualize:Processing%20Stages int VisualizeSpatialFilter= 1 0 0 1 // Visualize SpatialFilter output (boolean)
Filtering:SpatialFilter int SpatialFilterType= 1 0 0 3 // spatial filter type 0: none, 1: full matrix, 2: sparse matrix, 3: common average reference (CAR) (enumeration)
Filtering:SpatialFilter matrix SpatialFilter= 8 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 % +1 -1 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 % % // columns represent input channels, rows represent output channels
Filtering:SpatialFilter intlist SpatialFilterCAROutput= 0 // when using CAR filter type: list of output channels, or empty for all channels
Filtering:SpatialFilter int SpatialFilterMissingChannels= 1 0 0 1 // how to handle missing channels 0: ignore, 1: report error (enumeration)
Visualize:Processing%20Stages int VisualizeSpectralEstimator= 0 0 0 1 // Visualize SpectralEstimator output (boolean)
Filtering:LinearClassifier matrix Classifier= 2 { input%20channel input%20element%20(bin) output%20channel weight } 1 4 1 1 1 6 2 1 // Linear classification matrix in sparse representation
Visualize:Processing%20Stages int VisualizeLinearClassifier= 0 0 0 1 // Visualize LinearClassifier output (boolean)
Filtering:LPFilter float LPTimeConstant= 0 16s 0 % // time constant for the low pass filter
Visualize:Processing%20Stages int VisualizeLPFilter= 0 0 0 1 // Visualize LPFilter output (boolean)
Filtering:ExpressionFilter string StartRunExpression= % // expression executed on StartRun
Filtering:ExpressionFilter string StopRunExpression= % // expression executed on StopRun
Filtering:ExpressionFilter matrix Expressions= 0 1 // expressions used to compute the output of the ExpressionFilter (rows are channels; empty matrix for none)
Visualize:Processing%20Stages int VisualizeExpressionFilter= 0 0 0 1 // Visualize ExpressionFilter output (boolean)
Filtering:Normalizer floatlist NormalizerOffsets= 2 0 0 0 % % // normalizer offsets
Filtering:Normalizer floatlist NormalizerGains= 2 1 1 0 % % // normalizer gain values
Filtering:Normalizer intlist Adaptation= 2 2 2 0 0 2 // 0: no adaptation, 1: zero mean, 2: zero mean, unit variance (enumeration)
Filtering:Normalizer matrix BufferConditions= 0 0 // expressions corresponding to data buffers (columns correspond to output channels, multiple rows correspond to multiple buffers)
Filtering:Normalizer float BufferLength= 9s 9s % % // time window of past data per buffer that enters into statistic
Filtering:Normalizer string UpdateTrigger= 0 // expression to trigger offset/gain update when changing from 0 (use empty string for continuous update)
Visualize:Processing%20Stages int VisualizeNormalizer= 0 0 0 1 // Visualize Normalizer output (boolean)
System:Core%20Connections string SignalProcessingIP= 127.0.0.1 // (readonly)(noedit)
System:Core%20Connections string SignalProcessingPort= 50350 // (readonly)(noedit)
System:Version matrix SignalProcessingVersion= { Framework Revision Build Config Protocol } 1 3.6.7385 7385,%202023-05-28T15:26:16Z MSVC-19.33.31629.0-AMD64,%20release,%202023-05-30T17:14:52Z,%20brunnerlab@DESKTOP-3EM2F9K USE_DYNAMIC_CRT:TRUE%20USE_OPENMP:ON%20USE_PRECOMPILED_HEADERS:ON%20USE_ASSERTS_IN_RELEASE_BUILDS:OFF 2.3 // SignalProcessing version information (noedit)(readonly)
System:Configuration matrix SignalProcessingFilterChain= 6 { Filter%20Name Position%20String } SpatialFilter 2.B SpectralEstimator 2.C LinearClassifier 2.D LPFilter 2.D1 ExpressionFilter 2.D2 Normalizer 2.E // SignalProcessing filter chain (noedit)(readonly)
Connector:ConnectorInput list ConnectorInputFilter= 0 // list of state names or signal elements to allow, "*" for any, signal elements as in "Signal(1,0)"
Connector:ConnectorInput string ConnectorInputAddress= % localhost:20320 % % // IP address/port to read from, e.g. localhost:20320
Application:Human%20Interface%20Devices string KeystrokeStateName= % // State to be translated into keystrokes (0-F), empty for off
Application:Human%20Interface%20Devices string KeystrokeExpression= % // Expression that evaluates to a virtual keycode, empty for off
Application:Human%20Interface%20Devices string KeystrokeExpressionOnStartRun= % // Expression that initializes expression variables on StartRun
Connector:ConnectorOutput string ConnectorOutputAddress= % localhost:20321 % % // one or more IP:Port combinations, e.g. localhost:20321
System:Core%20Connections string ApplicationIP= 127.0.0.1 // (readonly)(noedit)
System:Core%20Connections string ApplicationPort= 50374 // (readonly)(noedit)
System:Version matrix ApplicationVersion= { Framework Revision Build Config Protocol } 1 3.6.7385 7385,%202023-05-28T15:26:16Z MSVC-19.33.31629.0-AMD64,%20release,%202023-05-30T17:14:52Z,%20brunnerlab@DESKTOP-3EM2F9K USE_DYNAMIC_CRT:TRUE%20USE_OPENMP:ON%20USE_PRECOMPILED_HEADERS:ON%20USE_ASSERTS_IN_RELEASE_BUILDS:OFF 2.3 // Application version information (noedit)(readonly)
System:Configuration matrix ApplicationFilterChain= 3 { Filter%20Name Position%20String } ConnectorInput 2.9999 KeystrokeFilter 3.1 ConnectorOutput 3.9999 // Application filter chain (noedit)(readonly)
System:Randomization int RandomSeed= 4962 0 % % // seed for the BCI2000 pseudo random number generator (readonly)
System:Randomization int RandomizationWarning= 1 1 0 1 // warn if subsequent Runs have identical RandomSeed value (boolean)
System:State%20Vector int /StateVectorLength= 25 16 % % // length of the state vector in bytes (noedit)(readonly)

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 06 Jun 2024, 04:29
by mellinger
What did I miss?
You looked at the source signal instead of the SpatialFilter output. Go to the small window at the top left that says "SpatialFilter" and magnify it.

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 06 Jun 2024, 05:13
by whwilbur
mellinger wrote: 06 Jun 2024, 04:29
What did I miss?
You looked at the source signal instead of the SpatialFilter output. Go to the small window at the top left that says "SpatialFilter" and magnify it.
Oh. I thought it occurred in the source signal like in the DSP implementation. It works now :)

Image

The Spatial filter output only shows up during recording and not when pressing "Set Config". Why?

When saving it. It's still saving the source signals. How do you save the spatial filter outputs?

And how do you enable 16 channels? In actual experiments, they used 8 bipolar pairs and used up the entire 16 channels. Then the saved output went to Mathlab post processing to analyze the similarities and differences in all channels at the same time.

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 06 Jun 2024, 08:09
by mellinger
When saving it. It's still saving the source signals. How do you save the spatial filter outputs?
You can't. When analyzing recorded signals, just subtract the channels in Matlab to achieve the same result. Or, to make it more elegant, multiply with the SpatilaFilter matrix in Matlab.
The Spatial filter output only shows up during recording and not when pressing "Set Config". Why?
Because online processing is only applied during a run.
And how do you enable 16 channels?
https://www.bci2000.org/mediawiki/index ... C#SourceCh