Syncing time between Muse Monitor and PC

musemonitor

#1

I’m using the third-party app, Muse Monitor to record raw EEG data from my Muse 2016 headband and send it to my computer for further processing (lack of Research Tools support for Muse 2016 is a major pain). In my experiments, I’m using the software OpenSesame for visual stimulus delivery and recording EEG data using Muse Monitor. Accuracy of timing is crucial in my experiment. The timestamps provided by OpenSesame come from system time (it’s possible to get GMT/UTC time, etc. too as there is a provision for inline Python scripting). However, I’m not sure where Muse Monitor gets its timestamps from. Is it system time? Also, what is the best way to sync times between Muse Monitor and the software I’m using?


#2

The timestamps in Muse Monitor come from the Interaxon data packet timestamp.

Regarding accuracy and sync, it should be noted that the timestamps do not come from the hardware itself, but are created by the Interaxon API during processing of the Bluetooth data, using the device system time.

As the Bluetooth data stream is buffering and processing packets in chunks, this results in timestamps which have a large delta from the expected 256Hz rate. You will see many packets which are processed very quickly, then a few which have a large delay (relatively speaking, on the microsecond level).

On the hardware side, packets are in fact generated at a steady 256Hz rate, so when processing for sync, I would advise averaging out the timestamp deltas.

Regarding UTC, yes that’s something I could add as an option. I will look into it.


Android SDK data
#3

If you could look into time sync with any external server (say, NTP), it would be really helpful. Thanks!


#4

Because Muse Monitor uses the time from the phone, you can already do that. Just sync your phone and PC to the same NTP server. There are a couple of NTP apps on the Google store.


#5

My PC is part of a domain and hence Windows doesn’t allow me to sync system time with an NTP server. I can sync my phone system time to an NTP server but the phone needs to be rooted. This is what is making life difficult for me at the moment :frowning:


#6

Sorry, I’m not going to add external NTP to Muse Monitor. If I did, you would still have to root your phone for it to work and then you may as well use the dedicated NTP Sync apps.

Assuming both your phone and PC keep accurate time, then you only need to calculate the offset. On the 2016 MU-02 Muse, you can use pin 4 of the micro-usb to connect an Auxiliary electrode. If you send a pulse to this from your PC, it’ll show in the RAW data and then you have your exact time offset for future calculations.

Alternatively you could display the time on both your phone and PC (you’d need an app to show milliseconds), then take a photo with another device to get the delta.