neuromodulation / py_neuromodulation

Real-time analysis of intracranial neurophysiology recordings.
https://neuromodulation.github.io/py_neuromodulation/
MIT License
41 stars 9 forks source link

Fix timestamp for LSL and offline stream data #333

Closed timonmerk closed 1 week ago

timonmerk commented 2 weeks ago

The add time function should keep the generator returned time instead of cnt_samples. This would now be true for offline and LSL generators. I think the _add_timestamp function can thus be deleted. Maybe check beforehand the time output in an offline file and LSL stream, to see if those are correct. For offline files the time should start at segment_length_ms, for LSL the actual time of acquisition.

https://github.com/neuromodulation/py_neuromodulation/blob/9ca70ee2b14e8b4da02f7103d5fb8ea4444a65d7/py_neuromodulation/nm_stream_offline.py#L206

It would be best for have a new PR for that issue.

SamedVossberg commented 1 week ago

Fixed in #337