Statistical Methods
Audit Coordinates Used to Extract Off-Grid Intensities
Define the task
Extracting values along a path or at landmarks requires coordinates in the input array's axis order. Decide whether positions are physical coordinates or zero-based array indices, and convert them explicitly. SciPy map_coordinates takes one coordinate component per input axis along the first coordinate-array dimension. Swapping row and column components can return plausible values from the wrong locations.
Carry out the check
Specify interpolation order, output type and boundary mode. Use floating-point output when fractional values matter; an integer output representation can hide interpolation detail. Test points exactly on samples, between samples and outside the array. A boundary fill value is a modeling convention, not an observed intensity. This workflow samples stated coordinates; it does not estimate landmarks or validate an image-registration method.
Worked hypothetical example
Hypothetical example: rows [0,10] and [20,30] form a 2×2 intensity array. With linear interpolation, the central coordinate (0.5,0.5) has value 15, the average of the four corners. At the exact coordinate (1,0), the value is 20. In constant mode with fill value −1, an out-of-domain point receives the specified boundary value rather than a new measurement. Save the coordinate list, conversion and interpolation settings with extracted results.
Method checked 23 November 2026 against Primary method documentation: map_coordinates.