Skip to content

Commit

Permalink
Merge branch 'main' into adjust-eps-for-whitening
Browse files Browse the repository at this point in the history
  • Loading branch information
magland authored Oct 4, 2023
2 parents 2f71764 + af9660a commit fcf5c91
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/spikeinterface/core/waveform_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,12 @@ def load_from_folder(
rec_attributes = None

if sorting is None:
sorting = load_extractor(folder / "sorting.json", base_folder=folder)
if (folder / "sorting.json").exists():
sorting = load_extractor(folder / "sorting.json", base_folder=folder)
elif (folder / "sorting.pickle").exists():
sorting = load_extractor(folder / "sorting.pickle")
else:
raise FileNotFoundError("load_waveforms() impossible to find the sorting object (json or pickle)")

# the sparsity is the sparsity of the saved/cached waveforms arrays
sparsity_file = folder / "sparsity.json"
Expand Down

0 comments on commit fcf5c91

Please sign in to comment.