1515
1616def load (
1717 file_or_folder_or_dict ,
18- base_folder = None ,
1918 ** kwargs ,
2019 # load_extensions=True, backend_options=None
2120) -> "BaseExtractor | SortingAnalyzer | Motion | Template" :
@@ -45,9 +44,6 @@ def load(
4544 ----------
4645 file_or_folder_or_dict : dictionary or folder or file (json, pickle)
4746 The file path, folder path, or dictionary to load the Recording, Sorting, or SortingAnalyzer from
48- base_folder : str | Path | bool | None, default: None
49- The base folder to make relative paths absolute. Only used to load Recording/Sorting objects.
50- If True and file_or_folder_or_dict is a file, the parent folder of the file is used.
5147 kwargs : keyword arguments for various objects, including
5248 * base_folder: str | Path | bool
5349 The base folder to make relative paths absolute. Only used to load Recording/Sorting objects.
@@ -67,7 +63,7 @@ def load(
6763 spikeinterface object: Recording or Sorting or SortingAnalyzer or Motion or Templates
6864 The loaded spikeinterface object
6965 """
70- base_folder = kwargs .get ("base_folder" , base_folder )
66+ base_folder = kwargs .get ("base_folder" , None )
7167 if isinstance (file_or_folder_or_dict , dict ):
7268 # dict can be only Recording Sorting Motion Templates
7369 d = file_or_folder_or_dict
@@ -261,7 +257,7 @@ def _guess_object_from_zarr(zarr_folder):
261257 return _guess_object_from_dict (spikeinterface_info )
262258
263259 # here it is the old fashion and a bit ambiguous
264- if "unit_ids" in zarr_root . keys () and " templates_array" in zarr_root .keys ():
260+ if "templates_array" in zarr_root .keys ():
265261 return "Templates"
266262 elif "channel_ids" in zarr_root .keys () and "unit_ids" not in zarr_root .keys ():
267263 return "Recording"
@@ -270,7 +266,6 @@ def _guess_object_from_zarr(zarr_folder):
270266
271267
272268def _load_object_from_zarr (folder_or_url , object_type , ** kwargs ):
273-
274269 if object_type == "SortingAnalyzer" :
275270 from .sortinganalyzer import load_sorting_analyzer
276271
@@ -280,10 +275,6 @@ def _load_object_from_zarr(folder_or_url, object_type, **kwargs):
280275 folder_or_url , backend_options = backend_options , load_extensions = load_extensions
281276 )
282277 return analyzer
283-
284- # elif object_type == "Motion":
285- # No Motion in zarr
286-
287278 elif object_type == "Templates" :
288279 from .template import Templates
289280
0 commit comments