Page 1 of 9

running g.USBamp with BCI2000 using Windows 11

Posted: 06 Apr 2024, 20:55
by whwilbur
Hi, first of all. Is BCI2000 compatible with Windows 11 using the gtec USBamp. I was able to transfer the gUSBamp.dll from the windows folder to BCI2000/prog as instructed (for hardware version 3.). However when I tried to run the gUSBampSource.exe it returned this error "gUSBampSource: Could not connect to operator module." My gtec USBamp version 3 was made in 2011.

But the most puzzling is the command gUSBampgetinfo.exe How come it only returns up to 4800 Hz sampling in the available bandpass filter. Isn't it the USBamp allows up to 38,400Hz sampling?? The command returns in last line in the bandpass list:

201| 5.00 | 2000.0 | 4800 | 8 | 1


why doesn't it have for example

! 5.00 ! 9600.0 ! 38400 ! 8 ! 1

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 07 Apr 2024, 09:54
by mellinger
Hi, first of all. Is BCI2000 compatible with Windows 11 using the gtec USBamp.
Hi, BCI2000 is compatible with Windows 11. AFAIK, the gUSBamp is compatible as well.
However when I tried to run the gUSBampSource.exe it returned this error "gUSBampSource: Could not connect to operator module."
This is because BCI2000 consists of four modules that need to be started up in an certain order. For more information, see
https://www.bci2000.org/mediawiki/index ... I2000_Tour
But the most puzzling is the command gUSBampgetinfo.exe How come it only returns up to 4800 Hz sampling in the available bandpass filter. Isn't it the USBamp allows up to 38,400Hz sampling??
The gUSBampgeinfo tool displays filters that are available in the gUSBamp's EEPROM, running on the gUSBamp's built-in DSP. You cannot use any of those filters with a sampling rate of 38.4kHz but you can acquire data without using a filter.

Just set the FilterEnabled and NotchEnabled parameters to 0 to disable all filtering the the gUSBamp hardware.
For a full description of gUSBamp parameters, see
https://www.bci2000.org/mediawiki/index ... terEnabled

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 07 Apr 2024, 21:31
by whwilbur
mellinger wrote: 07 Apr 2024, 09:54
Hi, first of all. Is BCI2000 compatible with Windows 11 using the gtec USBamp.
Hi, BCI2000 is compatible with Windows 11. AFAIK, the gUSBamp is compatible as well.
However when I tried to run the gUSBampSource.exe it returned this error "gUSBampSource: Could not connect to operator module."
This is because BCI2000 consists of four modules that need to be started up in an certain order. For more information, see
https://www.bci2000.org/mediawiki/index ... I2000_Tour
But the most puzzling is the command gUSBampgetinfo.exe How come it only returns up to 4800 Hz sampling in the available bandpass filter. Isn't it the USBamp allows up to 38,400Hz sampling??
The gUSBampgeinfo tool displays filters that are available in the gUSBamp's EEPROM, running on the gUSBamp's built-in DSP. You cannot use any of those filters with a sampling rate of 38.4kHz but you can acquire data without using a filter.

Just set the FilterEnabled and NotchEnabled parameters to 0 to disable all filtering the the gUSBamp hardware.
For a full description of gUSBamp parameters, see
https://www.bci2000.org/mediawiki/index ... terEnabled
Thanks.

Image

In the Source Signal screen. When you right click it and choose Low Pass. There are only option for Off, 30Hz, 40Hz, 70Hz. What if I set the gUSBampSource to FilterLowPass of 200Hz or others higher than 70Hz. How do you make it override the choices in the Source Signal above?

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 08 Apr 2024, 08:49
by mellinger
If you activate a filter inside the gUSBamp, it will be applied to the signal first, which means that both the signal in the data file and online processing will be affected.
If you activate a filter in the visualization window, neither the data file nor online processing will be affected, it's only the signal display in the window itself.

