Synchronising clocks between PsychoPy and Emotiv

Hi all,

I encountered a problem when I was trying to analyze the data both from emotiv and psychopy.

I found that the two kinds of data are not synchronous with each other. For example, the time of the first EEGmarker in emotiv data is 89s, but the counterpart in psychopy data is 134s, as shown below.

This is the data from psychopy (the green ones):

This is the data from emotiv:

图片

The psychopy experiment is shown below. In the ‘begin’ trial, we start the emotiv recording from the very beginning.

And I found the time of the ‘text_begin’ component in psychopy had the problem, too, as shown below. In my view, this component should start at the same time with emotiv recording.

The whole experiment started with a latency. And from my point of view, this latency shouldn’t be recorded in the psychopy data. Because it may cause trouble when we want to extract data slices from EEG by referring data from psychopy. It is beyond my expectation because I thought psychopy and emotiv should be synchronous with each other. If not, the work we’d done to insert emotiv into psychopy as a component would be meaningless.

And the practical question is—could I address all of the psychopy data by just subtracting the latency of ‘text_begin’ ? So that I can futher cutting EEG according to the new psychopy data. I’d appreciate it if you could help explain this question. It is vey important for my project!! Looking forward to your reply!!

Yours,

Mohan Zhao

Hello,

how do you start two computers at exactly the same moment in time? Don’t you send onset-markers from the PsychoPy via a serial/parallel port?

Best wishes Jens

It is inevitable that two systems will have different timebases depending on when they start. The default timer in PsychoPy starts from when the script starts running. This is an appreciable (and variable) time before the first routine begins. There is a reason most things like reaction times in PsychoPy are measured relative to the start of a routine, because the global script timer is not fixed to a defined event.

If you wish to have two identical time bases, then you need to create a custom timer in your PsychoPy script, set to begin counting from the time you send your signal to trigger the EEG recording.

Fortunately you’ve picked this up at the testing and development stage - synchronisation is one of the key things to get right before collecting any data.

If you have collected data, then you’ve already solved the issue - as you note, at the analysis stage, you can simply subtract the time of the relevant base event from the PsychoPy times to get compatible time series.