Cyton-Daisy Marker Delay and alternative file extension for raw EEG data

Hi,
We are using OpenBCI Cyton and Daisy to collect EEG data and sending markers using Brainflow API (insert_marker()). We have stimuli presentation coded in the same python code. we first initiate the board and start the data stream, then we start showing images, and put markers when images are shown using insert_marker(). However, I believe we are having marker delays (not completely sure). We are not using External Triggers because we don't need our board to be connected with any external hardware. Furthermore, we are using OpenCV to show stimuli (images) and the execution time of python code to show stimuli is different for every image, meaning 1st image execution time 100ms, 2nd 90ms and so on, but the marker execution time is 0ms, that means the marker should be exactly where the image is shown.

Due to COM port latency, I believe the markers are not accurate. However, Can we do something that can make the marker delays more deterministic so that we could use MNE python to shift the markers a little bit behind for every image?

Also, can we have differernt eeg data file type instead of csv using brainflow? perhaps .bdf file or .eeg ?

Sincerely,
Shyamal

Comments

  • wjcroftwjcroft Mount Shasta, CA
    edited December 2022

    Shyamal, hi.

    Definitely post your Brainflow marker question on the Brainflow Slack 'help' section. Sign up here,

    https://brainflow.org/

    In general, the External Trigger method you mention, has the tightest coupling with the EEG data stream because it is sampled and recorded at the same moments (sample rate) as the EEG samples. Any 'marker' techniques are going to include unavoidable delay factors. But those delays are relatively constant, provided your computer has enough processing cycles available. In other words, lightly loaded. So if you can determine the delays involved with a calibration run, then you can use that to sync your markers.

    re: recording file type. Since you have access to the original data stream with Brainflow library, you can write your custom recording file in any format you choose. Just do a search on the format and the language you are using and you'll likely find a library that can create that. For example,

    https://www.google.com/search?q=python+write+bdf+file

    William

Sign In or Register to comment.