Typically, you want to apply filters as late as possible, so the information in the data file is maximized.
For online filtering, see the documentation for the IIRBandpass:
https://www.bci2000.org/mediawiki/index ... IRBandpass

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 08 Apr 2024, 09:38
by whwilbur
mellinger wrote: 08 Apr 2024, 08:49 If you activate a filter inside the gUSBamp, it will be applied to the signal first, which means that both the signal in the data file and online processing will be affected.
If you activate a filter in the visualization window, neither the data file nor online processing will be affected, it's only the signal display in the window itself.

Typically, you want to apply filters as late as possible, so the information in the data file is maximized.
For online filtering, see the documentation for the IIRBandpass:
https://www.bci2000.org/mediawiki/index ... IRBandpass
Image

Ok, thanks. Here is my last question. When I inputted a 10uV, 50Hz signal from a sine wave generator to the Usbamp demo software set at 1000Hz low pass with 4800 sampling (see above). I get noises. This occurs because the high frequency noises looks like small jagged pulses added to the sinewave. However in BCI2000 (see below). I can't see the jagged edges with same settings. Did the Signal Processing like P3SignalProcessing somehow conditions the sine waves to remove the jagged edges? If not, how come there are no jagged edges displayed at BCI2000 when the setting is also 1000Hz low pass at 4800Hz sampling? And how to put back the jagged edges like in the Usbamp demo?

Image

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 08 Apr 2024, 11:40
by mellinger
That's difficult to say. In any case, the P3SignalProcessing has nothing to do with the signal displayed in the SignalSource window.

What I can see in your BCI2000 SignalSource window is a 50Hz signal filtered with a 60Hz notch filter. This seems not be similar to the signal and settings in the gUSBamp Demo window.

To me, it looks as if there was some amount of noise added to the signal in gUSBamp demo. Filtering noise looks different from that, e.g. overshooting and decaying resonances.

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 08 Apr 2024, 12:09
by whwilbur
mellinger wrote: 08 Apr 2024, 11:40 That's difficult to say. In any case, the P3SignalProcessing has nothing to do with the signal displayed in the SignalSource window.

What I can see in your BCI2000 SignalSource window is a 50Hz signal filtered with a 60Hz notch filter. This seems not be similar to the signal and settings in the gUSBamp Demo window.

To me, it looks as if there was some amount of noise added to the signal in gUSBamp demo. Filtering noise looks different from that, e.g. overshooting and decaying resonances.
It's the same setting. The signal generator is the Netech EEG Simulator. It has choices of 0.1Hz, 2Hz, 5Hz, 50Hz, 60Hz.

https://www.netechbiomedical.com/minisim-eeg

I chose 10uV, 50Hz in the Netech EEG simulator. In the gUSBamp. You can see that the notch filter is enabled at 4800Hz sampling, 58 to 62Hz, order 4. This is exactly same as my BCI2000Launcher. The output is the same whether the Source Signal Notch is off or 60Hz. CONFIG setting in the following:

Image

Image

Image

It looks like signal conditioning was automatically applied at BCI2000. Or maybe in the gUSBamp Demo. There is no 64X oversampling in the DSP? Note it is only when I set my Netech to 5 Hz that the noises come out (See below). So I wonder if it has to do with the 64X oversampling and averaging that perhaps not enabled at gUSBamp Demo? Or Signal conditioning was done in the BCI2000 software?

Image

