Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time stamp jump bug #102

Open
angelavujic opened this issue Sep 9, 2022 · 6 comments
Open

time stamp jump bug #102

angelavujic opened this issue Sep 9, 2022 · 6 comments

Comments

@angelavujic
Copy link

In something around ~2-3% of my LSL recordings (using PyLSL and LabRecorder) there are times in the EEG stream where the time stamp will have around +/- 200,000 added to it from one sample to the next. If this can be fixed with a change on my end I'd appreciate a solution - It can be manually fixed when analyzing offline data but it does cause an extra hassle when running at least 40+ sessions (have used 3 different eeg devices and 2 different computers, a windows and mac, and encountered this issue)

@cboulay
Copy link
Collaborator

cboulay commented Sep 9, 2022

What kind of EEG devices are you using and what LSL apps?

Since you're using pylsl I will assume you're using pyxdf to load the xdf file. Try disabling one or all of these features to see if it fixes the jumps:

https://github.com/xdf-modules/pyxdf/blob/main/pyxdf/pyxdf.py#L74-L76

If yes, please report back here. Ultimately you don't want to disable them, but maybe you can also play with the other arguments to that function, and we can try to isolate the problem.
Also, at that point I'd ask that you close this issue and open a new one in the pyxdf repo. You'll get some extra assistance there with people other than me who have more expertise on pyxdf.

@dmedine
Copy link
Contributor

dmedine commented Sep 12, 2022

Hi, Angela. +/-200,000 seconds is not so nice. I would be interested to see the source code you are using to send the EEG data just to make sure that there is nothing in there that could be causing this problem. Is it publicly available?

My guess, however, is that there is some network hiccup occurring when the clock offset measurement is made. This can cause issues when the clock synchronization and de-jittering mappings are computed by the xdf load program. As Chad suggests, you can turn these features off when you load the data and that might provide some more context.

@angelavujic
Copy link
Author

angelavujic commented Sep 12, 2022

Hi all, thanks for your prompt responses!

@cboulay I've primarily used the ANT neuro eego mylab 64 and the Neuroelectrics Enobio 32 with both LabRecorder and pylsl. Most data was collected with a Windows desktop or tablet running Windows 10 but I also have had data streamed from a Windows computer to a Macbook 2017 (OS Catalina 10.15.7) which saved the data via LabRecorder.

@cboulay @dmedine I've encountered this issue both while using LabRecorder to save data to xdfs and while using pylsl to save data to CSVs as well. I'm willing to try and recreate the issue but it may be difficult as it doesn't come up that frequently - over the course of ~150 sessions I've maybe seen this 5 - 7 times so far, but the count could be higher. Can't open source the Python code in its entirety but could share snippets if helpful

@agricolab
Copy link
Contributor

agricolab commented Sep 12, 2022

ANT neuro offers streaming access either via SDK (for manual conversion to LSL) or builtin LSL support with their GUI application. Similar with Neuroelectrics. Which option did you use?

@angelavujic
Copy link
Author

I've used the ANT Neuro GUI and Neuroelectrics GUI for the outlets. The inlet was in pylsl in one case and labrecorder for another.

@dmedine
Copy link
Contributor

dmedine commented Sep 13, 2022

I still suspect it has to do with a network hiccup phenomenon. Can you share one of the faulty xdf files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants