OpenBCI_GUI, modified for other EEG device

ahmedzafar28ahmedzafar28 Lahore
edited August 2016 in OpenBCI_GUI
Hey all,

Say I have numbers ranging from 0 to +- 2000 from another EEG device on Processing. I want to custom plot these on the OpenBCI GUI. How would I go about doing that in the OpenBCI GUI code.

Ahmed

Comments

  • wjcroftwjcroft Mount Shasta, CA
    Ahmed, hi.

    What is your goal in doing this? (What do you mean by "custom plot"?) Are you just wanting to plot your other device EEG data? Or are you looking for some kind of integration with the OpenBCI hardware?

    There are existing packages that can plot biosignal data. These can read from formats like CSV files. One such is,


    On the other hand, if you format your CSV data like OpenBCI does for it's recording, you can use the playback feature.


  • Hey croft!

    Yes I want to plot my other device's EEG data, and it's not OpenBCI. I have the numbers in Processing, and I need to plot it. I sort of forgot to mention that it was live data.

    I have made some progress on this by modifying the synthesizeData function and putting in the raw data Integers instead of the val_uV value at the end, but I want my readings to be accurate, as OpenBCI's EEG would be plotted on the OpenBCI GUI. So I need help with that.

    I already have it playing from a recording. It's the Live that's the issue. :)

    Ahmed
  • wjcroftwjcroft Mount Shasta, CA
    So all you have to do is feed the stream with the same kind of microvolt values that the GUI expects, correct? That sounds straightforward. Just convert your other device -2000 to +2000 raw value range to microvolts.

    What is the other device you are using? Have you checked their data stream specification for how the raw values relate to microvolts? You just need to parse that data stream and convert to microvolts.

    William

  • Thanks William,

    It's the emotiv epoc, I want to display its live stream on the OpenBCI GUI. No I havn't checked that but I will.

    Say if I do get the microvolts values: Where exactly do I input these values? My best guess would be right now to change the values of curDataPacket.values[Ichan] (for example in the Synthesize function in OpenBCI_GUI file), and when I'll run the algorithmic synthesizer, it will display the live values.

    What do you think about this? I've been going this way about it right now. My current value of curDataPacket is as follows:  curDataPacket.values[Ichan] = (int) (0.5f+ Float.valueOf(tokens[Ichan]) / scale_fac_uVolts_per_count);

    Where tokens is an array of the numbers inputted from the Emotiv Epoc with length 17: 14 electrodes, 1 unknown value, and 2 gyroscopes.

    Ahmed
  • wjcroftwjcroft Mount Shasta, CA
    My best guess would be right now to change the values of curDataPacket.values[Ichan] (for example in the Synthesize function in OpenBCI_GUI file),

    If you do it that way, you change the operation of the GUI, so that entering Synthesize mode will now show live EPOC data? Wouldn't that be confusing for the user? Why not just replace the action of the Live mode with your EPOC data?

    I have not worked with the EPOC, so I can't help you there. You need to call an external library to get the raw live data. This is because Emotiv made that format 'secret'. This appears to be the library,


  • William,

    I already have the numbers in Processing using Cykit, emotkit's Windows cousin.

    This is just the testing/debugging phase, of course the end version will have a separate Emotiv window, like the Live or the Playback one.

    I just need to know where exactly to input the numbers, the rest I'll just handle myself.
  • wjcroftwjcroft Mount Shasta, CA
    Can you look at our OpenBCI data stream format specification, see how it is converted to microvolts and entered into the Processing data stream -- then extrapolate that to your EPOC case? Seems straightforward.

  • wjcroftwjcroft Mount Shasta, CA
    One other consideration is the difference in the sample rates between OpenBCI and Emotiv. OpenBCI runs at 250 sps for 8 channel, or 125 sps in 16 channel mode. EPOC runs at 128 sps. EPOC+ runs at 256.

    So you need to adjust any portions of the OpenBCI_GUI that incorporate the sample rate. That includes the horizontal axis scaling, FFT, filters, etc.

    In VPL environments such as BrainBay, BioEra, OpenViBE, neuromore, etc. -- the sample rate automatically adjusts. As it is part of the descriptor information that is made available through the connection pipes. That is, the pipes pass both "in band" data stream, and "out of band" configuration information.

    William
Sign In or Register to comment.