Again, the above was at 5Hz which shows the noises. At 50Hz, the BCI2000 didn't show any noises as shown in my last message. While the gUSBamp demo showed noises at 50Hz. All same settings and all exactly the same Netech EEG simulator. The Source Signal Notch being off and 60Hz has same display. In the gUSBamp demo. It is same results with noises as I tried it the past 3 weeks. And I only have one simulator the Netech EEG simulator set always at 10uV, 50Hz output.. Please help figure why the BCI2000 didn't show the same noises at 50Hz, 10uV Netech input. Thanks.

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 08 Apr 2024, 12:34
by whwilbur
To continue above. Btw.. the following is exactly the contents of my *.prm parameter file. What I did was load CursorTask_SignalGenerator.prm in the prm/examples directory. Then at CONFIG. I saw there is an USBamp option, then set the settings and save it as USBamp.prm file. Maybe there are some additional lines that initate signal conditoning or mix it with other software signal generator? Whatever. Please share the correct USBamp parameter file. I'll just edit the right parameter file to 4800 sampling, high pass 0, low pass 1000Hz, order 8. And notch to 58 to 62Hz, order 8, All Butterworth.


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.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 // 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)
Source:Signal%20Properties int SourceCh= auto // number of digitized and stored channels (allow_override)
Source:Signal%20Properties int SampleBlockSize= auto // number of samples transmitted at a time (allow_override)
Source:Signal%20Properties int SamplingRate= 4800 // sampling rate (allow_override)
Source:Signal%20Properties list ChannelNames= 1 auto // list of channel names (allow_override)
Source:Signal%20Properties list SourceChOffset= 1 auto // Offset for channels in A/D units (allow_override)
Source:Signal%20Properties list SourceChGain= 1 auto // 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 SubjectSession= 001 001 % % // three-digit session number
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= auto 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= 1 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= auto 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 auto // 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 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= 1 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= /qXRvPELscW2SwEd4 // 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:4002 // (noedit)
System:Core%20Connections string SignalSourceIP= 127.0.0.1 // (readonly)(noedit)
System:Core%20Connections string SignalSourcePort= 64220 // (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= 13 1 /1/DataIOFilter /1/gUSBampADC /1/BCI2000FileWriter /1/AlignmentFilter /1/TransmissionFilter /2/SpatialFilter /2/PeakDetector /2/LinearClassifier /2/Normalizer /3/ConnectorInput /3/ApplicationBase /3/KeystrokeFilter /3/ConnectorOutput // Filter Directory (noedit)(readonly)
Visualize:Processing%20Stages int VisualizeSpatialFilter= 0 0 0 1 // Visualize SpatialFilter output (boolean)
Filtering:SpatialFilter int SpatialFilterType= 0 0 0 3 // spatial filter type 0: none, 1: full matrix, 2: sparse matrix, 3: common average reference (CAR) (enumeration)
Filtering:SpatialFilter matrix SpatialFilter= 4 4 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 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)
PeakDetector:PeakDetector float PosPeakThreshold= 0 0 0 2 // Threshold for positive peaks
PeakDetector:PeakDetector float NegPeakThreshold= 0 0 0 2 // Threshold for negative peaks
PeakDetector:PeakDetector int HistoryLength= 10 0 0 10 // Length of history of peak counts
PeakDetector:PeakDetector int TargetChannelPos= 0 0 0 10 // Target channel for peak detection of positive peaks
PeakDetector:PeakDetector int TargetChannelNeg= 0 0 0 10 // Target channel for peak detection of negative peaks
Visualize:Processing%20Stages int VisualizePeakDetector= 1 0 0 1 // Visualize PeakDetector 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: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= 2 1 (Feedback)&&(TargetCode==1) (Feedback)&&(TargetCode==2) // 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= (Feedback==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= 64255 // (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= 4 { Filter%20Name Position%20String } SpatialFilter 2.B PeakDetector 2.C LinearClassifier 2.D 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:Application%20Window int WindowWidth= 640 640 0 % // width of Application window
Application:Application%20Window int WindowHeight= 480 480 0 % // height of Application window
Application:Application%20Window int WindowLeft= 0 0 % % // screen coordinate of Application window's left edge
Application:Application%20Window int WindowTop= 0 0 % % // screen coordinate of Application window's top edge
Application:Application%20Window int WindowFullscreen= 0 0 0 1 // Application window fullscreen mode (boolean)
Application:Application%20Window string WindowBackgroundColor= 0x000000 0x505050 % % // Application window background color (color)(allow_override)
Application:Application%20Window string WindowHideCursor= 1 0 0 1 // hide cursor when mouse is over Application window (boolean)
Application:Application%20Window matrix WindowInfo= 1 1 auto // Application window information (readonly)(noedit)
Visualize:Application%20Window int VisualizeApplicationWindow= 0 0 0 1 // Display miniature copy of Application window (boolean)
Visualize:Application%20Window int AppWindowSpatialDecimation= 8 8 1 % // Application window decimation (shrinking) factor
Visualize:Application%20Window int AppWindowTemporalDecimation= 4 16 1 % // Application window time decimation factor
Application:AudioPlayback int AudioPlaybackOn= auto 0 0 1 // switch audio playback on
Application:AudioPlayback float AudioPlaybackRate= auto // audio playback sampling rate
Application:AudioPlayback int AudioPlaybackChannels= auto // number of playback output channels
Application:AudioPlayback float AudioPlaybackBufferDuration= auto // duration of playback buffer
Visualize:Application%20Log int ShowAppLog= 1 0 0 1 // Show application log window (boolean)
Application:Sequencing float PreRunDuration= 1 1 0 % // pause preceding first sequence
Application:Sequencing float PostRunDuration= 0 0 0 % // pause following last sequence
Application:Sequencing float PreSequenceDuration= 2s 2s 0 % // pause preceding sequences/sets of intensifications
Application:Sequencing float PostSequenceDuration= 2s 2s 0 % // pause following sequences/sets of intensifications
Application:Sequencing float StimulusDuration= 40ms 40ms 0 % // stimulus duration
Application:Sequencing string EarlyOffsetExpression= % // abort stimulus if this expression becomes true
Application:Sequencing float ISIMinDuration= 80ms 80ms 0 % // minimum duration of inter-stimulus interval
Application:Sequencing float ISIMaxDuration= 80ms 80ms 0 % // maximum duration of inter-stimulus interval
Application:Result%20Processing int InterpretMode= 0 0 0 2 // interpretation of results: 0 none, 1 online free mode, 2 copy mode (enumeration)
Application:Result%20Processing int DisplayResults= 1 1 0 1 // display results of copy/free spelling (boolean)
Application:Result%20Processing int AccumulateEvidence= 0 0 0 1 // accumulate evidence until a selection is made (boolean)
Application:Result%20Processing float MinimumEvidence= 0 0 0 % // do not make a selection unless target evidence exceeds this value. For a normalized classifier, MinimumEvidence approximates -2.3*log10(Error Probability)
Application:PhotoDiodePatch int PhotoDiodePatch= 0 1 0 1 // Display photo diode patch (boolean)
Application:PhotoDiodePatch float PhotoDiodePatchHeight= 0.065 1 0 1 // Photo diode patch height in relative coordinates
Application:PhotoDiodePatch float PhotoDiodePatchWidth= 0.05 1 0 1 // Photo diode patch width in relative coordinates
Application:PhotoDiodePatch float PhotoDiodePatchLeft= 0 1 0 1 // Photo diode patch left in relative coordinates
Application:PhotoDiodePatch float PhotoDiodePatchTop= 0.935 1 0 1 // Photo diode patch top in relative coordinates
Application:PhotoDiodePatch int PhotoDiodePatchShape= 1 1 0 1 // Photo diode patch shape: 0 rectangle, 1 ellipse (enumeration)
Application:PhotoDiodePatch int PhotoDiodePatchActiveColor= 0xffffff 0 0 0xffffffff // Photo diode patch color when active (color)
Application:PhotoDiodePatch int PhotoDiodePatchInactiveColor= 0x0 0 0 0xffffffff // Photo diode patch color when inactive, use 0xff000000 for transparent (color)
Application:PhotoDiodePatch string PhotoDiodePatchExpression= StimulusBegin>0 // Photo diode patch expression, evaluates to 1 when active
Application:Sequencing int NumberOfSequences= 15 15 1 % // number of sequences in a set of intensifications
Application:Speller%20Targets matrix TargetDefinitions= 36 { Display Enter Display%20Size Icon%20File Sound Intensified%20Icon } A A 1 % % % B B 1 % % % C C 1 % % % D D 1 % % % E E 1 % % % F F 1 % % % G G 1 % % % H H 1 % % % I I 1 % % % J J 1 % % % K K 1 % % % L L 1 % % % M M 1 % % % N N 1 % % % O O 1 % % % P P 1 % % % Q Q 1 % % % R R 1 % % % S S 1 % % % T T 1 % % % U U 1 % % % V V 1 % % % W W 1 % % % X X 1 % % % Y Y 1 % % % Z Z 1 % % % 1 1 1 % % % 2 2 1 % % % 3 3 1 % % % 4 4 1 % % % 5 5 1 % % % 6 6 1 % % % 7 7 1 % % % 8 8 1 % % % 9 9 1 % % % _ %20 1 % % % // speller target properties
Application:Speller%20Targets intlist NumMatrixColumns= 1 6 6 1 % // display matrices' column number(s)
Application:Speller%20Targets intlist NumMatrixRows= 1 6 6 0 % // display matrices' row number(s)
Application:Audio%20Stimuli int AudioStimuliOn= 0 0 0 1 // Audio Stimuli Mode (0=no, 1=yes) (boolean)
Application:Audio%20Stimuli matrix AudioStimuliRowsFiles= 6 { filename } ./voice/1.wav ./voice/2.wav ./voice/3.wav ./voice/4.wav ./voice/5.wav ./voice/6.wav // audio stimuli rows files
Application:Audio%20Stimuli matrix AudioStimuliColsFiles= 6 { filename } ./voice/a.wav ./voice/b.wav ./voice/c.wav ./voice/d.wav ./voice/e.wav ./voice/f.wav // audio stimuli column files
Application:Speller%20Targets floatlist TargetWidth= 1 5 0 0 100 // target width in percent of screen width
Application:Speller%20Targets floatlist TargetHeight= 1 5 0 0 100 // target height in percent of screen height
Application:Speller%20Targets floatlist TargetTextHeight= 1 10 0 0 100 // height of target labels in percent of screen height
Application:Speller%20Targets stringlist BackgroundColor= 1 0x000000 0x505050 % % // target background color (color)
Application:Speller%20Targets stringlist TextColor= 1 0x000000 0x505050 % % // text color (color)
Application:Speller%20Targets stringlist TextColorIntensified= 1 0x0000FF 0x505050 % % // intensified text color (color)
Application:Speller%20Targets intlist IconHighlightMode= 1 1 1 0 4 // icon highlight method 0: Show/Hide, 1: Intensify, 2: Grayscale, 3: Invert, 4: Dim (enumeration)
Application:Speller%20Targets floatlist IconHighlightFactor= 1 0.5 0.5 0 % // scale factor for highlighted icon pixel values
Application:Speller int FirstActiveMenu= 1 1 1 % // Index of first active menu
Application:Speller float StatusBarSize= 10 0 0 100 // size of status bar in percent of screen height
Application:Speller float StatusBarTextHeight= 8 0 0 100 // size of status bar text in percent of screen height
Application:Speller string TextToSpell= % // character or string to spell in offline copy mode
Application:Speller string TextResult= % // user spelling result
Application:Speller int TestMode= 0 0 0 1 // select targets by clicking on their associated stimuli (0=no, 1=yes) (boolean)
Application:Speller string DestinationAddress= % // network address for speller output in IP:port format
Application:Text%20Window int TextWindowEnabled= 0 0 0 1 // Show Text Window (0=no, 1=yes) (boolean)
Application:Text%20Window int TextWindowLeft= 640 0 0 % // Text Window X location
Application:Text%20Window int TextWindowTop= 0 0 0 % // Text Window Y location
Application:Text%20Window int TextWindowWidth= 512 512 0 % // Text Window Width
Application:Text%20Window int TextWindowHeight= 512 512 0 % // Text Window Height
Application:Text%20Window string TextWindowFontName= Courier // Text Window Font Name
Application:Text%20Window int TextWindowFontSize= 10 4 1 % // Text Window Font Size
Application:Text%20Window string TextWindowFilePath= % // Path for Saved Text File (directory)
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
Application:Localization string Language= Default Default % % // Language for user messages
Application:Localization matrix LocalizedStrings= { German } { TIME%20OUT%20!!! Waiting%20to%20start%20... Sleeping--Select%20SLEEP%20twice%20to%20resume Select%20SLEEP%20once%20more%20to%20resume Paused--Select%20PAUSE%20again%20to%20resume } Zeit%20abgelaufen! Warte%20... Angehalten:%20Zweimal%20SLEEP%20fur%20Weiter Angehalten:%20Noch%20einmal%20SLEEP%20fur%20Weiter Angehalten:%20Noch%20einmal%20PAUSE%20fur%20Weiter // Localized user messages
System:Core%20Connections string ApplicationIP= 127.0.0.1 // (readonly)(noedit)
System:Core%20Connections string ApplicationPort= 64279 // (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= 4 { Filter%20Name Position%20String } ConnectorInput 2.9999 P3SpellerTask 3 KeystrokeFilter 3.1 ConnectorOutput 3.9999 // Application filter chain (noedit)(readonly)
System:Randomization int RandomSeed= 2276 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= 45 16 % % // length of the state vector in bytes (noedit)(readonly)

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 08 Apr 2024, 13:32
by mellinger
Sorry, but all I can tell is that BCI2000 does not apply any "Signal Conditioning" to the data.
Your prm file suggests that you are sampling at 4800Hz in BCI2000, but the Signal Source window displays the 50 Hz signal with relatively few data points. Could it be that loading the prm file doesn't work somehow, and you are sampling at 256Hz instead?

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 08 Apr 2024, 18:36
by whwilbur
mellinger wrote: 08 Apr 2024, 13:32 Sorry, but all I can tell is that BCI2000 does not apply any "Signal Conditioning" to the data.
Your prm file suggests that you are sampling at 4800Hz in BCI2000, but the Signal Source window displays the 50 Hz signal with relatively few data points. Could it be that loading the prm file doesn't work somehow, and you are sampling at 256Hz instead?
How do you tell there is relatively few data points? Is it because of the steps that can be seen at the sine wave? But the steps were created by the Netech simulator so the sine wave is not smooth. Yet still there must be noises present at 10uV because the noise at 1000Hz or above is say 3uV. Remember the noise in the spec is 1 to 30 Hz at 0.4uV rms or about 2.64uV p-p at 1 to 30 hz. More so at higher frequency.

