Expand description
Statistics table widget ported from silx gui/plot/StatsWidget.py.
StatsWidget renders one row per tracked item and one column per
statistic (min / coords min / max / coords max / COM / mean / sum /
delta), mirroring silx DEFAULT_STATS (StatsWidget.py:1266-1276) extended
with the sum/delta aggregates exposed by crate::core::stats::Stats.
It carries an auto/manual update toggle (silx setUpdateMode,
StatsWidget.py:1258-1263) and a “use visible data range” toggle (silx
setStatsOnVisibleData, StatsWidget.py:1254) that selects between
StatScope::All and StatScope::OnLimits.
Numeric formatting uses format_stat, a pure port of silx
StatFormatter.format (statshandler.py:77-84: "{0:.3f}", "--" for
None). A pure significant-digits helper format_significant is also
provided for callers that prefer significant-figure rounding.
Structs§
- Stats
Widget - A scrollable statistics table over a set of named items.
Enums§
- Stats
Input - One tracked input row for the table.
- Update
Mode - How the table refreshes its computed values.
Functions§
- format_
significant - Pure significant-digits formatter: round
valuetodigitssignificant figures and render without trailing zeros, switching to exponential notation for very large/small magnitudes (mirrors C%g). - format_
stat - Port of silx
StatFormatter.formatwith the default"{0:.3f}"formatter (statshandler.py:71-84):None->"--", otherwise three fixed decimals.