Description
OpenEphys GUI: 0.6.4
open-ephys-python-tools: 0.1.4
In a recently acquired session, global timestamps are miscalculated, because the events are sorted by timestamp
, but the sample_number
is therefore shuffled. When the global timestamp function takes the iloc[0]
and iloc[-1]
sample_number
, then these are not the first and last sample in the acquisition.
You can see already in the head of the events dataframe that the sorting of the sample_number
is random:
Out[1]:
line sample_number timestamp ... stream_index stream_name state
0 1 113210450 -9906.177509 ... 1 ProbeA-AP 1
1 1 113209520 -9840.472230 ... 1 ProbeA-AP 0
2 1 113208648 -9778.864699 ... 1 ProbeA-AP 1
3 1 113206516 -9628.237112 ... 1 ProbeA-AP 0
4 1 113206244 -9609.020084 ... 1 ProbeA-AP 1
... ... ... ... ... ... ... ...
25263 1 12873859 149.820794 ... 0 ProbeA-LFP 0
25264 1 12874087 149.911938 ... 0 ProbeA-LFP 1
25265 1 12510866 149.958667 ... 0 ProbeA-LFP 1
25266 1 12510889 149.967867 ... 0 ProbeA-LFP 0
25267 1 12510992 150.009067 ... 0 ProbeA-LFP 1
When checking the synchronization event counts and sample differences between the synch channels, they match perfectly, just not according to the built-in function.
Note that with the negative timestamp
values, the timestamps set to -1
as not synchronized
are in the middle section of the events dataframe.