From c429c2bbbf9b55bec013be4506cac71e1d491ade Mon Sep 17 00:00:00 2001 From: wendtalexander Date: Fri, 3 Jul 2026 08:54:41 +0200 Subject: [PATCH] [updating to read phy] --- oephys2nix/sorting.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/oephys2nix/sorting.py b/oephys2nix/sorting.py index e312d16..fae6e94 100644 --- a/oephys2nix/sorting.py +++ b/oephys2nix/sorting.py @@ -4,6 +4,8 @@ import pathlib import nixio import numpy as np import spikeinterface.core as si +import spikeinterface.extractors as extractors +from IPython import embed from nixio.exceptions import DuplicateName from rich.console import Console @@ -28,7 +30,7 @@ class AppendSorting: def __init__(self, sorter_path: pathlib.Path, recording_path: pathlib.Path): self.sorter_path = sorter_path self.recording_path = recording_path - self.sorting = si.load_sorting_analyzer(self.sorter_path) + self.sorting = extractors.read_phy(self.sorter_path) self.nixfile = nixio.File.open(str(self.recording_path), nixio.FileMode.ReadWrite) self.block = self.nixfile.blocks[0] self.das = self.block.data_arrays