Skip to content

Open Ephys: find root folder to correctly look for timestamps#4500

Open
alejoe91 wants to merge 12 commits intoSpikeInterface:mainfrom
alejoe91:oe-record-node
Open

Open Ephys: find root folder to correctly look for timestamps#4500
alejoe91 wants to merge 12 commits intoSpikeInterface:mainfrom
alejoe91:oe-record-node

Conversation

@alejoe91
Copy link
Copy Markdown
Member

@alejoe91 alejoe91 commented Apr 9, 2026

Fixes #4496

@alejoe91 alejoe91 requested a review from chrishalcrow April 9, 2026 08:23
@alejoe91 alejoe91 added the extractors Related to extractors module label Apr 9, 2026
@alejoe91
Copy link
Copy Markdown
Member Author

alejoe91 commented Apr 9, 2026

@bparks13 this should fix the issue. It also covers the case where one passes an individual experiment/recording

@chrishalcrow
Copy link
Copy Markdown
Member

Looks good - works for my locally. Could add a test here:

something like:

def check_timestamps_loaded_from_subfolder(self):
"""
Checks if the timestamps are loaded even if user inputs a subfolder as the data path.
"""

folder_path = local_folder / r"openephysbinary/v0.6.x_neuropixels_multiexp_multistream/Record Node 101/experiment1/recording1"
recording = self.ExtractorClass(folder_path, load_sync_timestamps=True)
assert recording.get_time_info().get('time_vector') is not None

(I wrote this in the github box... treat as pseudocode!)

@bparks13
Copy link
Copy Markdown

bparks13 commented Apr 9, 2026

@alejoe91 Perfect, thank you. +1 for adding checks for the various levels of folder paths that can be given, I didn't even think about that.

@chrishalcrow If the load_sync_timestamps=True parameter is not set, then internally the time vector is not created? That definitely makes it easier to add a unit test since we don't need to add a new dataset. I assumed that it would create a time vector using the start time and the assumed sampling frequency, but it sounds like that is not the case. Or, at the very least, there is a difference in the data structure that we can leverage here.

@chrishalcrow
Copy link
Copy Markdown
Member

@chrishalcrow If the load_sync_timestamps=True parameter is not set, then internally the time vector is not created? That definitely makes it easier to add a unit test since we don't need to add a new dataset. I assumed that it would create a time vector using the start time and the assumed sampling frequency, but it sounds like that is not the case. Or, at the very least, there is a difference in the data structure that we can leverage here.

Yeah, the time vector is pretty huge since it's the length of the total samples of the recording. So if we're using the "start time + sampling frequency" method, we never make it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extractors Related to extractors module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Passing a folder_path that ends with the Record Node does not correctly load timestamps

3 participants