Skip to content

Commit

Permalink
Merge pull request #3351 from alejoe91/storage-options
Browse files Browse the repository at this point in the history
Propagate storage_options to load_sorting_analyzer
  • Loading branch information
samuelgarcia authored Sep 3, 2024
2 parents 62f2d39 + ff43288 commit cb3da4e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/spikeinterface/core/sortinganalyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def create_sorting_analyzer(
return sorting_analyzer


def load_sorting_analyzer(folder, load_extensions=True, format="auto"):
def load_sorting_analyzer(folder, load_extensions=True, format="auto", storage_options=None):
"""
Load a SortingAnalyzer object from disk.
Expand All @@ -157,16 +157,17 @@ def load_sorting_analyzer(folder, load_extensions=True, format="auto"):
Load all extensions or not.
format : "auto" | "binary_folder" | "zarr"
The format of the folder.
storage_options : dict | None, default: None
The storage options to specify credentials to remote zarr bucket.
For open buckets, it doesn't need to be specified.
Returns
-------
sorting_analyzer : SortingAnalyzer
The loaded SortingAnalyzer
"""
if format == "zarr":
folder = clean_zarr_folder_name(folder)
return SortingAnalyzer.load(folder, load_extensions=load_extensions, format=format)
return SortingAnalyzer.load(folder, load_extensions=load_extensions, format=format, storage_options=storage_options)


class SortingAnalyzer:
Expand Down

0 comments on commit cb3da4e

Please sign in to comment.