Skip to content

Conversation

@nicolossus
Copy link
Member

@nicolossus nicolossus commented Apr 25, 2025

Subtract the session start time when loading spike trains.

@nicolossus nicolossus requested a review from alejoe91 April 25, 2025 09:06
@alejoe91
Copy link
Contributor

@nicolossus what is the reason to subtract start_time? I'm asking because all other streams, like tracking, assume the session start time as start time, so you would need to offset those as well.

If it's for spike train analysis, maybe you could make this optional, with a subtract_start_time=False argument?

@nicolossus
Copy link
Member Author

@nicolossus what is the reason to subtract start_time? I'm asking because all other streams, like tracking, assume the session start time as start time, so you would need to offset those as well.

If it's for spike train analysis, maybe you could make this optional, with a subtract_start_time=False argument?

@alejoe91 Good point. The reason is indeed for spike train analysis. I made the start time subtraction optional.

It would be nice to add session start time subtraction to all the streams. However, we then need to ensure that the times are aligned. The tracking is not necessarily started at the same time as the neural recording. I have fixed this alignment for the LFP and tracking data in a separate repo, and will bring it into this one later.

@nicolossus nicolossus merged commit 8d22b14 into main Apr 25, 2025
2 checks passed
@nicolossus nicolossus deleted the fix_load_spikes branch April 25, 2025 10:11
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 this pull request may close these issues.

3 participants