NeuroTechX / EEG-ExPy

EEG Experiments in Python
https://neurotechx.github.io/EEG-ExPy/
BSD 3-Clause "New" or "Revised" License
436 stars 124 forks source link

Event Marking between Brainflow and other python processes implementation. #156

Open iPsych opened 2 years ago

iPsych commented 2 years ago

There are several EEG devices (especially headsets) working only with Brainflow. However, It seems tricky to send event marker outside Brainflow (Their examples call brainflow and psychopy function in same commandline, not let psychopy send marker to independent brainflow thread/process).

I found a work-around using Brainflow->LabStreamingLayer, but it seems not an ideal solution considering temporal accuracy.

NeurotechX shared a lot of notebooks integrates PsychoPy and Brainflow, but as far as I understand, they call psychopy and brainflow in same .py script, not allow communication btw two, right? (i.e. send event marker in GUI designed PsychoPy experiment.)

(Maybe, just call Brainflow inside PsychoPy would be one solution.)

JohnGriffiths commented 2 years ago

Here there.

Not exactly sure what you're asking here, but in case it's helpful:

Yes, you could add brainflow compatibility within a GUI-designed psychopy experiment fairly easily.

You would just need to initialize the EEG device at the start, as in e.g. here,

and then add a few push lines along the way when you want to send a marker.

This is how that's done in the N170 experiment, which calls this push method, which as you can see is not too complicated.

Hope that's helpful!