The following is Netech set to 50uV 50Hz with g.USBamp demo set to 4800 sampling without any passband. There are very little noises because the amplitude is much larger at 50uV instead of 10uV.

Image

In the following the Netech is set to 50uV 5Hz (lower frequency) with g.USBamp demo set to 4800 sampling without any passband. Noises can be seen because the wave is slower hence the 5 Hz has lots of time on the display, and plenty of higher frequency noise between 5 Hz and up. That higher frequency noise looks jagged.

Image

In the following the Netech is set to 10uV 50hz with g.USBamp demo set to 4800 sampling without any passband, the noises are there because the amplitude is smaller at 10uV (with noise at about 3uV). And even at 50Hz, it is quite slow compared to high frequency so 50 Hz has lots of time on the display, and plenty of higher frequency noise between 50 Hz and up. That higher frequency noise looks jagged.

Image

The above should be what the image at BCI2000 should also look like but it didn't and instead smooth with no noises.

In the following the BCI2000 sampling is set to 38,400 sampling with no passband. Netech simulator Signal is 10uV, 50Hz, yet still no noises. How do you determine there are relativeily few data points? Again the Netech produces sine wave with steps. Did you determine from the steps? But the noises should be there as seen in the gUSBamp demo.

Image

I tried different ways to make the parameter file at BCI2000 Launcher. It is same. I think it is possible it is a bug? Maybe people haven't noticed it before most set the sampling to 256 or a bit higher and never check? Do you own a USBamp? For others who read this who own a USBamp.. Kindly comment so the bug can be fixed immediately. Thanks.

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 09 Apr 2024, 07:23
by mellinger
How do you tell there is relatively few data points? Is it because of the steps that can be seen at the sine wave?
Yes, if you count 10 periods of the sine wave, you are at about 0.2s, i.e. it is confirmed that the sine wave has 50Hz.
Now, if I count all the steps in the sine wave over the same duration, I get around 50. This means that the sampling rate of the displayed signal is around 50*50 = 250Hz. I guess I missed some steps and the sampling rate is really 256Hz (because that is supported by the gUSBamp).

