From befade35947a6e74ef94c4d5fb0841f8e3b0cabf Mon Sep 17 00:00:00 2001 From: Pierre Raybaut <1311787+PierreRaybaut@users.noreply.github.com> Date: Sat, 24 Oct 2026 14:15:13 +0200 Subject: [PATCH 1/2] build(sigima): pin Sigima 6c9255a (pixel-center convention, ROI masks and grids) Point the development snapshot at the Sigima 1.4 follow-up branch, which locates image pixels by their centers in ROIs, grids, image centers and exact transformations, keeps complex values in resampling, and selects circle and polygon ROI pixels by their centers. The radial profile "center" mode now gives the center of the pixel grid: 23.5 and 31.5 for a 48 x 64 image whose pixel centers go from 0 to 47 and 0 to 63, instead of 24 and 32 (half a pixel off). The test expectation is updated accordingly. Assisted-by: Claude Opus 5.5 --- sigima-dependency.json | 2 +- tests/python/test_processings.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sigima-dependency.json b/sigima-dependency.json index 6a898f0..f27713b 100644 --- a/sigima-dependency.json +++ b/sigima-dependency.json @@ -1,4 +1,4 @@ { "publishedRequirement": "sigima==1.3.0", - "developmentRef": null + "developmentRef": "6c9255ae81a3c188981cd90f335a732d13a1a97f" } diff --git a/tests/python/test_processings.py b/tests/python/test_processings.py index c96515c..283a95d 100644 --- a/tests/python/test_processings.py +++ b/tests/python/test_processings.py @@ -547,14 +547,17 @@ def test_radial_profile_callback_recomputes_centre(fresh_bootstrap): data[10:16, 4:10] = 1000.0 src = bs.add_image_from_array("img", data, width=48, height=64) # "center" mode resets x0/y0 to the geometric centre even from stale 0,0. + # Pixels are centred on their coordinates (0 to 47 along X, 0 to 63 along + # Y): the centre of the image lies halfway between its first and last pixel + # centres, so that a radial profile of a symmetric image is symmetric. centred = bs.resolve_feature_callbacks( "image:radial_profile", "center", {"center": "center", "x0": 0.0, "y0": 0.0}, src, ) - assert centred["x0"] == pytest.approx(24.0) - assert centred["y0"] == pytest.approx(32.0) + assert centred["x0"] == pytest.approx(23.5) + assert centred["y0"] == pytest.approx(31.5) # "centroid" mode computes the intensity centroid (near the blob). centroid = bs.resolve_feature_callbacks( "image:radial_profile", From 5527aef8822dfc3a547c745542e39a3d50b5dc86 Mon Sep 17 00:00:00 2001 From: Pierre Raybaut <1311787+PierreRaybaut@users.noreply.github.com> Date: Sat, 24 Oct 2026 14:15:17 +0200 Subject: [PATCH 2/2] docs: changelog entry for the Sigima 1.4 image coordinate rules Assisted-by: Claude Opus 5.5 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f3b8cb..eaea743 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) ### Changed - **Data locality:** the README now states precisely what stays local: processing never requires sending data anywhere, and the network services that can be enabled (AI assistant provider, capsule registry) are named. +- **Image regions of interest and coordinates:** image computations now follow Sigima 1.4 (development snapshot until its release). A region of interest selects the pixels whose centers lie inside its shape, boundary included: a rectangle whose bounds lie on pixel centers now includes one more row and column, and polygon vertices are no longer rounded to whole pixels. ROI grids are made of whole pixels, the center of an image (e.g. the default center of a radial profile) is the center of its pixel grid, and flips and rotations move regions of interest, annotations and analysis results with the pixels. Regions of interest saved earlier are not converted: they select pixels according to these rules when they are used again. ## [0.10.0] - 2026-10-20