plotting analog read data from GUI recording file

nushaabnushaab Toronto, ON
edited March 2022 in OpenBCI_GUI

Hello,

I am looking to display analog data from the D11, D12 and D13 pins of the Cyton board outside of OpenBCI GUI. I have tried both the default .txt format and .BDF format by plotting the files with either Python (using a script similar to this one https://github.com/OpenBCI/OpenBCI_Experiment/blob/master/OpenBCI_Experiment_Toolkits.ipynb) or EDFBrowser (opening the raw file). The correct channels corresponding to the D11, D12 and D13 pins are the Accel X, Y and Z channels, if I am not mistaken?

When plotting, the analog data is simply shown as a flat line, with none of the analog spikes present which I can see when playing back the same data on OpenBCI GUI. I noticed that the y-axis of these channels is shown to be in unit g's, which I assume is the default unit for accelerometer data. I would appreciate any suggestions or guidance on how I can playback or plot the data from the analog pins on the Cyton board. For some background, I am looking to use these channels as trigger inputs using a photocell.

Thanks,

Nushaab

Comments

  • wjcroftwjcroft Mount Shasta, CA

    @nushaab said:
    ...

    The correct channels corresponding to the D11, D12 and D13 pins are the Accel X, Y and Z channels, if I am not mistaken?
    ...

    Nushaab, hi.

    The GUI recording is writing a Brainflow structure. Check the column headers. Although the 'Aux' data fields (three 16 bit values in the radio packets) do indeed share contents with either Accelerometer, Analog read data pins, or Digital read data -- the Brainflow structure has separate fields for these items. The Accelerometer fields in this structure dump, are not used when activating the Analog or Digital trigger data widgets.

    My suggestion would be to put some constant or slowly changing constant values on your input pins, and then discern which recording field is reporting that.

    Regards, William

  • nushaabnushaab Toronto, ON

    Thanks for the suggestion William. It seems as thought the structure of the CSV file may have changed, as the columns necessary for plotting the analog data were located in different columns. It seems as thought the Python script I have used from the Github link attached above currently attempts to plot the accelerometer data, rather than the analog read data. I am now able to plot my analog data as expected!

  • wjcroftwjcroft Mount Shasta, CA

    The CSV structure DID change, with the first version of the GUI that incorporated the Brainflow library and device interfaces. I understand this will be documented at some point. But the column headers do a pretty good job.

    https://github.com/OpenBCI/Documentation/issues/56

    Mentioning Richard @retiutut.

Sign In or Register to comment.