Skip to content

Commit be8e9d2

Browse files
author
Oumou
committed
fix: crop PSF bead Z-MIPs to central 50% to reduce whitespace (upstream MontpellierRessourcesImagerie#23)
Display only the central half of the Z dimension in X and Y MIP projections for individual beads. The full Z range is kept for the Z-MIP (XY plane). This matches the upstream suggestion to retain the data while improving visual density.
1 parent 46ae4cc commit be8e9d2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

omero_metrics/dash_apps/dash_analyses/dash_psf_beads/dash_image_psf_beads.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,15 @@ def callback_mip(points, channel_index, color, invert, **kwargs):
369369

370370
bead_array = beads_array[bead_index, :, :, :, channel_index]
371371

372+
# Crop Z to central 50% to reduce whitespace (issue #23)
373+
nz = bead_array.shape[0]
374+
z_start = nz // 4
375+
z_end = 3 * nz // 4
376+
bead_array_cropped = bead_array[z_start:z_end, :, :]
377+
372378
mips = {
373-
"x": np.flipud(np.transpose(np.max(bead_array, axis=2))),
374-
"y": np.max(bead_array, axis=1),
379+
"x": np.flipud(np.transpose(np.max(bead_array_cropped, axis=2))),
380+
"y": np.max(bead_array_cropped, axis=1),
375381
"z": np.flipud(np.max(bead_array, axis=0)),
376382
}
377383
mips = {a: np.sqrt(mip) for a, mip in mips.items()}

0 commit comments

Comments
 (0)