alexandrebarachant / muse-lsl

Python script to stream EEG data from the muse 2016 headset
BSD 3-Clause "New" or "Revised" License
616 stars 182 forks source link

Windows BlueMuse Streaming Wrong Marker Timestamp #127

Closed simonguozirui closed 1 year ago

simonguozirui commented 4 years ago

Hi, this is a problem I have stuck myself on for a couple of days and found a very subtle fix. I hope this can help others that have also been stuck with similar issues.

OS Windows 10 Python Runtime 2.7.18 (configured in a conda environment) No Bluetooth Dongle Muse model: Muse 1 2016

I use BlueMuse to stream data from my Muse via LSL to my computer. I run some ERP experiments from the notebooks. However, the marker would not label correctly. Only the first entry was labeled with a marker, causing the data useless for analysis. After lots of debugging, I realized the timestamp in my recorded data and the marker timestamp are order of magnitudes different. The logic of recording code was not wrong after thinking about it, so there must be some issues within the input.

Thus I looked into BlueMuse and I found one of the settings ⚙️, in the Primary TimeStamp Format > Main LSL Stream TimeStamp. It is defaulted to be BlueMuse High Accuracy (Unix Epoch Seconds UTC -0). You need to change it to native LSL Local Clock - Via Bridge (System Uptime Seconds). Do this every time you start BlueMuse!

Try this if you have issues with marker being incorrectly registered! Feel free to add this to the documentation too!

jdpigeon commented 4 years ago

Ahh, sorry you ran into this. I remember @kowalej had to do a lot of work a few years ago working around the fact that windows was creating timestamps of different format than linux and Mac machines.

Just to be clear, are the timestamps generated in the notebooks in unix epoch seconds or system uptime? I think we should make sure they're in unix epoch for all platforms.

buyuk-dev commented 3 years ago

seems related to https://github.com/alexandrebarachant/muse-lsl/issues/130