spacr.qt.widgets.aggregation_rules¶
The aggregation chosen for every merged column, shown and overridable.
Merging four pathogens onto their cell means picking one number per column, and which number depends on what the column measures. The rules get that right most of the time – and a default that is right most of the time is a wrong answer nobody can find the rest of the time. So the whole plan is shown, with every row changeable.
Classes¶
One row per column: the rule, and a dropdown to change it. |
Module Contents¶
- class spacr.qt.widgets.aggregation_rules.AggregationRulesDialog(frame: pandas.DataFrame, parent=None, *, overrides: Mapping[str, str] | None = None)[source]¶
Bases:
PySide6.QtWidgets.QDialogOne row per column: the rule, and a dropdown to change it.
Only columns that were CHANGED become overrides. Recording every row would freeze today’s defaults into the settings, so a later improvement to the rules would never reach a user who had once opened this window.
- Parameters:
frame – the loaded table. Its COLUMNS are what the dialog offers a rule for, so a screen with nothing loaded offers nothing.
parent – parent widget.
overrides – the rules the user has already chosen, column to rule. Copied, and only the columns named here differ from the default the rules derive – which is the mechanism behind the paragraph above.
Build the per-measurement aggregation rules dialog.
- Parameters:
frame – the table whose measurements are listed.
parent – parent widget, or
None.overrides – rules the user has already changed, applied over the inferred plan.