-
Notifications
You must be signed in to change notification settings - Fork 231
Description
Hello! I have been using spikeinterface's run_sorter function in two ways:
sorting = si.run_sorter('kilosort4', blanked_rec, folder=outputFolder, docker_image=False, verbose=True, remove_existing_folder=False, raise_error=True, **params_kilosort4)
where (1), blanked_rec is a variable (a RemoveArtifactsRecording) that comes from running this:
blanked_rec = si.remove_artifacts(recording=recording_to_blank, list_triggers=mStim_sample_idx, ms_before=ms_before, ms_after=ms_after)
(we want to remove the artifact of microstimulation on the recording)
and where (2), blanked_rec is a loaded recording of (1) saved (a BinaryFolderRecording):
blanked_rec.save(folder=output_path)
...
blanked_rec=si.load(blanked_filename)
However, in both cases we found that despite the blanked recording looking good when manually scrolling through it, kilosort seems to use an incorrect recording. When doing manual curation in phy, some spikes are detected during the period that is blanked, which is visible when plotting the spiketimes relative to the TTLs that were blanked (picture attached). Many units also have suspiciously low spikecounts.
I think (1) didn't work because the RemoveArtifactsRecording is only a wrapper to the actual recording underneath. But I cannot explain why (2) didn't work either. Was there anything else wrong in my approach?
Any help is greatly appreciated!