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

CN TODO: Correct raw timestamps #63

Closed
CodyCBakerPhD opened this issue Sep 13, 2024 · 2 comments · Fixed by #93
Closed

CN TODO: Correct raw timestamps #63

CodyCBakerPhD opened this issue Sep 13, 2024 · 2 comments · Fixed by #93
Assignees

Comments

@CodyCBakerPhD
Copy link
Member

SpikeSortingLoader has a method that gives a mapping from frame indices in raw recording to timestamps used for spike sorting, etc.

Maybe Mayo can send explicit code

@CodyCBakerPhD
Copy link
Member Author

@mayofaulkner Would you be so kind as to copy/paste a code segment here showing how to get the synchronized frame to global timestamp mapping?

@CodyCBakerPhD CodyCBakerPhD self-assigned this Sep 24, 2024
@mayofaulkner
Copy link

Here is a snippet that shows how you can get the raw data timestamps

from brainbox.io.one import SpikeSortingLoader
from one.api import ONE
import numpy as np
one = ONE()
ssl = SpikeSortingLoader(pid=pid, one=one)
sr_ap = ssl.raw_electrophysiology(band="ap", stream=True)
sr_times = ssl.samples2times(np.arange(0, sr_ap.ns), direction='forward')

@CodyCBakerPhD CodyCBakerPhD linked a pull request Sep 29, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants