Skip to content

Commit

Permalink
use sa unit ids and switch order of id indep test
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishalcrow committed Sep 11, 2024
1 parent 715ce54 commit 9fb7f34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def _compute_metrics(self, sorting_analyzer, unit_ids=None, verbose=False, metri

import pandas as pd

metrics = pd.DataFrame(index=sorting_analyzer.sorting.unit_ids)
metrics = pd.DataFrame(index=sorting_analyzer.unit_ids)

# simple metrics not based on PCs
for metric_name in metric_names:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,10 @@ def test_unit_id_order_independence(small_sorting_analyzer):
small_sorting_analyzer_2, metric_names=get_quality_metric_list(), qm_params=qm_params
)

for metric, metric_1_data in quality_metrics_1.items():
assert quality_metrics_2[metric][2] == metric_1_data["#3"]
assert quality_metrics_2[metric][7] == metric_1_data["#9"]
assert quality_metrics_2[metric][1] == metric_1_data["#4"]
for metric, metric_2_data in quality_metrics_2.items():
assert quality_metrics_1[metric]["#3"] == metric_2_data[2]
assert quality_metrics_1[metric]["#9"] == metric_2_data[7]
assert quality_metrics_1[metric]["#4"] == metric_2_data[1]


def _sorting_analyzer_simple():
Expand Down

0 comments on commit 9fb7f34

Please sign in to comment.