I don't own a gUSBamp, so I will forward your question to someone who can test with a real gUSBamp.

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 09 Apr 2024, 12:36
by mellinger
The guy with the gUSBamp helped me sort out things. The reason for your problem is that you have

Code: Select all

VisualizeSourceDecimation= auto.
If you set this to 1 instead, you will see the full signal displayed. With "auto", it would downsample the visible signal to 256Hz, which also explains my observations.

We have set the default to "auto=1" now, but in your version you will need to set it manually to "1".

Thank you for your persistence, and best regards,
Jürgen

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 09 Apr 2024, 16:20
by whwilbur
mellinger wrote: 09 Apr 2024, 12:36 The guy with the gUSBamp helped me sort out things. The reason for your problem is that you have

Code: Select all

VisualizeSourceDecimation= auto.
If you set this to 1 instead, you will see the full signal displayed. With "auto", it would downsample the visible signal to 256Hz, which also explains my observations.

We have set the default to "auto=1" now, but in your version you will need to set it manually to "1".

Thank you for your persistence, and best regards,
Jürgen

Before I read this message. I went to the batch directory and ran P3Speller_USBamp and the right waveforms came out (see image below).

When I don't use the Batch file. And I ran using the BCI2000 Launcher. And set it manually. It can run with right waveforms with VisualizeSourceDecimation = 1. However, whenever I set SourceCh in Signal Properties to 8. The connection cuts when SET CONFIG is ran with the error "Lost Connection to SignalSource". But with the Config that is defaulted with P3Speller_USBamp. the SourceCh is automatically set to 8 and VisualizeSourceDecimation = 1 and it ran.

