From 8e7c3c0473f3bc677dac561f7782b82a829556a9 Mon Sep 17 00:00:00 2001 From: Henry Day-Hall Date: Mon, 9 Oct 2023 19:45:48 +0200 Subject: [PATCH] bug fix for plotting --- jet_tools/CompareClusters.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jet_tools/CompareClusters.py b/jet_tools/CompareClusters.py index 940a19e..7e2f2f4 100644 --- a/jet_tools/CompareClusters.py +++ b/jet_tools/CompareClusters.py @@ -1691,8 +1691,9 @@ def project_2d(show_params, best_slice, all_cols, variable_cols, score_cols, mult_col = "AveSeperateJets" # if we are taking the best slice remove all other table rows if best_slice: - bg_values = convert_to_float(table[bg_col].to_numpy()) - sg_values = convert_to_float(table[sg_col].to_numpy()) + import ipdb; ipdb.set_trace() + bg_values = table[bg_col].values + sg_values = table[sg_col].values combined = np.sqrt(0.53 * np.square(bg_values) + np.square(sg_values)) if isinstance(best_slice, bool): best_idx = np.nanargmin(combined.tolist()) @@ -1954,7 +1955,7 @@ def plot_scan_triangles(eventWise, jet_name_base, jet_PS_mask=None, if show_names is None: show_names = [] for name in variable_cols: - values = table[:, all_cols.index(name)] + values = table[name] values = {str(v) for v in values} if len(values) > 1: show_names.append(name)