Skip to content

Commit 67494ba

Browse files
committed
pushing group plot logic, not yet tailored for vosslab linux
1 parent 700968c commit 67494ba

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

code/utils/group.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ def plot_person(self):
6464
durations.append(values)
6565

6666
df_all = pd.DataFrame(durations)
67-
df_all = df_all[~df_all["Subject"].str.startswith("sub-6")].reset_index(drop=True)
67+
if not df_all.empty and "Subject" in df_all.columns:
68+
df_all = df_all[~df_all["Subject"].str.startswith("sub-6")].reset_index(drop=True)
69+
else:
70+
logger.warning("No valid data found — skipping Subject filtering.")
6871

6972
self._plot_stacked_bar(df_all,
7073
title="Normalized Average Activity Composition by Subject (All Sessions)",

0 commit comments

Comments
 (0)