Is one supposed to use it by running the P3Speller_USBamp in the Batch which can make it run property. Or is one supposed to go to BCI2000Launcher and set the config manually and save it as *.prm for later loading? Or are both allowed? I tried to read your book for hours trying to sort it out before I came across the Batch file.

Also using the Batch config and running with correct waveforms. The following is the screenshot with sampling at 4800Hz with 1000Hz bandwidth in the filter setting and the Netech EEG simulator set at 10uV, 50Hz. Is the Roundtrip in timing supposed to be Nan or should there be a number? How to make the Roundtrip with number? Aksi why is there lost bytes in the logs?

Image

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 10 Apr 2024, 00:33
by mellinger
Before I read this message. I went to the batch directory and ran P3Speller_USBamp and the right waveforms came out (see image below).
That's because the batch file loads one or two parameter files from /parms. If you open the batch file with a text editor, you will see which ones, and can enter them into the "Parameter Files" section in BCI2000Launcher. You will then have the same behavior as in the batch file.
When I don't use the Batch file. And I ran using the BCI2000 Launcher. And set it manually. It can run with right waveforms with VisualizeSourceDecimation = 1. However, whenever I set SourceCh in Signal Properties to 8. The connection cuts when SET CONFIG is ran with the error "Lost Connection to SignalSource". But with the Config that is defaulted with P3Speller_USBamp. the SourceCh is automatically set to 8 and VisualizeSourceDecimation = 1 and it ran.
I guess this is an issue with the SampleBlockSize parameter. Of course, the gUSBamp source module should not crash but give an error message then.
Is one supposed to use it by running the P3Speller_USBamp in the Batch which can make it run property. Or is one supposed to go to BCI2000Launcher and set the config manually and save it as *.prm for later loading? Or are both allowed? I tried to read your book for hours trying to sort it out before I came across the Batch file.
Both are allowed. BCI2000Launcher is supposed to be a more user-friendly alternative to batch files. The main difference is that batch files automatically load proper parameter files, whereas in BCI2000Launcher you need to manually specify them.
Sorry if you don't find the answers in the book. You are welcome to use the website for information.
Is the Roundtrip in timing supposed to be Nan or should there be a number?
The roundtrip timing is NaN because the system is in "Resting" state, i.e. it is not processing data, just displaying the source signal. As soon as you press "Start", data will move in a cycle from Signal Source to Signal Processing to Application and back to Signal Source, so a roundtrip time can be displayed.

