Skip to content

Commit d091a1b

Browse files
committed
use passed dataframe
1 parent 97beb18 commit d091a1b

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src/spikeinterface/curation/model_based_curation.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,9 @@ def _check_params_for_classification(self, enforce_metric_params=False, model_in
188188
else:
189189
warnings.warn(warning_message)
190190

191-
def _export_to_phy(self, classified_units):
191+
def _export_to_phy(self, classified_df):
192192
"""Export the classified units to Phy as cluster_prediction.tsv file"""
193193

194-
import pandas as pd
195-
196-
# Create a new DataFrame with unit_id, prediction, and probability columns from dict {unit_id: (prediction, probability)}
197-
classified_df = pd.DataFrame.from_dict(classified_units, orient="index", columns=["prediction", "probability"])
198-
199194
# Export to Phy format
200195
try:
201196
sorting_path = self.sorting_analyzer.sorting.get_annotation("phy_folder")

0 commit comments

Comments
 (0)