From 338a8a1add8be4fab9c1228bc45ad830a7343a10 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Al=C3=A1n=20Mu=C3=B1oz?= <alan.munoz@ed.ac.uk>
Date: Mon, 19 Dec 2022 16:51:14 +0000
Subject: [PATCH] fix(grouper): cover fringe indexing loss

---
 src/postprocessor/grouper.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/postprocessor/grouper.py b/src/postprocessor/grouper.py
index 3bfa3fe6..8518b8a2 100644
--- a/src/postprocessor/grouper.py
+++ b/src/postprocessor/grouper.py
@@ -407,7 +407,11 @@ def concat_signal_ind(
     elif mode == "families":
         combined = chainer.get_raw(path, **kwargs)
 
-        mother_id_mask = get_mother_ilocs_from_daughters(df)
+        daughter_ids = combined.index[
+            combined.index.get_level_values("mother_label") > 0
+        ]
+
+        mother_id_mask = get_mother_ilocs_from_daughters(combined)
         combined = combined.loc[
             combined.index[mother_id_mask].union(daughter_ids)
         ]
-- 
GitLab