LorenFrankLab / spyglass

Neuroscience data analysis framework for reproducible research built by Loren Frank Lab at UCSF
https://lorenfranklab.github.io/spyglass/
MIT License
94 stars 43 forks source link

Spikes sorting recording timestamps starting from 0 #1133

Open samuelbray32 opened 1 month ago

samuelbray32 commented 1 month ago

Describe the bug

To Reproduce

import spikeinterface as si
from spyglass.spikesorting.v0 import SpikeSortingRecording

bad_key = {
    "curation_id": 0,
    "nwb_file_name": "Frodo20230814_.nwb",
    "sort_group_id": 0,
    "sort_interval_name": "02_wtrack",
    "preproc_params_name": "franklab_tetrode_hippocampus",
    "team_name": "ms_stim",
    "sorter": "clusterless_thresholder",
    "sorter_params_name": "clusterless_fixed",
    "artifact_removed_interval_list_name": "Frodo20230814_.nwb_02_wtrack_0_franklab_tetrode_hippocampus_ampl_2000_prop_75_artifact_removed_valid_times",
}
SpikeSortingRecording & bad_key
recording_path = (SpikeSortingRecording & bad_key).fetch1("recording_path")
recording = si.load_extractor(recording_path)
recording.get_times()