Skip to content

Commit

Permalink
Add protection for multi-channel metrics (thanks Chris)
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoe91 committed Sep 6, 2024
1 parent d18f48f commit ea13bcb
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ def _compute_metrics(self, sorting_analyzer, unit_ids=None, verbose=False, **job
pc_metric_names = [k for k in metric_names if k in _possible_pc_metric_names]
if len(pc_metric_names) > 0 and not self.params["skip_pc_metrics"]:
if not sorting_analyzer.has_extension("principal_components"):
raise ValueError("waveform_principal_component must be provied")
raise ValueError(
"To compute principal components base metrics, the principal components "
"extension must be computed first."
)
pc_metrics = compute_pc_metrics(
sorting_analyzer,
unit_ids=non_empty_unit_ids,
Expand Down

0 comments on commit ea13bcb

Please sign in to comment.