OpenBCI / OpenBCI_GUI

A cross platform application for the OpenBCI Cyton and Ganglion. Tested on Mac, Windows and Ubuntu/Mint Linux.
MIT License
708 stars 257 forks source link

added sd-card-file-conversion script #1207

Open Shyamal-Dharia opened 7 months ago

Shyamal-Dharia commented 7 months ago

Issue #1014 SD Card Hex to Standard Text File Conversion script.

Create a python script for sd card hex to csv file. additionally, it can also convert csv files to other formats using mne-python.

I have tested it with my sd card files and compared it with them. It works!

Also, couple of my files had analog values from photodiode sensor. It also converts those values and puts it in the last three column. Values can be distinguished by looking at graph generated from csv file from the column that had sensor values. The values ranged between 0 to 1. attached is the picture. Therefore, I think the script works for analog sensors too.

Took reference from https://github.com/roflecopter/openbci-psg for conversion.

Hope this helps!

graph

retiutut commented 7 months ago

GUI v4 files are very different from what will be GUI v6 files. Can you please download GUI v6 (beta) and try another pass at this? Awesome work so far!

Shyamal-Dharia commented 7 months ago

Understood. Yes, working on it will update the code as soon as possible.

Shyamal-Dharia commented 7 months ago

The recent code update has been tested under the following scenarios with cyton+daisy:

  1. With analog sensor values.
  2. In digital mode, where the sensor was not attached.
  3. With normal accelerometer data.

Based on my understanding, due to some limitations, the data for the following columns are not stored on the SD card: "Timestamp," "Marker Channel," and "Timestamp (Formatted)." Therefore, I was not able to use them and kept their values as zeros.

file type conversion also been tested for all three file types (.eeg, .edf, .set).