The "missing bytes" issue should not be there. We will try to reproduce and fix it.

Re: running g.USBamp with BCI2000 using Windows 11

Posted: 10 Apr 2024, 01:27
by whwilbur
mellinger wrote: 10 Apr 2024, 00:33
Before I read this message. I went to the batch directory and ran P3Speller_USBamp and the right waveforms came out (see image below).
That's because the batch file loads one or two parameter files from /parms. If you open the batch file with a text editor, you will see which ones, and can enter them into the "Parameter Files" section in BCI2000Launcher. You will then have the same behavior as in the batch file.
When I don't use the Batch file. And I ran using the BCI2000 Launcher. And set it manually. It can run with right waveforms with VisualizeSourceDecimation = 1. However, whenever I set SourceCh in Signal Properties to 8. The connection cuts when SET CONFIG is ran with the error "Lost Connection to SignalSource". But with the Config that is defaulted with P3Speller_USBamp. the SourceCh is automatically set to 8 and VisualizeSourceDecimation = 1 and it ran.
I guess this is an issue with the SampleBlockSize parameter. Of course, the gUSBamp source module should not crash but give an error message then.
Is one supposed to use it by running the P3Speller_USBamp in the Batch which can make it run property. Or is one supposed to go to BCI2000Launcher and set the config manually and save it as *.prm for later loading? Or are both allowed? I tried to read your book for hours trying to sort it out before I came across the Batch file.
Both are allowed. BCI2000Launcher is supposed to be a more user-friendly alternative to batch files. The main difference is that batch files automatically load proper parameter files, whereas in BCI2000Launcher you need to manually specify them.
Sorry if you don't find the answers in the book. You are welcome to use the website for information.
Is the Roundtrip in timing supposed to be Nan or should there be a number?
The roundtrip timing is NaN because the system is in "Resting" state, i.e. it is not processing data, just displaying the source signal. As soon as you press "Start", data will move in a cycle from Signal Source to Signal Processing to Application and back to Signal Source, so a roundtrip time can be displayed.

The "missing bytes" issue should not be there. We will try to reproduce and fix it.
When I pressed Start to the same Config used as before. I got massive "Buffer overflow, data lost". I'm using Microsoft Surface 2017 with Windows 11.

Image

Do you know what caused it? Maybe it is related to the missing bytes in Set Config?

Anyway. For now I just want to be able to save the output from the USBamp, something I couldn't do in g.USBamp demo. Please share the link how. That's all for now. I'd read all the resources in the internet and your book slowly for other stuff. But I just want to know the best way to save the pure output directly from the g.USBamp for now at a file for my offline analysis. Thank you.