Updates for HS>=0.3.99
from pathlib import Path
import copy
+from packaging import version
from ..basesorter import BaseSorter
from ..utils import RecordingExtractorOldAPI
@@ -147,6 +148,13 @@ class HerdingspikesSorter(BaseSorter):
import herdingspikes as hs
import spikeinterface.toolkit as st
+ hs_version = version.parse(hs.__version__)
+
+ if hs_version >= version.parse("0.4.0"):
+ new_api = True
+ else:
+ new_api = False
+
recording = load_extractor(output_folder / 'spikeinterface_recording.json')
p = params
