Skip to content

Commit 6fde325

Browse files
committed
Enhance image statistics tool with delta values
- Add Δx, Δy, and Δz values to get_stats function output - Improve analysis capabilities by showing coordinate range differences - Maintain backward compatibility with existing statistics display
1 parent 6e10eba commit 6fde325

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
💥 New features / Enhancements:
66

7+
* Image statistics tool improvements:
8+
* Enhanced `get_stats` function to display delta (Δ) values for coordinate ranges
9+
* Now shows Δx, Δy, and Δz values alongside the min/max ranges for better analysis
710
* Added optional "Axes" tab control in Parameters dialog:
811
* New `show_axes_tab` option in `BasePlotOptions` and `PlotOptions` (default: `True`)
912
* When set to `False`, the "Axes" tab is hidden from item parameter dialogs

plotpy/tools/image.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,16 @@ def get_stats(
8888
[
8989
"%sx%s %s" % (item.data.shape[1], item.data.shape[0], str(item.data.dtype)),
9090
"",
91-
"%s ≤ x ≤ %s" % (p.xformat % x0, p.xformat % x1),
92-
"%s ≤ y ≤ %s" % (p.yformat % y0, p.yformat % y1),
93-
"%s ≤ z ≤ %s" % (p.zformat % data.min(), p.zformat % data.max()),
91+
"%s ≤ x ≤ %s (Δx = %s)"
92+
% (p.xformat % x0, p.xformat % x1, p.xformat % (x1 - x0)),
93+
"%s ≤ y ≤ %s (Δy = %s)"
94+
% (p.yformat % y0, p.yformat % y1, p.yformat % (y1 - y0)),
95+
"%s ≤ z ≤ %s (Δz = %s)"
96+
% (
97+
p.zformat % data.min(),
98+
p.zformat % data.max(),
99+
p.zformat % (data.max() - data.min()),
100+
),
94101
"‹z› = " + p.zformat % data.mean(),
95102
"σ(z) = " + p.zformat % data.std(),
96103
]

0 commit comments

Comments
 (0)