Skip to content

Commit

Permalink
Update merge_extension_data for quality_metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishalcrow committed Sep 11, 2024
1 parent accf40a commit c1f0b2a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def _set_params(
seed=None,
skip_pc_metrics=False,
delete_existing_metrics=False,
metrics_to_compute=None,
):

if metric_names is None:
Expand Down Expand Up @@ -118,6 +119,7 @@ def _merge_extension_data(
):
import pandas as pd

metric_names = self.params["metric_names"]
old_metrics = self.data["metrics"]

all_unit_ids = new_sorting_analyzer.unit_ids
Expand All @@ -126,7 +128,9 @@ def _merge_extension_data(
metrics = pd.DataFrame(index=all_unit_ids, columns=old_metrics.columns)

metrics.loc[not_new_ids, :] = old_metrics.loc[not_new_ids, :]
metrics.loc[new_unit_ids, :] = self._compute_metrics(new_sorting_analyzer, new_unit_ids, verbose, **job_kwargs)
metrics.loc[new_unit_ids, :] = self._compute_metrics(
new_sorting_analyzer, new_unit_ids, verbose, metric_names, **job_kwargs
)

new_data = dict(metrics=metrics)
return new_data
Expand Down

0 comments on commit c1f0b2a

Please sign in to comment.