Saving integrated EMG Data
icp4001
icp4001
in OpenBCI_GUI
I'm sorry if a thread like this already exists, I could not locate one.
I am using the Cyton board for EMG measurements.
My question is: Is there a way to locally save the EMG integrated data (such as from the EMG widget). I see when opening the software that the raw data automatically saves locally, but the EMG data from the widget is much more useful to me (and I would like to save this data instead). I am able to send EMG data to MATLAB using the LSL networking tool (which works great for analysis in the lab), but I was hoping there would be something more straightforward than that. I would like to be able to analyze EMG data that physicians can save after using the device with patients (ideally in .txt or .csv form.
Comments
Please be advised that OpenBCI hardware is not approved for medical use. https://docs.openbci.com/docs/08FAQ/Liability
All of the data you need is in the file, which is raw data without filters applied. Loading this data for playback in the GUI and opening the EMG widget will work just as it did during the recording. If you would like to interpret this data without using the GUI, you could look at the source code, and apply similar normalization.
I have already completed the latter steps in C#. Here is the source code for EMG normalization, as extracted from the GUI:
https://github.com/retiutut/OpenBCI-Unity-Pong/blob/cf37fec9bed579a46517c7fc9d03b7fe0c1d4366/DOTS_Pong/Assets/Scripts/BrainFlowData.cs#L114
Take Care,
RW
Thank you!
@retiutut Is it possible to obtain the equation you are coding into C# in the above link?
I just shared the open source code. You are free to use this as you wish.
Thank you.
I have been trying to use LSL while re-streaming previously recorded data, but I have had no success. The parameters, code, and settings are identical to the "live" networking settings when the Cyton is connected, but MATLAB is unable to receive data from the inlet. I have repeated my exact steps while collecting data from the Cyton board, and MATLAB is able to receive the data.
Do you know why this might be or whether I can fix it?
Brainflow can interface with MATLAB,
https://brainflow.readthedocs.io/en/stable/Examples.html#matlab