You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
radial_profile: 'center' mode passes physical coordinates where pixel indices are expected #93
sigima.proc.image.radial_profile with center="center" passes the physical coordinates of the image center (ImageObj.xc, yc) to sigima.tools.image.get_radial_profile, which expects pixel indices (the centroid mode passes indices, and the x0/y0 parameters of the user mode are documented in pixels). The result is only correct for images with x0 = y0 = 0 and dx = dy = 1.
Reproduction (Gaussian peak at the center of an 11 × 11 image):
The X axis of the profile (distances) is also in pixels whatever the calibration, and non-uniform coordinates are not taken into account.
Found while auditing the 1.4 contract versions (#87): radial_profile is now at contract version 2 because xc/yc changed; this issue is about its pre-existing mix of physical and pixel coordinates.
Expected
The center mode uses the pixel indices of the center of the pixel grid (or the whole function works in physical coordinates, consistently for the three modes and for the X axis of the profile).
Scope extended (maintainer decision): instead of only fixing radial_profile centering, the whole image-profile family (line, segment, average, radial) now uses physical coordinates, consistently with ROIs and analysis results (physical since Sigima 1.0).
While doing so, further defects were found and fixed: vertical profiles carried the X axis unit, all profiles carried the image unit while their X axis was in pixels, and anti-diagonal segments were extracted along the other diagonal. The four contracts are bumped to version 2 (rule from #96).
Activity
PierreRaybaut commentedon Oct 25, 2026
Scope extended (maintainer decision): instead of only fixing
radial_profilecentering, the whole image-profile family (line, segment, average, radial) now uses physical coordinates, consistently with ROIs and analysis results (physical since Sigima 1.0).While doing so, further defects were found and fixed: vertical profiles carried the X axis unit, all profiles carried the image unit while their X axis was in pixels, and anti-diagonal segments were extracted along the other diagonal. The four contracts are bumped to version 2 (rule from #96).
PierreRaybaut commentedon Oct 25, 2026
Fixed by #98 (merged into develop).