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

Negative event timestamps #32

Closed
MarinManuel opened this issue Aug 8, 2024 · 2 comments
Closed

Negative event timestamps #32

MarinManuel opened this issue Aug 8, 2024 · 2 comments

Comments

@MarinManuel
Copy link
Contributor

Apologies if I am missing something obvious.
I am analyzing a recording with a NPX 2.0 probe and signals recorded on a PXIe-6341 ADC. I have a sync pulse going to both and I am synchronizing the streams in Open Ephys GUI (both markers green during the recording). I am using Open Ephys GUI v0.6.7.

I am using SpikeInterface to analyze the data, but I am having some issues with the TTL markers that I send to the PXIe card not lining up with the events recorded in the continuous stream.
to double check the times, I loaded the file using open-ephys-python-tools (v0.1.10) and I am seeing that some of the recordings have negative time stamps for the events, but not others

take for instance:

> print(session.recordnodes[0].recordings[3].events.head())

   line  sample_number    timestamp  processor_id  stream_index stream_name  \
0     1       46279507  1542.558200           100             1      ProbeA   
1     8       46289864  1542.558243           105             0   PXIe-6341   
2     8       46291857  1542.624569           105             0   PXIe-6341   
3     1       46281500  1542.624633           100             1      ProbeA   
4     8       46294143  1542.700862           105             0   PXIe-6341   

   state  
0      0  
1      0  
2      1  
3      1  
4      0  


> print(session.recordnodes[0].recordings[4].events.head())


   line  sample_number    timestamp  processor_id  stream_index stream_name  \
0     8         574448 -1567.460258           105             0   PXIe-6341   
1     1         573429 -1567.460200           100             1      ProbeA   
2     1         575568 -1567.389002           100             1      ProbeA   
3     8         576588 -1567.389002           105             0   PXIe-6341   
4     8         578552 -1567.323457           105             0   PXIe-6341   

   state  
0      1  
1      1  
2      0  
3      0  
4      1  

> print(session.recordnodes[0].recordings[5].events.head())

   line  sample_number    timestamp  processor_id  stream_index stream_name  \
0     8      117195544  2319.497431           105             0   PXIe-6341   
1     1      117182165  2319.497667           100             1      ProbeA   
2     8      117198476  2319.595154           105             0   PXIe-6341   
3     1      117185096  2319.595367           100             1      ProbeA   
4     1      117187675  2319.681333           100             1      ProbeA   

   state  
0      1  
1      1  
2      0  
3      0  
4      1  

Is that normal and I am missing a step to get the correct alignment of times?

@jsiegle
Copy link
Member

jsiegle commented Aug 8, 2024

We have also observed this in some of our recordings at the Allen Institute. We are still investigating why this is happening, but in all cases we've seen, the timestamps have been consistent across streams even when they are negative. So it's fine to shift all of the timestamps by the lowest value so they start at zero.

@MarinManuel
Copy link
Contributor Author

I am having some more issues with this, but the problem seem to lie with the GUI rather than the python tools, so closing this

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

2 participants