Open Ephys: find root folder to correctly look for timestamps#4500
Open Ephys: find root folder to correctly look for timestamps#4500alejoe91 wants to merge 12 commits intoSpikeInterface:mainfrom
Conversation
|
@bparks13 this should fix the issue. It also covers the case where one passes an individual experiment/recording |
|
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!) |
|
@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 |
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! |
Fixes #4496