Comma confusion in output format of OpenBCI_GUI ?
Hi there, I have a question regarding the output format of the openbci. The output format is comma-seperated but unfortunately there are commas in the values as well. This means that a statistics program used to analyse the data will either seperate variables also within the values or not recognise the values as numeric and declare them as factors. We thought of writing an algorithm which replaced a comma followed by a space just with a space, since we have a lot of data it unfortunately takes ages to run through the huge files. Also it is not very elegant. So my question is whether there is a way to change the output format of the openbci to space-seperation. This would make it much easier for anyone to analyse data. Any help is much appreciated! Cheers!
Comments
thanks for your quick response. Here are a few lines:
17, -33449,99, 0,00, 12767,41, 0,00, -12278,37, 0,00, 0,00, 0,00, -0,01, -0,02, 0,98
18, -33468,65, 0,00, 12775,38, 0,00, -12303,88, 0,00, 0,00, 0,00, -0,01, -0,02, 0,98
19, -33496,19, 0,00, 12772,77, 0,00, -12327,14, 0,00, 0,00, 0,00, 0,00, -0,02, 0,98
20, -33481,08, 0,00, 12761,86, 0,00, -12313,40, 0,00, 0,00, 0,00, 0,00, -0,02, 0,98
21, -33448,45, 0,00, 12754,80, 0,00, -12289,35, 0,00, 0,00, 0,00, 0,00, -0,02, 0,98
22, -33432,96, 0,00, 12758,06, 0,00, -12288,81, 0,00, 0,00, 0,00, 0,00, -0,02, 0,98
23, -33457,63, 0,00, 12765,55, 0,00, -12317,13, 0,00, 0,00, 0,00, 0,00, -0,02, 0,98
Conor, it looks like Processing is using some kind of 'localization' scheme to set the decimal point character to a country specific value. In this case comma. Was that a recent mod? I have not heard of any other complaints on this before. Can someone suggest a quick source level fix? Or should he change his OS localization setting to be United States or something like that?
Regards,
William
Or how can I change the output format to tabs or vertical bars? I looked through the entire code of the openbci_gui and could not find a way to change the output format.
In the original processing GUI it looks like the comma is appended on line 82 of dataFiles.pde. You can try changing that line to the delimiter you need for your project.
thanks so much for your help and suggestions. I used the technique suggested by you, Andrea, and changed the code. And it worked.
Many thanks!
When I recorded the file I had just channel 3 and 4 on. The saved file looks so:
%OpenBCI Raw EEG Data
%
%Sample Rate = 250.0 Hz
%First Column = SampleIndex
%Other Columns = EEG data in microvolts followed by Accel Data (in G) interleaved with Aux Data
0, 0,00, 0,00, 16530,34, 23103,97, 0,00, 0,00, 0,00, 0,00, 0,08, 0,19, 0,99
1, 0,00, 0,00, 16529,40, 23106,54, 0,00, 0,00, 0,00, 0,00, 0,08, 0,19, 0,99
2, 0,00, 0,00, 16530,99, 23107,39, 0,00, 0,00, 0,00, 0,00, 0,07, 0,19, 0,96
...
255
0
.... and so on ....
When I try to playback it the OpenBCI-GUI gives the channel 3 in the 5, the
channel 4 in the 7 and in channel 6 and 8 gives some information that I
can't understand. What I'm doing wrong?
Thaks in advance!
Mariana
https://lh3.googleusercontent.com/qTWfylHDyHVBGGt5LDNI0SNbb9oaoPtGvgdce38JZXSeEZHBGlkMmD3i8SopJMps-H495B8e=w2762-h1542
Indeed I have the GUI version from 2016. I have changed the source as @wezzix mentioned and it works fine now.
best
Mariana