Problem
collect_summaries(..., group_it=True) silently returns a wide, non-averaged
frame when any group has < 2 cells (the "std needs ≥ 2 cells" guard in
cellpy/collect/summary.py). That fallback is sensible, but the returned
Collection carries no flag telling the caller whether averaging actually happened.
In the app I have to sniff for a mean column to know how to label/plot the result:
def is_grouped(collection) -> bool:
return "mean" in collection.data.columns
Suggestion
Expose it explicitly, e.g. Collection.meta.grouped: bool (or Collection.is_grouped),
set by collect_summaries when it actually averages. Then apps can adapt the UI /
axis labels / spread option without inspecting columns.
Found while building cellpy-simple-gui on cellpy 2.1.0.post1. Full write-up with all items: CELLPY_PAINPOINTS.md.
Problem
collect_summaries(..., group_it=True)silently returns a wide, non-averagedframe when any group has < 2 cells (the "std needs ≥ 2 cells" guard in
cellpy/collect/summary.py). That fallback is sensible, but the returnedCollectioncarries no flag telling the caller whether averaging actually happened.In the app I have to sniff for a
meancolumn to know how to label/plot the result:Suggestion
Expose it explicitly, e.g.
Collection.meta.grouped: bool(orCollection.is_grouped),set by
collect_summarieswhen it actually averages. Then apps can adapt the UI /axis labels / spread option without inspecting columns.
Found while building cellpy-simple-gui on cellpy 2.1.0.post1. Full write-up with all items: CELLPY_PAINPOINTS.md.