Evidence · sdcflows
sdcflows’ PEPOLAR, direct and fieldmap-less estimation
The rest of what fMRIPrep runs, through sdcflows, to estimate the field that corrects susceptibility distortion: PEPOLAR pairs through FSL’s topup, direct field maps in Hz, the fieldmap-less estimation through ANTs’ SyN registration, the brain masks of magnitudes and EPIs, the niworkflows and nipype pieces under them, fMRIPrep’s own field-map steps, and sdcflows’ BIDS app. LARMORX’s port is a replica of sdcflows 2.17.1 and niworkflows 1.15.4, with the arithmetic of SciPy, scikit-image, numpy and nibabel, and pybids’ dataset index. In reproduce it gives the originals’ outputs bit for bit in each of the 57 cases of its six records. Its BIDS app writes sdcflows’ derivative files, byte for byte, on the eight datasets of sdcflows’ own runs, and its field-map stage, run as fMRIPrep ran it, gives fMRIPrep’s own derivatives. Its default, fix, corrects the originals’ defects or refuses them with a clear error, each with the original’s result on request.
- Ports
- replica
larmorxApache-2.0: crateslarmorx-sdcflowsandlarmorx-ndimage;lx.sdcflows,lx.niworkflows,lx.ndimage,lx.skimage,lx.bidsand larmorprepx's field-map stage, translated from sdcflows 2.17.1's estimation workflows (init_topup_wf,init_fmap_wf,init_syn_preprocessing_wf,init_syn_sdc_wf,init_unwarp_wf,init_fmap_preproc_wf, the 3dQwarp workflow's own steps), its masks, interfaces, estimator search and BIDS app, niworkflows 1.15.4's and nipype 1.12.0's pieces under them, fMRIPrep 25.2.6's own field-map steps and the SciPy 1.18.1, scikit-image 0.26.0 and numpy 2.5.4 routines they call
- replica
- Status
- replica validated (marked before the statuses' definition)
- Records
- standard comparison (sdcflows 2.17.1), with its full comparison and the BIDS app in the shared environment · SciPy, scikit-image and numpy (with its full comparison) · niworkflows' helpers · findings sdcflows-estimation, scipy-ndimage-filters · benchmark sdcflows-estimation
- Reference
sdcflows· API pages sdcflows-fieldmap, niworkflows-helpers, ndimage-filters, skimage, bids
What is compared
Echo-planar images are displaced along their phase-encoding axis wherever the main field is not uniform, by the local off-resonance frequency (in Hz) times the readout time. sdcflows (the NiPreps developers, Apache-2.0), the library fMRIPrep uses to estimate that field and correct the distortion, knows four kinds of estimator. The phase-difference field maps, the field-map model of B-splines and the unwarping are on their own page. This page holds the other three and what surrounds them:
- PEPOLAR: two or more EPIs with opposite phase encoding (
dir-APanddir-PA). sdcflows’init_topup_wfregrids their volumes onto one grid, merges them and gives them to FSL’s topup (itsb02b0settings), reorients the field and its coefficients back, averages the corrected reference (niworkflows’RobustAverage, AFNI’s 3dvolreg) and skull-strips it. Its other PEPOLAR workflow,init_3dQwarp_wf, is one sdcflows never chooses (its estimators run topup); its own Python steps are ported. - Direct field maps: the scanner’s map in Hz with its magnitude.
init_fmap_wfmerges them, skull-strips the magnitude (niworkflows’IntensityClip, ANTs’ N4, sdcflows’brain_masker) and fits the field by sdcflows’ B-splines. - Fieldmap-less (SyN): no field map at all. With
--use-syn-sdc, fMRIPrep registers the BOLD reference to the anatomical image brought into its space with ANTs’ SyN, the deformation restricted to the phase encoding and weighted by an atlas of where distortion occurs (init_syn_preprocessing_wf,init_syn_sdc_wf), and turns the displacements into a field. - Around them: the estimators found in a BIDS dataset (sdcflows’
wrangler, pybids’ dataset index:lx.bids, without its database),init_fmap_preproc_wfwith its derivatives and reports’ data sinks (niworkflows’DerivativesDataSink), the field map’s registration to the EPI andinit_unwarp_wf, fMRIPrep 25.2.6’s own field-map steps (the estimators it selects, the BOLD fit’s field-map nodes), and sdcflows’ BIDS app (sdcflows <bids> <out> participant).
The replica runs beside the originals, run in-process: sdcflows 2.17.1 with nipype 1.12.0, niworkflows, SciPy, scikit-image and numpy, and sdcflows’ BIDS app whole. fMRIPrep’s own graphs, files and command lines are those of its runs, with sdcflows 2.15.1 and niworkflows 1.15.2 in fMRIPrep 25.2.6’s image.
larmorx sdcflows sdcflows /data/bids /data/out participant --participant-label 01import larmorx as lx
# a PEPOLAR estimator: topup on an AP/PA pair, the field and its coefficients
est = lx.sdcflows.topup_workflow(
["sub-01_dir-AP_epi.nii.gz", "sub-01_dir-PA_epi.nii.gz"],
[{"PhaseEncodingDirection": "j-", "TotalReadoutTime": 0.05},
{"PhaseEncodingDirection": "j", "TotalReadoutTime": 0.05}],
out_dir="work", n_threads=8,
)
# the fieldmap-less estimation from syn_preprocessing_workflow's outputs
metadata = {"PhaseEncodingDirection": "j-", "TotalReadoutTime": 0.0315}
syn = lx.sdcflows.syn_sdc_workflow(
("boldref.nii.gz", metadata), "boldref_mask.nii.gz", "anat_in_epi.nii.gz",
"anat_mask_in_epi.nii.gz", "prior_in_epi.nii.gz", out_dir="work", n_threads=8,
)
# sdcflows' BIDS app, as on its command line
lx.sdcflows.run_app(["/data/bids", "/data/out", "participant", "--participant-label", "01"])The API pages describe every function and option. How to read what follows: how to read the evidence.
Its port
sdcflows, niworkflows, nipype, pybids, scikit-image, SciPy and numpy are permissive (Apache-2.0, MIT, BSD-3-Clause), so the replica is in larmorx itself. Their Python is the specification, with the arithmetic of the library releases they call.
- The workflows are plain Python functions, with no nipype and no graph engine. Each node writes its files into the folder nipype would give it (
out_dir/<workflow>/<node>), so a run can be compared with sdcflows’ file by file, and every command line is nipype’s. - The programs underneath run through LARMORX’s own replicas: FSL’s topup and PRELUDE (
lx.fsl), ANTs’ registration, N4, ImageMath and antsApplyTransforms (lx.ants), AFNI’s 3dvolreg (lx.afni.volreg). - The numeric routines run in Rust: SciPy’s ndimage filters, morphology, labels and watershed, scikit-image’s random walker and Otsu threshold (
larmorx-ndimage), numpy’s percentiles, sums and dot products in the order of the kernels numpy calls, and SciPy’s 4 × 4 inverse with its condition estimate (larmorx-transform). Every sum is in the original’s order, son_threadsnever changes a bit.
A clean room of these steps is planned after FreeSurfer (roadmap).
The verdicts at a glance
The replica is a translation of the originals’ source, so the question is whether it gives their bytes.
Select a segment to list its cases below.
The records run the originals in-process as the reference: sdcflows 2.17.1 with nipype 1.12.0, niworkflows, SciPy, scikit-image and numpy; sdcflows’ BIDS app whole; fMRIPrep 25.2.6’s own graphs, files and command lines of its runs. They run in two Python environments:
- the newest library releases (numpy 2.5.4 with OpenBLAS 0.3.34, SciPy 1.18.1), LARMORX’s reference;
- the releases the other comparisons share (numpy 2.3.5, SciPy 1.15.3).
They compare the replica with them in reproduce (upstream_defects="reproduce"): every array, file (decompressed), header, warning, message, command line and exit status, bit for bit. The 57 cases of the six records pass, with 1,753 checks. Each case is one of the comparison’s check scripts (or one of its sections) run as a process of its own, one check per line it prints.
The replica’s records against the originals: sdcflows 2.17.1, niworkflows 1.15.3 (1.15.4’s code on these paths), SciPy, scikit-image and numpy (every case passes)
| Record | Suite | Comparison | Environment | Cases | Pass | Checks | The originals' step: compared / changed |
|---|---|---|---|---|---|---|---|
| sdcflows-estimation | sdcflows-estimation | standard | newest | 19 | 19 | 609 | 6 / 0 |
| sdcflows-estimation-full | sdcflows-estimation | full | newest | 14 | 14 | 245 | – |
| sdcflows-estimation-app-shared | sdcflows-estimation | full | shared | 8 | 8 | 152 | – |
| ndimage-skimage | ndimage-skimage | standard | newest | 10 | 10 | 660 | 287 / 126 |
| ndimage-skimage-full | ndimage-skimage | full | newest | 1 | 1 | 19 | 8 / 1 |
| niworkflows-helpers | niworkflows-helpers | standard | newest | 5 | 5 | 68 | 2 / 0 |
Each record runs the investigation’s check scripts (some of their sections) as separate processes of the environment’s interpreter, from a clean commit: one check per summary line a script prints (its cases, all identical), its final line and its exit status. newest: numpy 2.5.4 (OpenBLAS 0.3.34), SciPy 1.18.1 (oracles/python-newest, LARMORX’s reference); shared: numpy 2.3.5 (OpenBLAS 0.3.30), SciPy 1.15.3 (the shared .venv). The full comparison holds the whole workflows and the BIDS app’s whole runs (minutes to an hour each). The originals’ step: each comparison of the library scripts with the originals’ outputs digested in both environments; every change has a known reason (the table below).
sdcflows’ BIDS app: PEPOLAR and a direct field map
sdcflows’ own command line runs its estimation on a BIDS dataset: it finds the estimators, runs each one’s workflow and writes its derivatives (the field in Hz, its coefficients, the reference and its brain mask, their sidecars). Both examples below run it whole, on two datasets of sdcflows’ own runs:
- sdcflows 2.17.1 at one thread, with the programs underneath through the cache of the original’s runs;
- the replica (
larmorx sdcflows sdcflows,lx.sdcflows.run_app) at one thread, with LARMORX’s own replicas underneath, and again at 14 threads infixand inreproduce.
fMRIPrep 25.2.6 ran the same estimators on the same data. Its own derivatives are compared with the replica’s field-map stage run as fMRIPrep ran it (sdcflows 2.15’s PEPOLAR wiring, its image’s numpy 2.2.6 and SciPy 1.15.2). sdcflows’ own run at four threads is the original’s own spread.
The input panels are the raw images. The outputs, chosen above the viewer, are the field map in Hz, the reference (the corrected EPI or the magnitude), the masker’s brain probability and the brain mask over the input. The viewer opens on the field map.
ds006736: a PEPOLAR pair through topup
Worked example
PEPOLAR: sdcflows' BIDS app on ds006736's AP/PA pair (TOPUP)
What this shows: In reproduce the replica’s BIDS app gives every value of sdcflows 2.17.1’s four outputs and every derivative file byte for byte, at 1 and 14 threads alike, with LARMORX’s replicas of the programs underneath. Run as fMRIPrep ran the stage, it holds fMRIPrep’s own derivatives within the original’s own variability: fMRIPrep’s N4 ran at 8 threads with glibc’s maths, the replica’s at one thread with correctly rounded maths. In fix, its default, it corrects AFNI-99, ANTS-40 and FSL-201.
- Replica against sdcflows 2.17.1Bit-identical
sdcflows’ BIDS app on ds006736 (a spin-echo PEPOLAR pair (one AP and one PA volume) at 3 T): the two EPIs’ first volumes regridded to one grid, merged and given to FSL’s topup (its b02b0 settings), the field and its coefficients reoriented back, the corrected reference averaged by niworkflows’ RobustAverage (AFNI’s 3dvolreg) and skull-stripped (IntensityClip, ANTs’ N4, sdcflows’ brain_masker). sdcflows 2.17.1 and the replica run the whole app; fMRIPrep 25.2.6’s own derivatives of the same data are compared with the replica’s field-map stage run as fMRIPrep ran it, and sdcflows’ own run at four threads is the original’s own spread.
- Data
- OpenNeuro ds006736, sub-004 (CC0-1.0): the field-map files of the dataset (with the derived sidecars of its view, RUN_INFO.txt); shown inside the brain masks of sdcflows and fMRIPrep, dilated by 2 voxels, so no face shows
- Command
sdcflows <bids> <out> participant --participant-label 004 --nprocs 1 --omp-nthreads 1 --no-fmapless; the replica:larmorx sdcflows sdcflowswith the same arguments (lx.sdcflows.run_app)- Coefficients
- the 74 × 64 × 58 coefficients (
desc-coeff): the replica’s equal sdcflows’ at one thread, at 14 threads too; those offix, the default, differ (its corrections, below); as fMRIPrep ran the stage, fMRIPrep’s own file, every value (TOPUP’s own coefficients on the field map’s grid, reoriented by TOPUPCoeffReorient) - Programs
- sdcflows 2.17.1 in its BIDS app (the newest environment), its programs through the cache of the original’s runs; the replica at commit
682ca1f16151; numpy’s OpenBLAS on its Haswell kernels, one thread - Time
- both apps at one thread 79 s (check_app.py, sdcflows’ programs from the cache of the original’s runs); the replica at 14 threads 55 s (informal: the benchmark below has the medians)
- Grid
- 74 × 64 × 58 × 1 voxels of 3.03 × 3.03 × 3 mm; shown: 54 × 64 × 57 around the brain
Data shown
- CS_fmri (OpenNeuro ds006736, version 1.0.0, doi:10.18112/openneuro.ds006736.v1.0.0), CC0 1.0 public-domain dedication.





Bit-identical274,688 of 274,688 voxels equal
Bit-identical274,688 of 274,688 voxels equal

Axial slice 29 of 57; the crosshair where the field is strongest in the slice; choose the output (the field map, the reference, its brain probability, the mask over the input) above the images. The interactive viewer needs JavaScript; the metrics below are complete without it.
Every comparison, computed in float64 over every voxel of the outputs
| Comparison (A − B), verdict and reason | Output | max |Δ| | Values that differ | RMS of Δ | max |Δ| ÷ range | 1 − NCC |
|---|---|---|---|---|---|---|
| The original against itself: the yardstick | ||||||
sdcflows: its own run at 4 threads − 1 threadreferenceFor reference, the original against itself: sdcflows’ own run of 2026-11-08 at four threads (--nprocs 4 --omp-nthreads 4; ANTs’ N4 then sums in another order) gives other values than at one thread: EPI reference (desc-epi): 8 of 274,688 values differ, at most 1 apart; Brain probability (the masker node): 235,162 of 274,688 values differ, at most 0.00102 apart. | Field map (Hz, `desc-preproc`) | 0 | 0 of 274,688 | 0 | 0 | 0 |
| EPI reference (`desc-epi`) | 1 | 8 of 274,688 (0.00291 %) | 0.0054 | 0.00392 | 2.18e−9 | |
| Brain probability (the masker node) | 0.00102 | 235,162 of 274,688 (85.6 %) | 4.96e−6 | 0.00102 | 1.19e−10 | |
| Brain mask (`desc-brain`) | 0 | 0 of 274,688 | 0 | 0 | 0 | |
fMRIPrep's output − sdcflows 2.17.1, 1 threadreferenceFor reference, the step between the originals’ versions: fMRIPrep 25.2.6 runs sdcflows 2.15.1’s PEPOLAR wiring with its image’s numpy 2.2.6 and SciPy 1.15.2 and N4 at 8 threads with glibc’s maths, sdcflows 2.17.1 here its own with the newest releases; the replica follows both (its rows against the original and against fMRIPrep’s output): Field map (Hz, desc-preproc): 274,687 of 274,688 values differ, at most 145 apart; EPI reference (desc-epi): 130,359 of 274,688 values differ, at most 187 apart; Brain probability (the masker node): 246,881 of 274,688 values differ, at most 0.168 apart; Brain mask (desc-brain): 467 of 274,688 values differ, at most 1 apart. | Field map (Hz, `desc-preproc`) | 145 | 274,687 of 274,688 (100 %) | 7.43 | 0.31 | 0.0251 |
| EPI reference (`desc-epi`) | 187 | 130,359 of 274,688 (47.5 %) | 9.59 | 0.733 | 0.00654 | |
| Brain probability (the masker node) | 0.168 | 246,881 of 274,688 (89.9 %) | 0.00828 | 0.169 | 0.000319 | |
| Brain mask (`desc-brain`) | 1 | 467 of 274,688 (0.17 %) | 0.0412 | 1 | 0.00476 | |
| The replica against the original | ||||||
| replica − sdcflows 2.17.1 (both one thread)Bit-identicalEvery value of the four outputs is sdcflows’ (and every derivative file, byte for byte: the cache entry’s check_app.py run), with LARMORX’s replicas underneath: FSL’s topup, AFNI’s 3dvolreg (niworkflows’ RobustAverage), ANTs’ N4, sdcflows’ masks and the TOPUP coefficients’ reorientation. | every output | identical: 0 of 274,688 values differ | ||||
| The replica against fMRIPrep's output | ||||||
replica as fMRIPrep ran the stage − fMRIPrep's outputWithin the original's own variabilityWithin the original’s own variability: fMRIPrep’s N4 node ran at 8 threads with glibc’s exp and log, the replica’s at one thread with correctly rounded maths (as ANTs’ at one thread); ANTs 2.6.5 at the node’s 8 threads with glibc gives fMRIPrep’s N4 output, at one thread with correctly rounded maths the replica’s (the cache entry’s check_fmap_stage.py --sections fmriprep: every derivative identical, its data identical with only FSL’s build string in descrip, or after such an N4 node: 1 file of this run); the reference, its brain probability and mask follow from N4’s output: EPI reference (desc-epi): 302 of 274,688 values differ, at most 1 apart; Brain probability (the masker node): 245,722 of 274,688 values differ, at most 0.00755 apart. | Field map (Hz, `desc-preproc`) | 0 | 0 of 274,688 | 0 | 0 | 0 |
| EPI reference (`desc-epi`) | 1 | 302 of 274,688 (0.11 %) | 0.0332 | 0.00392 | 7.94e−8 | |
| Brain probability (the masker node) | 0.00755 | 245,722 of 274,688 (89.5 %) | 2.53e−5 | 0.00758 | 3.07e−9 | |
| Brain mask (`desc-brain`) | 0 | 0 of 274,688 | 0 | 0 | 0 | |
| The replica against itself: thread counts, fix and reproduce | ||||||
| replica, reproduce: 14 threads − 1 threadBit-identicalThe same bytes at 1 and 14 threads (every sum in sdcflows’ order, whatever the thread count). | every output | identical: 0 of 274,688 values differ | ||||
replica at 14 threads: fix − reproduceDeliberate correctionThe default, fix, corrects AFNI-99 (3dvolreg: -maxdisp and -savedisp convert the matrix to the dataset’s axes with their signs but leave the voxel positions unsigned: for an axis stored L2R, P2A or S2I the…); ANTS-40 (N4BiasFieldCorrection: the voxels N4 uses whose value is 0 or negative stay in its log image as they are (0, the log of an intensity of 1), inside the histogram it sharp…); FSL-201 (topup: with --estmov=1, the derivatives of the predicted volumes with respect to the rotations are forward differences (a step of 1e-5 rad) of rotation matrices built wi…) and names them: Field map (Hz, desc-preproc): 274,679 of 274,688 values differ, at most 0.692 apart; EPI reference (desc-epi): 106,176 of 274,688 values differ, at most 102 apart; Brain probability (the masker node): 246,692 of 274,688 values differ, at most 0.137 apart; Brain mask (desc-brain): 203 of 274,688 values differ, at most 1 apart. | Field map (Hz, `desc-preproc`) | 0.692 | 274,679 of 274,688 (100 %) | 0.0274 | 0.00148 | 3.13e−7 |
| EPI reference (`desc-epi`) | 102 | 106,176 of 274,688 (38.7 %) | 3.91 | 0.4 | 0.00111 | |
| Brain probability (the masker node) | 0.137 | 246,692 of 274,688 (89.8 %) | 0.00332 | 0.138 | 4.91e−5 | |
| Brain mask (`desc-brain`) | 1 | 203 of 274,688 (0.0739 %) | 0.0272 | 1 | 0.00206 | |
Δ is A − B over all 274,688 voxels of each output file, not only those shown (the field map’s one volume as its 3-D image). The records’ threshold: in reproduce, every output bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too.
Provenance of this example
- Data: OpenNeuro ds006736, sub-004, CC0-1.0
- Inputs: sdcflows’ run (sha256 a5f693f657d2fde0…); fMRIPrep’s run (sha256 e93ba36904104fc7…)
- Runs: figures cache entry
sdcflows-estimation/app-ds006736, computed 2026-11-09T22:39:58+00:00 with larmorx682ca1f16151; sdcflows 2.17.1, niworkflows 1.15.3, nipype 1.12.0, scikit-image 0.26.0, nibabel 5.4.2, numpy 2.5.4 (OpenBLAS 0.3.34), SciPy 1.18.1 (oracles/python-newest: larmorx’s reference); FSL 6.0.7.23’s topup, ANTs 2.6.5’s N4BiasFieldCorrection (the GCC 14.3 build; one thread, correctly rounded maths), AFNI 26.3.05’s 3dvolreg, through the cache of the original’s runs; LARMORX’s replicas and ports; every command, its environment, threads and exit status are in itsRUN_INFO.json - sdcflows-estimation/stage-fmriprep (LARMORX’s stage as fMRIPrep ran it)
Every number above is in sdcflows-estimation.json, exported by python -m larmorx_validation evidence sdcflows-estimation.
ds005752: a direct field map in Hz
Worked example
A direct field map: sdcflows' BIDS app on ds005752's field map in Hz
What this shows: In reproduce the replica’s BIDS app gives every value of sdcflows 2.17.1’s four outputs and every derivative file byte for byte, at 1 and 14 threads alike, with LARMORX’s replicas of the programs underneath. Run as fMRIPrep ran the stage, it holds fMRIPrep’s own derivatives within the original’s own variability: fMRIPrep’s N4 ran at 8 threads with glibc’s maths, the replica’s at one thread with correctly rounded maths. In fix, its default, it corrects ANTS-40.
- Replica against sdcflows 2.17.1Bit-identical
sdcflows’ BIDS app on ds005752 (a direct field map in Hz with its magnitude (Siemens, 3 T)): the field map in Hz merged, the magnitude skull-stripped (IntensityClip, ANTs’ N4, sdcflows’ brain_masker), the field map’s cubic B-spline fit inside the mask. sdcflows 2.17.1 and the replica run the whole app; fMRIPrep 25.2.6’s own derivatives of the same data are compared with the replica’s field-map stage run as fMRIPrep ran it, and sdcflows’ own run at four threads is the original’s own spread.
- Data
- OpenNeuro ds005752, sub-ON01016 (CC0-1.0): the field-map files of the dataset (with the derived sidecars of its view, RUN_INFO.txt); shown inside the brain masks of sdcflows and fMRIPrep, dilated by 2 voxels, so no face shows
- Command
sdcflows <bids> <out> participant --participant-label ON01016 --nprocs 1 --omp-nthreads 1 --no-fmapless; the replica:larmorx sdcflows sdcflowswith the same arguments (lx.sdcflows.run_app)- Coefficients
- the 16 × 16 × 18 coefficients (
desc-coeff): the replica’s equal sdcflows’ at one thread, at 14 threads too; those offix, the default, differ (its corrections, below); as fMRIPrep ran the stage, fMRIPrep’s own file, every value (the B-spline fit’s, 16 × 16 × 10 mm apart) - Programs
- sdcflows 2.17.1 in its BIDS app (the newest environment), its programs through the cache of the original’s runs; the replica at commit
682ca1f16151; numpy’s OpenBLAS on its Haswell kernels, one thread - Time
- both apps at one thread 28 s (check_app.py, sdcflows’ programs from the cache of the original’s runs); the replica at 14 threads 1 s (informal: the benchmark below has the medians)
- Grid
- 64 × 64 × 48 × 1 voxels of 3.44 × 3.44 × 3.4 mm; shown: 48 × 56 × 48 around the brain
Data shown
- NIMH Healthy Research Volunteer Dataset (OpenNeuro ds005752, version 2.1.0, doi:10.18112/openneuro.ds005752.v2.1.0), CC0 1.0 public-domain dedication.




Bit-identical196,608 of 196,608 voxels equal
Bit-identical196,608 of 196,608 voxels equal
Bit-identical196,608 of 196,608 voxels equal

Axial slice 21 of 48; the crosshair where the field is strongest in the slice; choose the output (the field map, the reference, its brain probability, the mask over the input) above the images. The interactive viewer needs JavaScript; the metrics below are complete without it.
Every comparison, computed in float64 over every voxel of the outputs
| Comparison (A − B), verdict and reason | Output | max |Δ| | Values that differ | RMS of Δ | max |Δ| ÷ range | 1 − NCC |
|---|---|---|---|---|---|---|
| The original against itself: the yardstick | ||||||
sdcflows: its own run at 4 threads − 1 threadreferenceFor reference, the original against itself: sdcflows’ own run of 2026-11-08 at four threads (--nprocs 4 --omp-nthreads 4; ANTs’ N4 then sums in another order) gives other values than at one thread: Magnitude (desc-magnitude): 198 of 196,608 values differ, at most 1 apart; Brain probability (the masker node): 179,346 of 196,608 values differ, at most 0.00163 apart. | Field map (Hz, `desc-preproc`) | 0 | 0 of 196,608 | 0 | 0 | 0 |
| Magnitude (`desc-magnitude`) | 1 | 198 of 196,608 (0.101 %) | 0.0317 | 0.00392 | 6.05e−8 | |
| Brain probability (the masker node) | 0.00163 | 179,346 of 196,608 (91.2 %) | 1.25e−5 | 0.00163 | 8.13e−10 | |
| Brain mask (`desc-brain`) | 0 | 0 of 196,608 | 0 | 0 | 0 | |
fMRIPrep's output − sdcflows 2.17.1, 1 threadreferenceFor reference, the step between the originals’ versions: fMRIPrep 25.2.6 runs sdcflows 2.15.1 with its image’s numpy 2.2.6 and SciPy 1.15.2 and N4 at 8 threads with glibc’s maths, sdcflows 2.17.1 here its own with the newest releases; the replica follows both (its rows against the original and against fMRIPrep’s output): Magnitude (desc-magnitude): 281 of 196,608 values differ, at most 3 apart; Brain probability (the masker node): 179,850 of 196,608 values differ, at most 0.00381 apart. | Field map (Hz, `desc-preproc`) | 0 | 0 of 196,608 | 0 | 0 | 0 |
| Magnitude (`desc-magnitude`) | 3 | 281 of 196,608 (0.143 %) | 0.0507 | 0.0118 | 1.55e−7 | |
| Brain probability (the masker node) | 0.00381 | 179,850 of 196,608 (91.5 %) | 2.62e−5 | 0.00383 | 3.56e−9 | |
| Brain mask (`desc-brain`) | 0 | 0 of 196,608 | 0 | 0 | 0 | |
| The replica against the original | ||||||
| replica − sdcflows 2.17.1 (both one thread)Bit-identicalEvery value of the four outputs is sdcflows’ (and every derivative file, byte for byte: the cache entry’s check_app.py run), with LARMORX’s replicas underneath: ANTs’ N4, sdcflows’ masks and the B-spline fit of the field map in Hz. | every output | identical: 0 of 196,608 values differ | ||||
| The replica against fMRIPrep's output | ||||||
replica as fMRIPrep ran the stage − fMRIPrep's outputWithin the original's own variabilityWithin the original’s own variability: fMRIPrep’s N4 node ran at 8 threads with glibc’s exp and log, the replica’s at one thread with correctly rounded maths (as ANTs’ at one thread); ANTs 2.6.5 at the node’s 8 threads with glibc gives fMRIPrep’s N4 output, at one thread with correctly rounded maths the replica’s (the cache entry’s check_fmap_stage.py --sections fmriprep: every derivative identical, its data identical with only FSL’s build string in descrip, or after such an N4 node: 1 file of this run); the reference, its brain probability and mask follow from N4’s output: Magnitude (desc-magnitude): 197 of 196,608 values differ, at most 1 apart; Brain probability (the masker node): 179,402 of 196,608 values differ, at most 0.00163 apart. | Field map (Hz, `desc-preproc`) | 0 | 0 of 196,608 | 0 | 0 | 0 |
| Magnitude (`desc-magnitude`) | 1 | 197 of 196,608 (0.1 %) | 0.0317 | 0.00392 | 6.02e−8 | |
| Brain probability (the masker node) | 0.00163 | 179,402 of 196,608 (91.2 %) | 1.25e−5 | 0.00163 | 8.14e−10 | |
| Brain mask (`desc-brain`) | 0 | 0 of 196,608 | 0 | 0 | 0 | |
| The replica against itself: thread counts, fix and reproduce | ||||||
| replica, reproduce: 14 threads − 1 threadBit-identicalThe same bytes at 1 and 14 threads (every sum in sdcflows’ order, whatever the thread count). | every output | identical: 0 of 196,608 values differ | ||||
replica at 14 threads: fix − reproduceDeliberate correctionThe default, fix, corrects ANTS-40 (N4BiasFieldCorrection: the voxels N4 uses whose value is 0 or negative stay in its log image as they are (0, the log of an intensity of 1), inside the histogram it sharp…) and names it: Field map (Hz, desc-preproc): 196,608 of 196,608 values differ, at most 31.1 apart; Magnitude (desc-magnitude): 72,470 of 196,608 values differ, at most 113 apart; Brain probability (the masker node): 180,531 of 196,608 values differ, at most 0.411 apart; Brain mask (desc-brain): 852 of 196,608 values differ, at most 1 apart. | Field map (Hz, `desc-preproc`) | 31.1 | 196,608 of 196,608 (100 %) | 1.54 | 0.0796 | 0.00221 |
| Magnitude (`desc-magnitude`) | 113 | 72,470 of 196,608 (36.9 %) | 6.96 | 0.443 | 0.00283 | |
| Brain probability (the masker node) | 0.411 | 180,531 of 196,608 (91.8 %) | 0.0113 | 0.413 | 0.000639 | |
| Brain mask (`desc-brain`) | 1 | 852 of 196,608 (0.433 %) | 0.0658 | 1 | 0.012 | |
Δ is A − B over all 196,608 voxels of each output file, not only those shown (the field map’s one volume as its 3-D image). The records’ threshold: in reproduce, every output bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too.
Provenance of this example
- Data: OpenNeuro ds005752, sub-ON01016, CC0-1.0
- Inputs: sdcflows’ run (sha256 1ef89e3f97510323…); fMRIPrep’s run (sha256 63a53c3ec9e1f10a…)
- Runs: figures cache entry
sdcflows-estimation/app-ds005752, computed 2026-11-09T22:36:50+00:00 with larmorx682ca1f16151; sdcflows 2.17.1, niworkflows 1.15.3, nipype 1.12.0, scikit-image 0.26.0, nibabel 5.4.2, numpy 2.5.4 (OpenBLAS 0.3.34), SciPy 1.18.1 (oracles/python-newest: larmorx’s reference); FSL 6.0.7.23’s topup, ANTs 2.6.5’s N4BiasFieldCorrection (the GCC 14.3 build; one thread, correctly rounded maths), AFNI 26.3.05’s 3dvolreg, through the cache of the original’s runs; LARMORX’s replicas and ports; every command, its environment, threads and exit status are in itsRUN_INFO.json - sdcflows-estimation/stage-fmriprep (LARMORX’s stage as fMRIPrep ran it)
Every number above is in sdcflows-estimation.json, exported by python -m larmorx_validation evidence sdcflows-estimation.
The app on the eight datasets of sdcflows’ own runs
The records’ cases run the app whole on every dataset of sdcflows’ own runs (2026-11-08): a direct field map, phase differences (two at 1.5 T; one at 7 T, named by its B0FieldIdentifier; Philips’ with two PEPOLAR estimators beside it), PEPOLAR pairs and multiband series. Every derivative file is sdcflows’, byte for byte, with the newest releases and with the shared ones; the times are the benchmark’s.
sdcflows’ BIDS app whole on the eight datasets of its own runs, the replica against the original: sdcflows 2.17.1
| sdcflows' run | Estimators | Checks, newest | Checks, shared | sdcflows (s) | replica (s) |
|---|---|---|---|---|---|
ds005752-sub-ON01016-direct | a direct field map | 19/19 | 19/19 | 21 | 4 |
ds001600-sub-1 | three phase-difference field maps, two of them from two phases, and a PEPOLAR pair | 19/19 | 19/19 | – | – |
ds002422-sub-02 | two phase differences at 1.5 T | 19/19 | 19/19 | 27 | 7 |
ds002603-sub-01 | Philips: a phase difference with one magnitude and two PEPOLAR estimators each pairing an EPI with a BOLD run | 19/19 | 19/19 | – | – |
ds004958-sub-fsm64ps-pepolar | a phase difference and a PEPOLAR pair, multiband-8 | 19/19 | 19/19 | – | – |
ds005040-sub-002 | a PEPOLAR pair | 19/19 | 19/19 | 103 | 87 |
ds005454-sub-16 | a phase difference named by its B0FieldIdentifier, multiband | 19/19 | 19/19 | 50 | 23 |
ds006736-sub-004 | a PEPOLAR pair | 19/19 | 19/19 | 79 | 56 |
The records’ cases app-run-* (check_app.py --sections run): sdcflows 2.17.1’s own BIDS app and the replica’s (larmorx sdcflows sdcflows, reproduce) at one thread on the datasets of sdcflows’ own runs, with --no-fmapless: the exit statuses, the command-line logger’s lines, the list of derivative files and every file byte for byte (NIfTI decompressed, the JSON sidecars), the logs folder and the settings file, in both environments. The times: the benchmark (docs/benchmarks/sdcflows-estimation.md; the originals’ programs run fresh, the replica at one thread), where measured.
fMRIPrep’s own field-map derivatives
larmorprepx’s field-map stage (estimate_fieldmaps), run with fMRIPrep 25.2.6’s options on five of its runs, gives fMRIPrep’s own derivatives. Of their 36 NIfTI files:
- 13 are identical;
- 13 hold identical data with only FSL’s build string in the header’s
descrip(fMRIPrep’s image runs FSL 2501.4, LARMORX’s replicas FSL 6.0.7.23); - 10 follow an N4 node that ANTs reproduces at the node’s 8 threads with glibc’s maths (fMRIPrep’s file) and at one thread with correctly rounded maths (the replica’s).
fMRIPrep’s field-map derivatives, the replica’s stage run as fMRIPrep ran it against fMRIPrep’s output
| fMRIPrep's run | NIfTI files | identical | data identical, FSL's build string in descrip | after an N4 node | the replica's stage |
|---|---|---|---|---|---|
| every run | 36 | 13 | 13 | 10 | – |
ds005752-sub-ON01016-noreconall-direct | 4 | 3 | 0 | 1 | 1 s |
ds001600-sub-1-noreconall | 16 | 6 | 6 | 4 | 79 s |
ds005040-sub-002-noreconall | 4 | 0 | 2 | 2 | 32 s |
ds002422-sub-02-noreconall | 8 | 4 | 2 | 2 | 2 s |
ds006736-sub-004-noreconall | 4 | 0 | 3 | 1 | 52 s |
The cache entry stage-fmriprep (check_fmap_stage.py --sections fmriprep, ALL OK): larmorprepx’s estimate_fieldmaps with fMRIPrep 25.2.6’s options, sdcflows 2.15’s PEPOLAR wiring, its image’s numpy 2.2.6 and SciPy 1.15.2, LAPACK 3.12.0 in the data sinks and the replicas, against the run’s own derivatives in out/. A file is identical (data and header, decompressed), or its data are and its header differs only by FSL’s build string in descrip (fMRIPrep’s image’s FSL 2501.4, the replicas’ FSL 6.0.7.23 2601.0: PRELUDE’s and TOPUP’s outputs and what copies their headers), or it follows an N4 node that ANTs 2.6.5 reproduces at the node’s 8 threads with glibc’s maths (fMRIPrep’s file) and at one thread with correctly rounded maths (the replica’s): at most one stored value apart in a few hundred voxels (the magnitude and EPI references, and once a brain mask by 3 voxels). Every difference is explained; the field maps and the coefficients are fMRIPrep’s in every run.
The fieldmap-less (SyN) estimation
With --use-syn-sdc and no field map, fMRIPrep 25.2.6 estimates the field from the BOLD reference and the anatomy:
- sdcflows’
init_syn_preprocessing_wfbrings the anatomical image, its brain mask and an atlas of where distortion occurs into the EPI’s space; init_syn_sdc_wfregisters the clipped BOLD reference to that anatomy with ANTs’ SyN (two Mattes metrics on each side, the image and its normalised Laplacian; the deformation restricted to the phase-encoding axis);- it turns the displacements along that axis into Hz, resamples them onto the EPI’s grid, fits sdcflows’ B-splines and unwarps the reference.
The records check every node of fMRIPrep’s five SyN estimators (three fMRIPrep runs) on its own inputs, and sdcflows’ own graphs run by nipype, file by file (105 of 105 files of the preprocessing, 19 of 19 of the estimation), with ANTs at one thread.
The replica’s registration computes ANTs’ one-thread result at any thread count, with correctly rounded maths. On fMRIPrep’s own inputs and seed for ds000228’s estimator (a child of 3.5 years), its warp is ANTs 2.6.5’s at one thread with CORE-MATH’s functions preloaded, byte for byte, and so is every output after it.
fMRIPrep ran the registration at four threads with glibc’s maths, and ANTs’ result depends on both. Its Mattes metrics sum their joint histograms per work unit, so at four threads the field moves by up to 1.70 Hz from the one-thread run’s, and there ANTs 2.6.5 does not even repeat itself (two runs of fMRIPrep’s command, up to 0.70 Hz apart). glibc’s maths moves it by up to 0.016 Hz at one thread. fMRIPrep’s own field lies at most 1.80 Hz from the replica’s, within ANTs 2.6.5’s own band for this call (up to 1.82 Hz between two of its runs with glibc’s maths), in a field of −25.6 to 40.8 Hz inside the brain.
The replica’s default, fix, corrects ITK-31 here (the first SyN stage has a fixed mask only, and ITK keeps a stale mask for the role without one), which moves the field by up to 0.82 Hz. The example places fMRIPrep’s own field against ANTs’ own band for this call: ANTs 2.6.5 ran fMRIPrep’s command at one thread with each maths and twice at four threads with glibc’s, each warp followed by sdcflows’ steps.
Worked example
Fieldmap-less (SyN): sdcflows' syn_sdc_workflow on fMRIPrep's ds000228 estimator
What this shows: In reproduce the replica gives every value of ANTs 2.6.5’s registration at one thread with correctly rounded maths, followed by sdcflows’ steps, at 14 threads: its warp is ANTs’ byte for byte (29,895,327 values). fMRIPrep’s own field, made by its image’s ANTs 2.6.2.dev1 at four threads with glibc’s maths, lies within ANTs’ own spread on this call: ANTs’ runs differ from each other by up to 1.82 Hz, and fMRIPrep’s field is at most 1.8 Hz from the replica’s. In fix, its default, the replica corrects ITK-31.
- Replica against ANTs antsRegistration 2.6.5, correctly rounded mathsBit-identical
sdcflows’ fieldmap-less estimation (init_syn_sdc_wf, fMRIPrep’s --use-syn-sdc) on the inputs fMRIPrep 25.2.6 gave it for ds000228’s BOLD reference (a child of 3.5 years; the EPI 20.7° oblique): the reference clipped and registered with ANTs’ SyN to the anatomical reference brought into its space (two Mattes metrics each, the image and its normalised Laplacian; the deformation restricted to the phase encoding), the displacements turned into Hz, fitted by sdcflows’ B-splines and applied to the reference. The replica runs the whole workflow; ANTs 2.6.5 runs fMRIPrep’s own registration command at one thread with correctly rounded maths (LARMORX’s reference), and with glibc’s maths at one thread and twice at four (the original’s own band), each followed by sdcflows’ steps; fMRIPrep’s own field is placed against that band.
- Data
- OpenNeuro ds000228, sub-pixar008 (CC0-1.0): the BOLD reference and the anatomical reference in its space, as fMRIPrep’s workflow was given them; shown inside the EPI’s brain masks (fMRIPrep’s and the anatomical one resampled), dilated by 2 voxels, so no face shows
- Node
- fMRIPrep 25.2.6,
fmriprep_25_2_wf/sub_pixar008_wf/fmap_preproc_wf/wf_auto_00000(--use-syn-sdc) - Warp
- The replica’s registration against ANTs 2.6.5 at one thread with correctly rounded maths: byte for byte (29,895,327 values); glibc’s maths at one thread: 12,788,936 of 29,895,327 values differ, at most 7.41e-08 mm apart (99th percentile 4.21e-10 mm); four threads against one: 29,062,160 of 29,895,327 values differ, at most 0.835 mm apart (99th percentile 0.0262 mm); four threads, run to run: 29,061,772 of 29,895,327 values differ, at most 0.659 mm apart (99th percentile 0.00445 mm); fMRIPrep’s own warp against the replica’s: 29,062,161 of 29,895,327 values differ, at most 0.813 mm apart (99th percentile 0.0277 mm)
- Coefficients
- the 14 × 14 × 13 coefficients: the replica’s equal ANTs’ one-thread run’s; sdcflows’ steps on fMRIPrep’s own warp give fMRIPrep’s own coefficients, field and corrected reference, every value
- Programs
- ANTs 2.6.5’s antsRegistration (the GCC 14.3 build) through the cache of the original’s runs, the four-thread runs never cached; sdcflows’ steps after it by the replica (= sdcflows’ nodes on these inputs, the records’
syn-sdccase); the replica at commitf786069d2750, fMRIPrep’s image’s numpy 2.2.6 for the clip - Time
- The replica’s whole workflow 681 s at 14 threads; ANTs’ registration 1808 s and 1802 s at one thread, 946 s and 944 s at four (the six runs side by side; informal)
- Grid
- 64 × 64 × 32 voxels of 3 × 3 × 3.3 mm; shown: 53 × 62 × 32 around the brain
Data shown
- Children and adults watching a short film (OpenNeuro ds000228, version 1.1.1, doi:10.18112/openneuro.ds000228.v1.1.1), CC0 1.0 public-domain dedication.






Bit-identical131,072 of 131,072 voxels equal

Axial slice 13 of 32; the axial slice with the most brain, the crosshair where fMRIPrep's field differs most from the replica's in it; choose the output (the field map, the corrected reference) above the images. The interactive viewer needs JavaScript; the metrics below are complete without it.
Every comparison, computed in float64 over every voxel of the outputs
| Comparison (A − B), verdict and reason | Output | max |Δ| | Values that differ | RMS of Δ | max |Δ| ÷ range | 1 − NCC |
|---|---|---|---|---|---|---|
| The original against itself: the yardstick | ||||||
ANTs antsRegistration 2.6.5 at one thread: glibc's maths − correctly roundedreferenceFor reference, the original against itself: glibc’s exp and log are not always correctly rounded, and the registration’s iterations grow those last bits (its warp: 12,788,936 of 29,895,327 values differ, at most 7.41e-08 mm apart (99th percentile 4.21e-10 mm)): Field map (Hz, the unwarp node’s _field): 131,067 of 131,072 values differ, at most 0.0159 apart; Corrected EPI reference (_sdc): 74,904 of 131,072 values differ, at most 4 apart. | Field map (Hz, the unwarp node's `_field`) | 0.0159 | 131,067 of 131,072 (100 %) | 0.00208 | 0.000231 | 8.8e−8 |
| Corrected EPI reference (`_sdc`) | 4 | 74,904 of 131,072 (57.1 %) | 0.0144 | 0.0142 | 1.28e−8 | |
ANTs antsRegistration 2.6.5 with glibc's maths: 4 threads − 1 threadreferenceFor reference, the original against itself: at four threads the Mattes metrics sum their joint histograms per work unit, in another order (its warp: 29,062,160 of 29,895,327 values differ, at most 0.835 mm apart (99th percentile 0.0262 mm)): Field map (Hz, the unwarp node’s _field): 131,072 of 131,072 values differ, at most 1.7 apart; Corrected EPI reference (_sdc): 74,965 of 131,072 values differ, at most 17 apart. | Field map (Hz, the unwarp node's `_field`) | 1.7 | 131,072 of 131,072 (100 %) | 0.131 | 0.0248 | 0.000337 |
| Corrected EPI reference (`_sdc`) | 17 | 74,965 of 131,072 (57.2 %) | 0.2 | 0.0605 | 2.44e−6 | |
ANTs antsRegistration 2.6.5, 4 threads, glibc's maths: the second run − the firstreferenceFor reference, the original against itself: ANTs at four threads does not repeat itself: above one thread its metrics’ sums per work unit change from run to run (docs/findings/ants-registration.md; its warp: 29,061,772 of 29,895,327 values differ, at most 0.659 mm apart (99th percentile 0.00445 mm)): Field map (Hz, the unwarp node’s _field): 131,072 of 131,072 values differ, at most 0.701 apart; Corrected EPI reference (_sdc): 74,932 of 131,072 values differ, at most 4 apart. | Field map (Hz, the unwarp node's `_field`) | 0.701 | 131,072 of 131,072 (100 %) | 0.0279 | 0.0103 | 1.3e−5 |
| Corrected EPI reference (`_sdc`) | 4 | 74,932 of 131,072 (57.2 %) | 0.0549 | 0.0142 | 1.83e−7 | |
fMRIPrep's output (ANTs 2.6.2.dev1) − ANTs antsRegistration 2.6.5, both at 4 threads with glibc's mathsreferenceFor reference, the originals against each other: fMRIPrep’s image holds ANTs 2.6.2.dev1 (its own build) where the repository’s build is ANTs 2.6.5, made with GCC 14.3; both at four threads with glibc’s maths (its warp: 29,062,155 of 29,895,327 values differ, at most 0.833 mm apart (99th percentile 0.00492 mm)): Field map (Hz, the unwarp node’s _field): 131,071 of 131,072 values differ, at most 0.697 apart; Corrected EPI reference (_sdc): 74,934 of 131,072 values differ, at most 11 apart. | Field map (Hz, the unwarp node's `_field`) | 0.697 | 131,071 of 131,072 (100 %) | 0.0305 | 0.0102 | 1.87e−5 |
| Corrected EPI reference (`_sdc`) | 11 | 74,934 of 131,072 (57.2 %) | 0.0636 | 0.0391 | 2.48e−7 | |
| The replica against the original | ||||||
| replica (14 threads) − ANTs antsRegistration 2.6.5, 1 thread, correctly rounded mathsBit-identicalEvery value of both outputs is ANTs 2.6.5’s at one thread with correctly rounded maths followed by sdcflows’ steps (the field in Hz from the displacements, its B-spline resampling onto the EPI grid, the B-spline fit 16 × 16 × 10 mm apart, the unwarping): the replica’s warp is ANTs’ byte for byte (29,895,327 values), at 14 threads (its registration computes ANTs’ one-thread sums whatever the thread count). | both outputs | identical: 0 of 131,072 values differ | ||||
| The replica against fMRIPrep's output | ||||||
replica − fMRIPrep's outputWithin the original's own variabilityfMRIPrep’s registration ran its image’s ANTs 2.6.2.dev1 at four threads with glibc’s maths, the replica’s gives ANTs 2.6.5’s one-thread result with correctly rounded maths (its row against the original); sdcflows’ steps after the registration give fMRIPrep’s own files from fMRIPrep’s own warp, every value (the cache entry’s fmriprep run), so the difference is the registration’s alone. ANTs 2.6.5’s own runs of this call with glibc’s maths, as fMRIPrep’s image runs ANTs, differ from each other by up to 1.82 Hz (between its one-thread run and its second four-thread run: root mean square 0.141 Hz; the original’s rows against itself), and fMRIPrep’s field lies within that band (at most 1.8 Hz from the replica’s, root mean square 0.136 Hz; its warp: 29,062,161 of 29,895,327 values differ, at most 0.813 mm apart (99th percentile 0.0277 mm)): Field map (Hz, the unwarp node’s _field): 131,071 of 131,072 values differ, at most 1.8 apart; Corrected EPI reference (_sdc): 74,967 of 131,072 values differ, at most 17 apart. | Field map (Hz, the unwarp node's `_field`) | 1.8 | 131,071 of 131,072 (100 %) | 0.136 | 0.0263 | 0.000362 |
| Corrected EPI reference (`_sdc`) | 17 | 74,967 of 131,072 (57.2 %) | 0.185 | 0.0605 | 2.08e−6 | |
| The replica against itself: fix and reproduce | ||||||
replica: fix (4 threads) − reproduce (14 threads)Deliberate correctionThe default, fix, corrects ITK-31 (ITK: SyN sets the metric’s resampled masks only for the roles that have one: with a fixed mask and no moving mask (or the reverse), the role without one keeps the mask o…) and names it: Field map (Hz, the unwarp node’s _field): 131,071 of 131,072 values differ, at most 0.82 apart; Corrected EPI reference (_sdc): 74,915 of 131,072 values differ, at most 5.09 apart. | Field map (Hz, the unwarp node's `_field`) | 0.82 | 131,071 of 131,072 (100 %) | 0.0409 | 0.012 | 3.37e−5 |
| Corrected EPI reference (`_sdc`) | 5.09 | 74,915 of 131,072 (57.2 %) | 0.0771 | 0.0181 | 3.65e−7 | |
Δ is A − B over all 131,072 voxels of each output file, not only those shown (the field extrapolated over the whole grid). The records’ threshold: in reproduce, every output bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too.
Provenance of this example
- Data: OpenNeuro ds000228, sub-pixar008, CC0-1.0
- Inputs: fMRIPrep’s run (sha256 9899afe9e7ce3c95…); the registration’s command (sha256 a2e436d7b08baa3e…); fMRIPrep’s warp (sha256 36c7cedc7a27b7ae…); fMRIPrep’s field (sha256 d06baa15d552c170…)
- Runs: figures cache entry
sdcflows-estimation/syn-ds000228, computed 2026-11-09T23:28:17+00:00 with larmorxf786069d2750; sdcflows 2.17.1, niworkflows 1.15.3, nipype 1.12.0, scikit-image 0.26.0, nibabel 5.4.2, numpy 2.5.4 (OpenBLAS 0.3.34), SciPy 1.18.1 (oracles/python-newest: larmorx’s reference); ANTs 2.6.5’s antsRegistration (the GCC 14.3 build), through the cache of the original’s runs: one thread with CORE-MATH’s correctly rounded functions preloaded, one thread and twice four threads with glibc’s (never cached: the original’s own spread); fMRIPrep 25.2.6’s image holds ANTs 2.6.2.dev1 (its own build); every command, its environment, threads and exit status are in itsRUN_INFO.json
Every number above is in sdcflows-estimation.json, exported by python -m larmorx_validation evidence sdcflows-estimation.
The brain masks
A magnitude’s brain mask: brain_masker
sdcflows’ brain_masker skull-strips every magnitude and every PEPOLAR reference fMRIPrep estimates a field from. On fMRIPrep’s own input of its ds002603 call, the replica’s probability, mask and masked magnitude are sdcflows’, every value. Run on fMRIPrep’s image’s libraries (numpy 2.2.6, SciPy 1.15.2), they are fMRIPrep’s own files.
Worked example
The magnitude's brain mask: sdcflows' brain_masker on fMRIPrep's ds002603 call
What this shows: In reproduce the replica gives every value of sdcflows 2.17.1’s three outputs, at 1 and 14 threads and in fix alike, and with fMRIPrep’s libraries (numpy 2.2.6, SciPy 1.15.2) it writes fMRIPrep’s own masker files, every value. No correction by default changes this call.
- Replica against sdcflows brain_masker 2.17.1Bit-identical
sdcflows’ brain_masker (its BrainExtraction interface, the masker node of every magnitude’s and PEPOLAR reference’s brain extraction) on the input fMRIPrep 25.2.6 gave it for ds002603’s phase-difference field map: a grey closing and median of the inverted image, Otsu’s threshold, a binary opening and the largest component, then scikit-image’s random walker between the eroded mask and the padded image’s border; its probability, its mask at 0.5 and the masked magnitude. sdcflows 2.17.1 and the replica compute every output; fMRIPrep’s own files are compared with the replica run on its image’s libraries.
- Data
- OpenNeuro ds002603, sub-01 (CC0-1.0): the
acq-Mm2magnitude as fMRIPrep’s node was given it; shown inside fMRIPrep’s brain mask, dilated by 2 voxels, so no face shows - Node
- fMRIPrep 25.2.6,
fmriprep_25_2_wf/sub_01_wf/fmap_preproc_wf/wf_auto_00000/magnitude_wf/brainextraction_wf/masker - Programs
- sdcflows 2.17.1 in process (the newest environment); the replica’s
lx.sdcflows.brain_maskerat commit26df46d1a985; numpy’s OpenBLAS on its Haswell kernels, one thread - Time
- sdcflows 8.2 s; the replica 6.2 s at one thread, 2.6 s at 14 (informal: the benchmark below has the medians)
- Grid
- 128 × 128 × 128 voxels of 2 × 2 × 2 mm; shown: 82 × 100 × 84 around the brain
Data shown
- MB-EPI-comparison (OpenNeuro ds002603, version 1.0.0, doi:10.18112/openneuro.ds002603.v1.0.0), CC0 1.0 public-domain dedication.





Bit-identical2,097,152 of 2,097,152 voxels equal
Bit-identical2,097,152 of 2,097,152 voxels equal
Axial slice 69 of 84; the crosshair where fMRIPrep's probabilities differ most from sdcflows' with the newest releases; choose the output (the probability, the mask over the input, the masked magnitude) above the images. The interactive viewer needs JavaScript; the metrics below are complete without it.
Every comparison, computed in float64 over every voxel of the outputs
| Comparison (A − B), verdict and reason | Output | max |Δ| | Values that differ | RMS of Δ | max |Δ| ÷ range | 1 − NCC |
|---|---|---|---|---|---|---|
| The original against itself: the yardstick | ||||||
| fMRIPrep's output − sdcflows brain_masker 2.17.1, the newest releasesreferenceFor reference, the originals’ own step between releases of the libraries: fMRIPrep’s image runs numpy 2.2.6 (its sums in chunks) and SciPy 1.15.2 (the random walker’s Laplacian in another row order), so its probabilities differ in their last bits from sdcflows’ with numpy 2.5.4 and SciPy 1.18.1; the replica follows both (its row against fMRIPrep’s output). Brain probability (random walker): 1,891,835 of 2,097,152 values differ, at most 1.19e-06 apart. | Brain probability (random walker) | 1.19e−6 | 1,891,835 of 2,097,152 (90.2 %) | 9.8e−8 | 1.19e−6 | 5.95e−14 |
| Brain mask | 0 | 0 of 2,097,152 | 0 | 0 | 0 | |
| Masked magnitude | 0 | 0 of 2,097,152 | 0 | 0 | 0 | |
| The replica against the original | ||||||
| replica − sdcflows brain_masker 2.17.1Bit-identicalEvery value of the three outputs is sdcflows’: the grey closing and median, Otsu’s threshold, the binary opening and the largest component (SciPy’s ndimage, LARMORX’s replica of it), scikit-image’s random walker (its Laplacian in SciPy 1.18’s order, its conjugate gradients with OpenBLAS’s dot products), the probabilities cropped back, the mask at 0.5. | every output | identical: 0 of 2,097,152 values differ | ||||
| The replica against fMRIPrep's output | ||||||
| replica with fMRIPrep's libraries − fMRIPrep's outputBit-identicalWith numpy 2.2.6’s sums and SciPy 1.15.2’s Laplacian order (fMRIPrep’s image), the replica writes fMRIPrep’s own masker files, every value. | every output | identical: 0 of 2,097,152 values differ | ||||
| The replica against itself: 1 and 14 threads, fix and reproduce | ||||||
replica: 14 threads, fix − 1 thread, reproduceBit-identicalThe same bytes at 1 and 14 threads and in fix and in reproduce (no correction by default applies to this call). | every output | identical: 0 of 2,097,152 values differ | ||||
Δ is A − B over all 2,097,152 voxels of each output file, not only those shown. The records’ threshold: in reproduce, every output bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too.
Provenance of this example
- Data: OpenNeuro ds002603, sub-01, CC0-1.0
- Inputs: the clipped, N4-corrected magnitude (sha256 f57cf6848227f2f2…)
- Runs: figures cache entry
sdcflows-estimation/masker-ds002603, computed 2026-11-09T22:14:30+00:00 with larmorx26df46d1a985; sdcflows 2.17.1, niworkflows 1.15.3, nipype 1.12.0, scikit-image 0.26.0, nibabel 5.4.2, numpy 2.5.4 (OpenBLAS 0.3.34), SciPy 1.18.1 (oracles/python-newest: larmorx’s reference); FSL 6.0.7.23’s topup, ANTs 2.6.5’s N4BiasFieldCorrection (the GCC 14.3 build; one thread, correctly rounded maths), AFNI 26.3.05’s 3dvolreg, through the cache of the original’s runs; LARMORX’s replicas and ports; every command, its environment, threads and exit status are in itsRUN_INFO.json
Every number above is in sdcflows-estimation.json, exported by python -m larmorx_validation evidence sdcflows-estimation.
An EPI’s mask, and SciPy’s watershed corrected by default
sdcflows’ epi_mask (no workflow of sdcflows or fMRIPrep calls it) floods the EPI from two markers with SciPy’s watershed_ift. SciPy’s watershed reaches neighbours across the image’s edges (SCI-13) and can leave an element alone in its queue (SCI-14), so the object’s region stops early. The replica’s default, fix, corrects both and names them; in reproduce it gives SciPy’s mask. The corrected masks agree better with fMRIPrep’s own brain masks on three of the four BOLD references and the same on the fourth, worse on none (rule A).
Worked example
SciPy's watershed corrected by default: sdcflows' epi_mask on ds003592's BOLD reference
What this shows: In reproduce the replica gives sdcflows 2.17.1’s mask, every voxel. In fix, its default, it corrects SciPy’s watershed (SCI-13 and SCI-14): the object’s region no longer stops early, and the mask grows from 12,843 to 51,162 voxels, its Dice coefficient with fMRIPrep’s brain mask from 0.464 to 0.904.
- Replica against sdcflows epi_mask 2.17.1Bit-identical
sdcflows’ epi_mask (utils/epimanip.py; no workflow of sdcflows or fMRIPrep calls it) masks an EPI by grey-level morphology and SciPy’s watershed_ift from two markers, the object at the window’s centre of mass and the background at one corner voxel. SciPy’s watershed lets a region’s front reach across the image’s edges (SCI-13) and can leave an element alone in its queue (SCI-14): on this multi-echo BOLD reference the object’s region stops early. The replica corrects both by default (rule A, measured against fMRIPrep’s own brain masks) and gives SciPy’s result in reproduce.
- Data
- OpenNeuro ds003592, sub-280 (CC0-1.0): fMRIPrep 25.2.6’s BOLD reference of the run (
desc-hmc_boldref) and its brain mask; shown inside the masks, dilated by 2 voxels - Masks
- sdcflows 12,843 voxels (Dice 0.464 with fMRIPrep’s), the replica in
reproduce12,843, infix51,162 (Dice 0.904); fMRIPrep’s mask 42,464 - Programs
- sdcflows 2.17.1 in process (the newest environment); the replica’s
lx.sdcflows.epi_maskat commit26df46d1a985 - Grid
- 64 × 64 × 43 voxels of 3.38 × 3.38 × 3 mm; shown: 52 × 58 × 43 around the brain
Data shown
- Neurocognitive aging data release (OpenNeuro ds003592, version 1.0.13, doi:10.18112/openneuro.ds003592.v1.0.13), CC0 1.0 public-domain dedication.
- Children and adults watching a short film (OpenNeuro ds000228, version 1.1.1, doi:10.18112/openneuro.ds000228.v1.1.1), CC0 1.0 public-domain dedication.
- Political Moralization (OpenNeuro ds005040, version 1.2.0, doi:10.18112/openneuro.ds005040.v1.2.0), CC0 1.0 public-domain dedication.
- The FreeSurfer Maintenance Dataset (OpenNeuro ds004958, version 1.0.0, doi:10.18112/openneuro.ds004958.v1.0.0), CC0 1.0 public-domain dedication.




Bit-identical176,128 of 176,128 voxels equal

Axial slice 17 of 43; each mask over the BOLD reference; the crosshair where the corrected watershed changes the mask. The interactive viewer needs JavaScript; the metrics below are complete without it.
Every comparison, computed in float64 over every voxel of the outputs
| Comparison (A − B), verdict and reason | max |Δ| | Values that differ | RMS of Δ | max |Δ| ÷ range | 1 − NCC |
|---|---|---|---|---|---|
| The replica against the original | |||||
replica, reproduce − sdcflows epi_mask 2.17.1Bit-identicalThe replica’s reproduce gives sdcflows’ mask, every voxel: the non-flat ball(3) opening and ball(2) closing, numpy’s percentiles, SciPy’s watershed from the two markers with its defects, the ball(2) dilation. | identical: 0 of 176,128 values differ | ||||
| The replica against itself: fix and reproduce | |||||
| replica: fix − reproduceDeliberate correctionThe default corrects SciPy’s watershed (SCI-13: neighbours across the image’s edges; SCI-14: an element left alone in its queue) and names it: the object’s region no longer stops early. sdcflows’ mask holds 12,843 voxels (Dice 0.464 with fMRIPrep’s brain mask), the corrected one 51,162 (Dice 0.904): rule A, measured on four references (the table below). SCI-13 SCI-14 | 1 | 38,319 of 176,128 (21.8 %) | 0.466 | 1 | 0.562 |
Δ is A − B over all 176,128 voxels of each mask, not only those shown. The records’ threshold: in reproduce, every output bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too.
Provenance of this example
- Data: OpenNeuro ds003592, sub-280, CC0-1.0
- Inputs: ds003592-sub-280-noreconall: the BOLD reference (sha256 aafc98faf627c1b7…); ds003592-sub-280-noreconall: fMRIPrep’s brain mask (sha256 31c4ce2c435256d2…); ds000228-sub-pixar008-noreconall: the BOLD reference (sha256 b2147ee1102aaf22…); ds000228-sub-pixar008-noreconall: fMRIPrep’s brain mask (sha256 f1d80f97a0409743…); ds005040-sub-002-noreconall: the BOLD reference (sha256 0dfb50a6476883b2…); ds005040-sub-002-noreconall: fMRIPrep’s brain mask (sha256 3bb43393417fbb28…); ds004958-sub-fsm64ps-noreconall: the BOLD reference (sha256 7e21c93f731468d4…); ds004958-sub-fsm64ps-noreconall: fMRIPrep’s brain mask (sha256 254db94b06a2f5ba…)
- Runs: figures cache entry
sdcflows-estimation/epi-mask, computed 2026-11-09T22:14:38+00:00 with larmorx26df46d1a985; sdcflows 2.17.1, niworkflows 1.15.3, nipype 1.12.0, scikit-image 0.26.0, nibabel 5.4.2, numpy 2.5.4 (OpenBLAS 0.3.34), SciPy 1.18.1 (oracles/python-newest: larmorx’s reference); FSL 6.0.7.23’s topup, ANTs 2.6.5’s N4BiasFieldCorrection (the GCC 14.3 build; one thread, correctly rounded maths), AFNI 26.3.05’s 3dvolreg, through the cache of the original’s runs; LARMORX’s replicas and ports; every command, its environment, threads and exit status are in itsRUN_INFO.json
Every number above is in sdcflows-estimation.json, exported by python -m larmorx_validation evidence sdcflows-estimation.
epi_mask on four BOLD references, the original and the replica’s fix against fMRIPrep’s brain masks: sdcflows epi_mask 2.17.1
| Reference | fMRIPrep's mask | sdcflows: voxels | Dice | outside fMRIPrep's | fix: voxels | Dice | outside fMRIPrep's | reproduce = sdcflows | named by fix |
|---|---|---|---|---|---|---|---|---|---|
| ds003592 (64 × 64 × 43) | 42,464 | 12,843 | 0.464 | 10 | 51,162 | 0.904 | 8,828 | identical | SCI-13, SCI-14 |
| ds000228 (64 × 64 × 32) | 39,159 | 131,072 | 0.46 | 91,913 | 47,081 | 0.906 | 7,998 | identical | SCI-13, SCI-14 |
| ds005040 (64 × 64 × 40) | 51,891 | 15,882 | 0.469 | 0 | 16,106 | 0.474 | 7 | identical | SCI-13, SCI-14 |
| ds004958 (104 × 104 × 72) | 171,400 | 143 | 0.00167 | 0 | 143 | 0.00167 | 0 | identical | – |
The cache entry’s runs (sdcflows 2.17.1 and the replica in fix and in reproduce, the newest environment) on fMRIPrep 25.2.6’s desc-hmc_boldref of four fMRIPrep runs; fMRIPrep’s desc-brain_mask of each run is the independent reference (niworkflows’ skull stripping; for ds005040’s PEPOLAR run it is the corrected reference’s). The corrected masks are better on three references and the same on the fourth, worse on none: rule A (docs/findings/sdcflows-estimation.md, “epi_mask and SciPy’s watershed”). The masks of fix larger than fMRIPrep’s by thousands of voxels are epi_mask’s own ball(2) dilation around the brain; no sdcflows or fMRIPrep workflow calls epi_mask.
Corrections by default
Every defect the replica found in the originals was decided by the register’s rules (A: corrected by default; B: refused with a clear error; C: kept and documented; D: measured first). upstream_defects="reproduce" (on the command line --upstream-defects reproduce from the next release, LARMORX_UPSTREAM_DEFECTS=reproduce in 0.1.0rc1) gives the original’s behaviour, its errors and warnings included, where LARMORX has a switch (findings, register).
- 89 entries were registered: 35 in sdcflows, 23 in niworkflows, nipype, pybids and fMRIPrep, 27 in SciPy and 4 in scikit-image.
- 42 are corrected by default and 15 refused with a clear error. The others are kept and documented, measured first, or concern a part LARMORX does not run (its database, its reports).
- 61 have the switch; crashes, memory errors and nondeterminism are never reproduced.
- 19 reach fMRIPrep’s own calls (the table’s fifth column).
Corrections by default, the replica: the originals’ defects (SDC-12 to SDC-46, PIPE-18 to PIPE-40, SCI-06 to SCI-32, SKI-01 to SKI-04)
| Entry | Original | Class | What the original does | fMRIPrep's calls | What the replica does | Switch |
|---|---|---|---|---|---|---|
| SDC-12 | sdcflows ReorientImageAndMetadata | c | checks the upper-cased orientation code but reorients to the code as given: a lower-case one (las) fails in nibabel | none (fMRIPrep’s PEPOLAR wiring passes LAS) | rule A: the upper-cased code; reproduce nibabel’s error (lx.sdcflows, field maps part B) | yes |
| SDC-13 | sdcflows Deoblique, Reoblique | c | nibabel’s obliquity (radians) against OBLIQUE_THRESHOLD_DEG = 0.5: they act only beyond 28.6°; _deoblique centres the plumb grid in voxels and compares axis codes by position | the SyN runs’ EPIs (oblique up to 20.7°): left as they are | rule D measured, then C: kept in both modes (made plumb as meant, fMRIPrep’s most oblique SyN EPI gets a field 8.2 Hz apart at the 95th percentile, another ANTs seed 1.7 Hz, and an unwarped reference no closer to the anatomy) | – |
| SDC-14 | sdcflows _norm_lap | c | an image with no positive (or no negative) value after the median’s subtraction fails with numpy’s IndexError (the percentile of nothing) | none | rule B: a ValueError saying so; reproduce numpy’s IndexError | yes |
| SDC-15 | sdcflows init_syn_sdc_wf | c | the zooms_epi node regrids the clipped EPI and nothing reads it | every SyN run (dead work) | rule C: kept as sdcflows (no result depends on it); the replica does not compute it | – |
| SDC-16 | sdcflows _warp_dir | c | the restriction’s 1.0 at the phase-encoding axis’s position among the fixed image’s voxel axes, while ANTs weighs the physical axes: a sagittal or coronal grid frees another axis | none (fMRIPrep’s SyN EPIs are axial) | rule A: the phase encoding’s world axis; reproduce sdcflows’ position, with a warning | yes |
| SDC-17 | sdcflows find_estimators (2.17.1) | c | bids_filters also restrict the fieldmap-less anatomy and targets, no sessionless T1w serves sessioned runs, the acquisition/ceagent filters never reach the EPI heuristics (acquisitions) | none (fMRIPrep 25.2.x runs sdcflows 2.15, which has the corrections) | rule A (the upstream’s own correction): 2.15.2’s search; reproduce 2.17.1’s, with notices | yes |
| SDC-18 | sdcflows bidict | c | a new estimator gets the last free auto_ index in range(len(used) + 1), not the first | every run with unnamed estimators (the names in its derivatives) | rule C: kept (the names are in fMRIPrep’s and sdcflows’ derivatives and logs) | – |
| SDC-19 | sdcflows find_estimators | b | the named estimators are built in a set’s order, which changes between processes | runs with several named estimators (their order) | pybids’ natural order in both modes (nondeterminism is never reproduced) | – |
| SDC-20 | sdcflows get_identifier | f | the KeyError for an unknown index table is the raw string ‘{by}’ | none | rule A (a message): the table’s name; reproduce the literal text | yes |
| SDC-21 | sdcflows find_estimators | c | case-insensitive regex filters: subject 01 matches 010, part-mag matches part-imag, pe matches PE: other subjects’ or identifiers’ files join the estimator | datasets with list-valued B0FieldIdentifiers and several subjects in one index | rule A: exact filters and list membership; reproduce sdcflows’ | yes |
| SDC-22 | sdcflows get_workflow, init_fmap_preproc_wf | e | every keyword argument goes to the estimator’s init_*_wf, which ignores the ones it does not take: a misspelt option is ignored | none | rule B: a TypeError for an argument no estimator workflow takes; reproduce sdcflows’ | yes |
| SDC-23 | sdcflows init_3dQwarp_wf | a | inputnode.in_reference is connected but not declared (in_data, metadata): its fmap_ref can never be computed | none (fMRIPrep does not run 3dQwarp’s estimation) | the workflow waits for 3dQwarp’s port (NotImplementedError); then rule B, a clear error | – |
| SDC-24 | sdcflows _qwarp2ants | c | np.squeeze drops every axis of length one before the vector axis: a one-slice warp loses a spatial axis and ANTs does not read it as a displacement field | none | rule A: only the axes after the third dropped; reproduce sdcflows’ | yes |
| SDC-25 | sdcflows init_unwarp_wf | c | the output documented as the displacement field is never connected: nipype leaves it undefined | none (no caller reads it) | rule C: kept (None); the same field is B0FieldTransform.to_displacements | – |
| SDC-26 | sdcflows init_unwarp_wf, ApplyCoeffsField | e | fmap2data_xfm and data2fmap_xfm, declared exclusive, are both set by the graph and data2fmap_xfm wins without a word | none | rule B: a ValueError; reproduce sdcflows’ | yes |
| SDC-27 | sdcflows match_histogram | a | matched float values assigned into an integer image with numpy’s cast: values its type cannot hold and NaN convert undefined (x86-64: wrapped) | none (no workflow calls it) | the rule of the corrections by default: clamped (NaN to 0) with a warning; reproduce x86-64’s casts | yes |
| SDC-28 | sdcflows epi_mask | a | np.round(1e3 * wshed / wshed.max()) cast to uint16: a flat residual, NaN, infinity or overflow converts undefined (x86-64: 0) | none (no workflow calls it) | the rule of the corrections by default: clamped (NaN 0, infinity 65,535) with a warning; reproduce x86-64’s 0 | yes |
| SDC-29 | sdcflows’ BIDS app | e | a participant without field maps gets SyN estimators without their anatomical inputs: they fail when run, after the other estimators’ work | none (fMRIPrep wires them) | rule B: the run stops before any work naming them and --no-fmapless; reproduce sdcflows’ order and failure | yes |
| SDC-30 | sdcflows’ BIDS app | e | recorded and never used: every session is estimated | none | rule A: the sessions given; reproduce every session | yes |
| SDC-31 | sdcflows’ BIDS app | e | read and never used | none | rule A: its fmap entry restricts the field maps (fMRIPrep’s convention); reproduce ignored | yes |
| SDC-32 | sdcflows’ BIDS app | e | recorded, and every estimator built with sloppy=False, debug=False | none | rule A: they reach the workflows; reproduce ignored | yes |
| SDC-33 | sdcflows’ BIDS app | e | a --mem-gb unit _to_gb cannot look up, a missing or non-JSON --bids-filter-file, a missing --use-plugin file: a traceback, exit 1 | none | rule B: argparse’s error (exit 2); reproduce the traceback | yes |
| SDC-34 | sdcflows’ BIDS app | b | a non-integer --nprocs is named by a functools.partial representation; missing labels and analysis_level in a set’s order | none | invalid _min_one value; sorted (nondeterminism is never reproduced) | – |
| SDC-35 | sdcflows’ BIDS app | e | the file is read with PyYAML’s load without the Loader PyYAML 6 requires (TypeError) | none | rule A: accepted (it must exist; no effect); reproduce the TypeError | yes |
| SDC-36 | sdcflows’ BIDS app | c | one registry for every participant: two participants with the same B0FieldIdentifier (unique only within a participant in BIDS) stop it with KeyError | none (fMRIPrep: PIPE-32) | rule A: a registry per participant (the automatic names kept); reproduce the KeyError | yes |
| SDC-37 | sdcflows brain_masker | c | the rough mask’s largest component is the background (size 0): the whole image is the brain; a constant image divides 0 by 0 | none | rule B: a ValueError; reproduce sdcflows’ | yes |
| SDC-38 | sdcflows brain_masker | c | with no seed left after the rough mask’s erosion by ball(5) the random walker renumbers label 2 as 1 and the background’s probability is taken as the brain’s | none | rule B: a ValueError; reproduce sdcflows’ | yes |
| SDC-39 | sdcflows brain_masker | c? | grey_closing(structure=ball(1)) is SciPy’s non-flat closing where the flat closing by the ball is meant (last-bit differences) | every phase-difference and PEPOLAR estimate (probabilities in their last bits) | rule D measured, then C: kept (14 inputs of the fMRIPrep runs: probabilities at most 1.7e-06 apart, the masks on no voxel) | – |
| SDC-40 | sdcflows’ BIDS app | e | the database is built first, so an output folder equal to the dataset (refused next) gets .bids_db written into the dataset | none | The replica writes no database (nothing to reproduce) | – |
| SDC-41 | sdcflows config | a | os.path.join(os.getenv(‘HOME’), …) for TemplateFlow’s folder: a TypeError at import where HOME is unset (Windows) | none (Linux images) | the home folder Python finds (a crash, never reproduced) | – |
| SDC-42 | sdcflows init_sdcflows_wf | c | the figures are named desc-EstimatorType.PEPOLAR_fieldmap.svg (the enum’s text), not the method’s name | sdcflows’ app’s reports (fMRIPrep names them itself) | the reports are larmorprepx’s (D7): rule A there, reproduce the enum’s text | – |
| SDC-43 | sdcflows get_trt | f | a zero or empty TotalReadoutTime raises ValueError whose message is only the value in quotes (‘0’) | none | the same message (kept) | – |
| SDC-44 | sdcflows _warp_dir | f | the oblique-dataset message goes through Logger.warn (a DeprecationWarning) | every oblique SyN run (a deprecation warning) | the same message through warning | – |
| SDC-45 | sdcflows FieldmapFile, find_anatomical_estimators | a | FieldmapFile parses its entities from the file’s absolute path, where pybids’ derivatives patterns (den-, res-, desc-, label-, …) have no separator before them, and the fieldmap-less search queries the raw layout with every entity of its targets: a dataset below a folder such as golden-clone or andres-lab stops it with ValueError: ‘den’ is not a recognized entity | –use-syn-sdc (and sdcflows’ BIDS app) on a dataset stored below such a folder (outside the container wrappers, which mount it at /data) | rule A: the entities of the path from the participant’s sub-* folder (niworkflows’ relative_to_root; a file below none keeps sdcflows’ parse), with a warning when they changed; reproduce sdcflows’ entities and error | yes |
| SDC-46 | sdcflows brain_masker | a | the random walker’s probabilities are cropped with […, padding:-padding, …], an empty slice for padding=0: the probability and the mask are written as 0 x 0 x 0 images and the brain unmasked (an empty boolean index changes nothing) | none (sdcflows’ BrainExtraction pads by 5) | rule A: the whole image’s probability and mask, with a notice; reproduce sdcflows’ empty images and unmasked brain | yes |
| PIPE-18 | niworkflows IntraModalMerge | c | grand_mean_scaling indexes the series with a mask of the wrong shape: numpy’s IndexError for every series of two or more volumes | none (fMRIPrep leaves it off) | rule A: each volume scaled by the largest median over its own in the mask, with a warning; reproduce the IndexError | yes |
| PIPE-19 | niworkflows IntraModalMerge | c | a 6- or 7-dimensional image passes the check for more than four dimensions and is averaged over its fourth axis | none | rule B: niworkflows’ own error; reproduce numpy’s mean | yes |
| PIPE-20 | fMRIPrep DistortionParameters | c | a missing readout time or phase-encoding direction becomes undefined outputs: the run is resampled without its field map, the report still names the correction | BOLD runs without readout metadata whose estimator has it | the interface: rule C (its documented design) with a warning; larmorprepx’s pipeline: rule B, fMRIPrep’s own “Missing readout time information” error; reproduce the silent skip with a warning | yes |
| PIPE-21 | fMRIPrep ReconstructFieldmap | c | the field on the target projected into the field map’s space and made positive (a LAS target’s voxels reversed), while the resampler reads it on the target’s grid: up to 159 Hz on a synthetic LAS target | direct field maps on LAS targets (the SyN runs’ path) | rule A: the values on the target’s grid; reproduce fMRIPrep’s image | yes |
| PIPE-22 | nitransforms (fMRIPrep’s itk_mat2txt) | c? | the desc-fmap_xfm parameters written with “%g”, read back by every later ReconstructFieldmap | every run with a field map (corners within 7.9e-05 mm) | rule C: kept (a correction measured to bring no gain) | – |
| PIPE-23 | nipype is_outlier (NonsteadyStatesDetector) | c | a median absolute deviation of 0 makes the values at the median 0/0, NaN outliers: every leading volume non-steady | none in the fMRIPrep runs (a constant or padded series) | rule A: a z-score of 0 at the median; reproduce nipype’s | yes |
| PIPE-24 | niworkflows ValidateImage | c | nibabel’s get_xyzt_units raises KeyError for a spatial unit code 4 to 7 | none | rule A: the translation reported in mm; reproduce the KeyError | yes |
| PIPE-25 | fMRIPrep get_estimator | c | with several B0FieldIdentifier values on the sources, the estimator is named after one in a set’s order; a run whose B0FieldSource is another gets none | datasets with aliases (sdcflows’ own test data) | rule A: the alias reaches its estimator, with a warning; reproduce fMRIPrep’s | yes |
| PIPE-26 | niworkflows DerivativesDataSink | b | with two or more list-valued entity inputs the files are matched to the names in a Python set’s order | none (fMRIPrep’s field-map sinks have one) | the entities’ sorted order, with a warning (nondeterminism is never reproduced) | yes |
| PIPE-27 | niworkflows DerivativesDataSink | f | “from float32 to float32”: the original type named twice | every coerced derivative’s log line | rule A (a message): the new type; reproduce niworkflows’ text | yes |
| PIPE-28 | niworkflows DerivativesDataSink | e | fewer compress values than files (but more than one): Python’s IndexError | none | rule B: a ValueError; reproduce the IndexError | yes |
| PIPE-29 | niworkflows DerivativesDataSink | a | values out of the integer type’s range and NaN cast with numpy’s cast (undefined in C) | none in the fMRIPrep runs | the rule of the corrections by default: clamped (NaN to 0) with a warning; reproduce x86-64’s casts | yes |
| PIPE-30 | niworkflows DerivativesDataSink | c | the header fix sets four voxel sizes on an image that is not 4-D: nibabel’s HeaderDataError | none | rule A: the fourth size only on a 4-D image, the sidecar with the value; reproduce the error | yes |
| PIPE-31 | fMRIPrep init_single_subject_wf | e | derivatives lacking the field map, reference or coefficients file stop the graph’s construction with a bare KeyError | –derivatives users with incomplete field-map derivatives | rule B: a ValueError naming the identifier and the files; reproduce the KeyError | yes |
| PIPE-32 | fMRIPrep map_fieldmap_estimation | c | every participant of a run goes into sdcflows’ one registry: a second participant with a B0FieldIdentifier an earlier one used stops it with KeyError: “‘ | multi-participant runs whose participants share field-map identifiers (allowed by BIDS) | rule A: each participant searched in its own registry (automatic names kept), entries added to the shared one where free, with a warning; reproduce the KeyError | yes |
| PIPE-33 | niworkflows IntensityClip | c | an image constant between its percentiles divided by its maximum, 0: NaN, cast to int16/uint8 by an undefined conversion (0 on x86-64) | none | rule B: a ValueError; reproduce niworkflows’ result with x86-64’s NaN and casts on every platform | yes |
| PIPE-34 | niworkflows RobustAverage | c | a gathered volume whose mean is 0 after the clipping is divided by it: NaN or infinite voxels, registered and averaged | none | rule B: a ValueError naming the volumes; reproduce niworkflows’ | yes |
| PIPE-35 | niworkflows resample_by_spacing, RegridToZooms | c? | smooth=True sets the Gaussian’s sigma to max(0, (old / new - 1) / 2) voxels, positive only for a finer grid: the coarser grid (the anti-aliasing case) is never smoothed (scikit-image’s rescale: (new / old - 1) / 2) | every run’s brain extraction regrids the 1 mm T1w and the OASIS template to 4 mm with smooth=True, so unsmoothed, before antsAI’s initialisation (res_tmpl, res_target) | rule D (agreed 2026-11-09): niworkflows’ sigma in both modes until the measurement, with the anatomical brain extraction’s port, of whether smoothing the 4 mm grids changes antsAI’s initialisation and the brain mask; then rule A (a switch and a larmorx_core::defects entry) or C | – |
| PIPE-36 | fMRIPrep extract_entities, get_sbrefs, collect_derivatives’ entities | a | extract_entities parses the absolute BOLD paths (pybids’ parse_file_entities, whose derivatives patterns den-, res-, desc-, … have no separator before them) and get_sbrefs queries the raw layout with them: below a folder such as golden-x or andres-lab every BOLD run stops init_bold_fit_wf with ValueError: ‘den’ is not a recognized entity | every BOLD run of a dataset stored below such a folder (outside the container wrappers, which mount it at /data) | not ported yet (larmorprepx’s BOLD stages): rule A when ported, the entities of the BIDS part, reproduce fMRIPrep’s | – |
| PIPE-37 | pybids BIDSLayout (BIDSLayoutIndexer) | a | the index matches the entity patterns against each file’s absolute path (Entity.match_file): below a folder named func, sub-pilot or run-2 every file gets datatype func, subject pilot (its own label lost) or run 2; with the derivatives configuration (unanchored den-, res-, desc-, …) below golden-x or andres-lab every file gets den or res | a dataset (or a derivatives dataset) stored below such a folder: participants not found, derivatives not matched (outside the container wrappers) | rule A: the patterns matched against the path below the root (/-rooted, as the ignore patterns), with a warning when that changed an entity; reproduce pybids’ index; parse_file_entities parses the path it is given, as pybids’ | yes |
| PIPE-38 | nipype DenoiseImage (CommandLine._list_outputs) | c | nipype lists every name_source input’s file name, so noise_image ( | none (fMRIPrep and sdcflows use output_image only) | rule C: nipype’s listing kept (larmorx._nipype.denoise_image; nothing the replica runs reads it) | – |
| PIPE-39 | nipype BaseInterface.aggregate_outputs | b | the outputs are set (and checked by traits) in the order of set(predicted_outputs), which follows the process’s string hashes (PYTHONHASHSEED): with several invalid outputs the TraitError names any of them, from process to process (GetReadoutTime of PhaseEncodingDirection ‘j+’: pe_direction or pe_dir_fsl; with a string readout time also readout_time) | none (a message of a failing run) | the outputs checked in their declared order, traits’ TraitError and message (GetReadoutTime, DistortionParameters); not reproduced (nondeterministic) | – |
| PIPE-40 | niworkflows IntraModalMerge | a | with to_ras the inputs are reoriented to RAS but in_mask is not, so grand_mean_scaling indexes the RAS series with the mask on the input’s grid: numpy’s IndexError when the shapes differ, a mirrored or permuted mask when they agree (its indexing fails anyway for two or more volumes: PIPE-18) | none (fMRIPrep’s IntraModalMerge calls have no grand-mean scaling) | rule A: the mask reoriented with the series, with a notice; reproduce niworkflows’ | yes |
| SKI-01 | scikit-image random_walker | c | with a mask, nodes numbered by the remaining edges’ ends but labels by the mask: a mask pixel without neighbours shifts every later node (probabilities off by up to 0.59) | none (brain_masker’s markers isolate no pixel) | rule A: both numbered by the mask, with a warning; reproduce scikit-image’s | yes |
| SKI-02 | scikit-image match_histograms | c | an unsigned image’s reference counted with bincount: a float or negative reference, or a uint64 image, refused | none (no workflow calls it) | rule A: counted with unique, scikit-image’s result wherever it gives one; reproduce its error | yes |
| SKI-03 | scikit-image random_walker | c | labels that are not consecutive come back as their consecutive renumbering (3 and 7 as 1 and 2) | none (brain_masker’s labels are 1 and 2) | rule A: the labels given, with a warning; reproduce scikit-image’s | yes |
| SKI-04 | scikit-image random_walker | c | return_full_prob with no pixel to segment returns the seeds’ boolean masks along the last axis, not (nlabels, …) probabilities | none | rule A: the documented probabilities, with a warning; reproduce scikit-image’s | yes |
| SCI-06 | SciPy binary_erosion, binary_dilation | a | an origin that puts the centre before the structure: a segmentation fault or memory’s values | none | rule B: ValueError(“invalid origin”) (never reproduced) | – |
| SCI-07 | SciPy n-dimensional filters | a | a coordinate two whole periods before an axis maps to index -1 (a footprint over eight times the axis) | none | index 0, the reflection’s value (never reproduced) | – |
| SCI-08 | SciPy _rank_filter_1d | a | a window much larger than the input, or a large wrap origin, reads before or after it | none | the mode’s extension (never reproduced) | – |
| SCI-09 | SciPy rank_filter, median_filter, percentile_filter | c | on a 1-D input the running rank takes the footprint’s whole window, its false elements included | none (sdcflows’ filters are 3-D) | rule A: the n-dimensional filter, with a warning; reproduce SciPy’s | yes |
| SCI-10 | SciPy binary morphology | c | more than one pass: the first reads the mask’s truth, the later ones the mask cast to int8 (0.5, 256 false) | none (sdcflows’ masks are boolean) | rule A: the truth in every pass, with a warning; reproduce SciPy’s | yes |
| SCI-11 | SciPy binary morphology | a | until nothing changes, with a structure whose centre is false: two states alternate for ever | none | rule B: RuntimeError when a state repeats (never reproduced) | – |
| SCI-12 | SciPy grey morphology | c? | the structure’s values added in the input’s type (a uint8 dilation wraps), the running result in double | none (float images) | rule C: kept (SciPy’s definition) | – |
| SCI-13 | SciPy watershed_ift | c | neighbours by C-order offsets checked only against the size: the last element of a row neighbours the first of the next | none (sdcflows’ epi_mask only) | rule A, measured (rule D): corrected by default, reproduce SciPy’s; epi_mask’s masks better on 3 of 4 references from fMRIPrep’s runs against fMRIPrep’s own BOLD masks, the same on 1 | yes |
| SCI-14 | SciPy watershed_ift | c | an element alone in its queue is not taken out when its cost drops: queues join, elements are never processed or processed at the wrong level | none (sdcflows’ epi_mask only) | rule A (with SCI-13’s measurement): corrected by default, reproduce SciPy’s | yes |
| SCI-15 | SciPy watershed_ift | c | markers and labels read as C ints: 2**32 + 5 is 5 | none | rule A: 64 bits; reproduce SciPy’s | yes |
| SCI-16 | SciPy watershed_ift | a | above 2 GiB of input or output it reads and writes outside its arrays | none | 64-bit offsets in both modes, with a warning (never reproduced) | yes |
| SCI-17 | SciPy 1.15 _rank_filter_1d | c | an input shorter than half the footprint returns before writing (gh-23293) | none | fixed in SciPy 1.18, which the replica follows in both modes | – |
| SCI-18 | SciPy 1.18.1 scipy.linalg.inv | c | for a general matrix whose norm (SciPy’s norm1_) overflows, LAPACK dgecon returns info = -5 without an estimate, getri is skipped and SciPy returns the LU factors as the inverse, with no error or warning | none (an image affine’s entries are far from 1e308) | rule A: the inverse (getri, SciPy 1.15’s result), with a notice; reproduce the LU factors | yes |
| SCI-19 | SciPy 1.18.1 scipy.linalg.inv | f | the general path’s norm1_ sums the rows of its column-major copy (the infinity norm) and dgecon combines it with its 1-norm estimate of the inverse: the LinAlgWarning’s test rcond < eps and the rcond it prints use a mixed estimate (within a factor 4 of the 1-norm’s for 4 x 4; the symmetric path’s norm is right) | none (only the warning; the inverse is unchanged) | kept in both modes, documented (a message: near the threshold the 1-norm would warn about 10,234 of 20,000 matrices instead of 10,249, probe_sci19_norm.py; no inverse changes) | – |
| SCI-20 | SciPy 1.18.1 scipy.linalg.inv | f | for a diagonal matrix the warning’s test max(abs(a)) · max(abs(1/a)) > 1/eps is right, but the value printed as “rcond” is that product, the condition number (“rcond = 2e+17”) | none (a message) | kept in both modes (SciPy’s text) | – |
| SCI-21 | SciPy rank_filter, median_filter, percentile_filter (_rank_filter_1d) | a | for a float32, float64 or int64 1-D input SciPy hands its C++ the output array itself, which writes the input’s type into it: an output of another type or byte order gets the bytes reinterpreted (output=np.float32 of a float64 input, “>f8”, an int16 array), past its end when its items are smaller (the heap corrupted: a crash at exit, or a hang) | none (sdcflows’ and niworkflows’ median filters are 3-D) | rule A: the values cast into the output (SciPy’s own handling of every other input type), with a notice; reproduce SciPy’s bytes where they are the output’s own (never past its end; the notice gives the count) | yes |
| SCI-22 | SciPy rank_filter, median_filter, percentile_filter (_rank_filter_1d) | c | the type dispatch compares dtypes by equality with native ones: >f4/>f8 inputs raise RuntimeError(“Unsupported array type”), numpy’s longlong (another type number than int64 on Linux and macOS) the C++'s TypeError(“Unsupported array type”); the n-dimensional filters take both | none | rule A: filtered (the native copy’s result), with a notice; reproduce SciPy’s errors | yes |
| SCI-23 | SciPy rank_filter, median_filter, percentile_filter (_rank_filter_1d) | f | into a non-contiguous output of the input’s type the C++ writes into numpy’s WRITEBACKIFCOPY copy and drops it without resolving it: numpy writes it back and warns (RuntimeWarning: WRITEBACKIFCOPY detected in clearing of array. …; numpy 2.3: in array_dealloc.) | none (a warning) | rule A (the values are right; the warning reports SciPy’s mistake): no warning by default; reproduce numpy’s warning, its text by the running numpy’s release | yes |
| SCI-24 | SciPy 1.15.3 _rank_filter_1d | f | an error its C++ raises (a longlong input, a cval its type cannot take) is left set while it returns None: CPython raises SystemError: | none | fixed in SciPy 1.18.1 (it checks PyErr_Occurred), whose error the replica gives in both modes | – |
| SCI-25 | SciPy binary_erosion, binary_closing (NI_BinaryErosion2) | a | for more than one pass with the structure’s centre true and no brute_force, the later passes mark each element outside the mask by the first byte of its output element (restored at the end), which is 0 for both 0.0 and 1.0 in a float32 or float64 output array: those elements are eroded (binary_erosion(ones(5), iterations=4, mask=[1, 1, 1, 0, 0], output=zeros(5)) gives [0, 0, 0, 0, 1], a bool output [0, 0, 0, 1, 1]) | none (sdcflows’ and niworkflows’ binary morphology writes bool results) | rule A: the outside elements kept (every other output type’s result), with a notice when SciPy’s differs; reproduce SciPy’s | yes |
| SCI-26 | SciPy binary_erosion, binary_dilation, binary_opening, binary_closing, binary_propagation, binary_fill_holes (Py_BinaryErosion2) | f | the propagation strategy’s second C call takes the output through NI_ObjectToInputOutputArray and never resolves its write-back copy: into a byte-swapped or misaligned output array numpy warns when the copy is freed (RuntimeWarning: WRITEBACKIFCOPY detected in clearing of array. …; numpy 2.3: in array_dealloc.) and writes it back | none (a warning) | rule A (the values are right): no warning by default; reproduce numpy’s warning, its text by the running numpy’s release | yes |
| SCI-27 | SciPy label (_ni_label._label) | c | Cython’s typed buffers refuse a byte-swapped input or output (ValueError: Big-endian buffer not supported on little-endian compiler, also for output=“>i4”), which every other function of ndimage takes (a big-endian NIfTI file’s data are such an array) | none | rule A: labelled as the native copy (the labels written into a big-endian output), with a notice; reproduce SciPy’s error | yes |
| SCI-28 | SciPy label (_ni_label._label) | f | the labels are written through the output’s data pointer whatever its flags | none | rule B: ValueError(“output array is read-only. …”) (SciPy’s message for its other functions); reproduce writes them as SciPy (numpy’s flag lifted for the write where numpy allows it; memory numpy does not own as writeable is never written) | yes |
| SCI-29 | SciPy label (_ni_label._label) | a | a bool output is viewed as uint8 and its overflow check passes up to 255, so labels above 1 are written as their bytes: a bool array holding 2, 3, … (beyond 255 working labels SciPy retries and refuses, as for any type the labels do not fit) | none | rule A: labels above 1 refused as labels that do not fit (insufficient bit-depth in requested output type), with a notice; reproduce SciPy’s bytes (its working labels counted as _ni_label counts them) | yes |
| SCI-30 | SciPy sum_labels, sum, center_of_mass (_stats) | f | with a 0-d index array SciPy indexes its sums with it (a numpy scalar) and assigns into it (TypeError: ‘numpy.int64’ object does not support item assignment); an empty input with a sequence index fails in labels.min() (ValueError: zero-size array to reduction operation minimum which has no identity) or, for uint64 labels, in numpy’s IndexError | none | rule A: the 0-d index’s one sum as a scalar, the empty input’s zero counts and sums of the index’s shape, with a notice (one per center_of_mass call); reproduce SciPy’s errors | yes |
| SCI-31 | SciPy binary_erosion, binary_dilation, binary_opening, binary_closing, binary_propagation (NI_BinaryErosion2) | a | the propagation strategy (iterations other than 1, the structure’s centre true, no brute_force) casts the mask with np.asarray(mask, dtype=np.int8), which returns the caller’s own int8 array, and uses it as its scratch: the mask is left -1 where it was true and the first pass’s output (its first byte) where it was false; binary_closing’s erosion then reads the overwritten mask, so its result differs (456 of 589 closings with an int8 mask and more than one pass) | none (sdcflows’ and niworkflows’ masks are boolean) | rule A: the caller’s mask left as given, with a notice; reproduce writes SciPy’s values into it (a read-only one where numpy lets its flag be lifted) | yes |
| SCI-32 | SciPy binary_dilation, binary_propagation, binary_fill_holes, the dilations of binary_opening and binary_closing (NI_BinaryErosion2) | a | with a valid non-zero origin and the propagation strategy (iterations other than 1, no brute_force) the result sometimes differs from SciPy’s own brute force, and the process sometimes dies (heap corruption: malloc(): unsorted double linked list corrupted, aborts and segmentation faults, at the call or at exit); a zero origin, the brute force and the erosion are unaffected | none (sdcflows’ and niworkflows’ binary morphology has no origin) | the brute force’s result in both modes (memory is never reproduced) | – |
Each decided by rules A to D (A: corrected by default; B: a clear error; C: kept and documented; D: measured first), with upstream_defects='reproduce' (LARMORX_UPSTREAM_DEFECTS=reproduce) giving the original’s behaviour where LARMORX has a switch (larmorx_core::defects, the Switch column); crashes, reads out of bounds and nondeterminism are never reproduced. The class is the register’s (a: crash or undefined behaviour; b: nondeterminism; c: a wrong result; e: a command-line quirk; f: a message; c?: questionable). The findings: docs/findings/sdcflows-estimation.md (its table “Part B’s register entries at a glance”) and docs/findings/scipy-ndimage-filters.md.
The originals’ own step: two library releases
Each comparison of the library scripts also runs the originals with the releases the other comparisons share (numpy 2.3.5 with OpenBLAS 0.3.30, SciPy 1.15.3) and says what changed from them to the newest, line by line. Of 303 compared lines 127 change, each for a known reason:
- SciPy 1.18 rewrote
scipy.linalg.inv; - SciPy 1.16 sorts every row of a sparse matrix built through COO (scikit-image’s random walker then sums its conjugate gradients in another order);
- numpy 2.4 and 2.5 changed their scalar arithmetic and percentile’s argument check;
- numpy’s OpenBLAS 0.3.31 and later bundle LAPACK 3.12.1.
The replica follows each release.
Changes, the originals against themselves: numpy 2.3.5 / SciPy 1.15.3 and numpy 2.5.4 / SciPy 1.18.1
| Case | Comparisons | Changed | Reasons |
|---|---|---|---|
| every case | 303 | 127 | – |
ndimage-skimage/ndimage-quick | 77 | 26 | NUMPY-2.4-SCALAR, NUMPY-2.5-WRITEBACK-TEXT, SCIPY-1.16-SCI-17, SCIPY-1.18-SCI-24 |
ndimage-skimage/ndimage | 77 | 26 | NUMPY-2.4-SCALAR, NUMPY-2.5-WRITEBACK-TEXT, SCIPY-1.16-SCI-17, SCIPY-1.18-SCI-24 |
ndimage-skimage/numpy | 6 | 1 | NUMPY-2.5-PERCENTILE-RANGE |
ndimage-skimage/skimage-random-walker | 5 | 1 | SCIPY-1.16-ROW-ORDER |
ndimage-skimage/scipy-inv-quick | 43 | 36 | SCIPY-1.18-INV |
ndimage-skimage/scipy-inv | 44 | 36 | SCIPY-1.18-INV |
ndimage-skimage/numpy-expf | 8 | 1 | NUMPY-2.5-PERCENTILE-RANGE |
The records’ step (python_versions): each comparison of a library script whose originals’ outputs are digested, in the shared releases (two runs: none varies) and in the newest. Every change has a known reason, the replica following each release: LAPACK-3.12.1: numpy’s OpenBLAS 0.3.31 and later bundle LAPACK 3.12.1, whose DLARF1F (dorm2r, dorml2, dgebd2) moves the last bits of numpy.linalg.svd and eigh, so nibabel 5.4.2 writes other NIfTI quaternions (quatern_b, c, d) for some oblique affines (every other byte identical; SCIPY-1.18-INV: SciPy 1.18 rewrote scipy.linalg.inv; NUMPY-2.5-PERCENTILE-RANGE: numpy 2.5 checks percentile’s q against [0, 100] before dividing it by 100; SCIPY-1.16-ROW-ORDER: SciPy 1.16 onwards sorts every row of a sparse matrix built through COO (1.15 stored the Laplacian’s diagonal after each row’s other entries), so scikit-image’s random_walker adds the conjugate gradients’ products in another order; NUMPY-2.4-SCALAR: numpy 2.4 onwards (2.5.4 here) raises TypeError when an array of one element with ndim > 0 is converted to a scalar (‘only 0-dimensional arrays can be converted to Python scalars’; NUMPY-2.5-WRITEBACK-TEXT: numpy 2.5 words the warning it gives when a WRITEBACKIFCOPY copy is freed unresolved ‘WRITEBACKIFCOPY detected in clearing of array.’ (numpy/_core/src/multiarray/arrayobject.c, _clear_array_attributes); SCIPY-1.16-SCI-17: SciPy 1.16.1 onwards (gh-23293) runs the n-dimensional filter for a 1-D input shorter than half the footprint, where 1.15.3’s running rank returned zeros before writing (SCI-17, fixed upstream); SCIPY-1.18-SCI-24: SciPy 1.15.3’s running rank returns with a Python error set for an unknown type number (numpy’s longlong) and a cval its type cannot take, which CPython turns into a SystemError (SCI-24, fixed in 1.18.1, whose TypeError the replica gives in both) (sdcflows_scripts.CHANGES, with their sources). The workflow scripts carry no step: their originals (sdcflows 2.17.1, niworkflows, nipype) are the same in both environments, and the libraries’ step under them is the library scripts’.
Speed
The benchmark (report) runs the originals in-process and the replica on the memory rule’s four calls (fMRIPrep’s real inputs) and sdcflows’ BIDS app on five datasets of its own runs, every output checked byte for byte.
- At one thread the replica takes 0.86 to 2.97 times the originals’ speed on the four calls (
IntensityClipandRobustAverage’s own steps are a little slower), 1.16 to 7.42 times at 14. - The BIDS app runs 1.2 to 5.3 times faster at one thread, its programs run fresh.
- On random testing’s random walker whose system is NaN from its first iteration, scikit-image’s conjugate gradients run to their limit (22 s); the replica stops with the same solution once nothing can change it (0.05 s).
Seconds per call (the median of three runs, one run for the BIDS app) on a log scale; the factor is the original’s time divided by the replica’s, both on one thread.
- the original, 1 thread
- replica, 1 thread
- replica, 14 threads
- brain_masker: ds002603's magnitudethe original, 1 thread 8.04 sreplica, 1 thread 6.93 sreplica, 14 threads 2.47 s1.2×
- IntensityClip: ds002603's magnitudethe original, 1 thread 1.4 sreplica, 1 thread 1.63 sreplica, 14 threads 0.189 s0.86×
- RobustAverage's own steps: ds004958's PEPOLAR seriesthe original, 1 thread 0.205 sreplica, 1 thread 0.229 sreplica, 14 threads 0.177 s0.89×
- ReconstructFieldmap: ds005454 onto its T1wthe original, 1 thread 0.891 sreplica, 1 thread 0.3 sreplica, 14 threads 0.14 s3×
- the BIDS app: ds005752-sub-ON01016-directthe original, 1 thread 21 sreplica, 1 thread 4 s5.2×
- the BIDS app: ds005454-sub-16the original, 1 thread 50 sreplica, 1 thread 23 s2.2×
- the BIDS app: ds002422-sub-02the original, 1 thread 27 sreplica, 1 thread 7 s3.9×
- the BIDS app: ds005040-sub-002the original, 1 thread 103 sreplica, 1 thread 87 s1.2×
- the BIDS app: ds006736-sub-004the original, 1 thread 79 sreplica, 1 thread 56 s1.4×
- random walker that does not converge (random testing's case)the original, 1 thread 22 sreplica, 1 thread 0.0529 s4.2e2×
From the benchmark report docs/benchmarks/sdcflows-estimation.json (commit 91fb9e73a6d3, 32 logical CPUs, the newest environment, OPENBLAS_NUM_THREADS=1 as fMRIPrep’s nodes; every output byte-identical). The originals have no thread option on these calls. The BIDS app: one run each (minutes), sdcflows’ programs run fresh (FSL’s topup, ANTs’ N4, AFNI’s 3dvolreg), LARMORX’s replicas at one thread. The random walker that does not converge: a NaN system from its first iteration (an image whose grey closing is 0 everywhere), SciPy’s conjugate gradients run to their limit; the replica stops with SciPy’s solution once nothing can change it (210 s before that change).
Memory
The memory rule allows LARMORX at most 10 % above the original’s peak plus 8 MiB for the same call; here the replica needs 16 to 72 % of the original’s peak.
Peak memory, the replica against the originals (MiB, the memory rule’s calls, one thread)
| Call | the original | replica, reproduce | replica, fix | replica ÷ the original |
|---|---|---|---|---|
| sdcflows’ brain_masker, ds002603’s magnitude (128 × 128 × 128 padded) | 1,439 | 428 | 432 | 0.3 |
| niworkflows’ IntensityClip, ds002603’s merged magnitude | 144 | 84 | 85 | 0.591 |
| niworkflows’ RobustAverage’s own steps, ds004958’s PEPOLAR series | 150 | 108 | 108 | 0.724 |
| fMRIPrep’s ReconstructFieldmap, ds005454 onto its T1w grid | 1,440 | 230 | 229 | 0.16 |
Each call in a process of its own (validation/investigations/sdcflows-fieldmap-b/memory_call.py, the calls of tests/parity/test_memory_peak.py), its peak resident memory from /usr/bin/time -v, in the newest environment at one thread. The rule: at most 10 % above the original’s peak plus 8 MiB. sdcflows’ brain_masker holds the random walker’s Laplacian several times (SciPy’s sparse matrices, scikit-image’s copies), the replica once; fMRIPrep’s ReconstructFieldmap holds nitransforms’ sampling grids in float64.
Random testing
Random testing runs random valid inputs and option combinations through the originals and the replica and compares every output (how random testing works). A difference is shrunk to the smallest input and fewest options that still show it, then fixed and kept as a permanent case, registered as a defect of the original, or reported. The replica’s two random-testing runs of 2026-11-09 drew 312,081 cases, the second with numpy’s AVX-512 kernels off; every compared case agrees. The 17 differences of the shorter runs before them are triaged below: 9 mistakes of the replica’s fixed, each with a permanent case, 5 defects of the originals registered, 3 mistakes of the test harness.
Random testing, the replica against the originals: sdcflows 2.17.1, niworkflows 1.15.3 (1.15.4’s code on these paths), SciPy, scikit-image and numpy (the two runs of 2026-11-09)
| 2026-11-09-fieldmaps-b (numpy default) | 2026-11-09-fieldmaps-b-noavx512 (AVX-512 off) | |
|---|---|---|
| Random cases, each compared with the original | 180,542 | 131,539 |
| sdcflows-estimation | 13,122 cases: 13,116 agree, 6 timeout; 49 options drawn | 9,584 cases: 9,582 agree, 2 timeout; 49 options drawn |
| ndimage-skimage | 100,483 cases: 86,195 agree, 14,288 skipped; 707 options drawn | 73,201 cases: 73,201 agree; 622 options drawn |
| niworkflows-helpers | 66,937 cases: 54,798 agree, 12,139 skipped; 31 options drawn | 48,754 cases: 48,754 agree; 31 options drawn |
| length (minutes) | 47.7 | 48.4 |
| seed, the replica’s commit | fmapb-trial, e88326b608fc | fmapb-trial-noavx512, e88326b608fc |
The replica’s random testing (docs/validation/difftest.md): random inputs and options for SciPy’s ndimage and scikit-image (filters, morphology, labels, the random walker, Otsu), numpy’s statistics, niworkflows’ helpers with nipype’s command lines, and sdcflows’ estimation steps, masks, readout times and derivatives; the originals in-process, the replica in reproduce compared output by output, its default, fix, checked by the rule of the corrections by default. skipped: calls the descriptor does not compare (an input the original refuses in a way it cannot run twice, or a program not drawn); timeout: sdcflows’ brain_masker cases whose random walker does not converge, slower than the case’s limit in the original (the benchmark’s last row): replayed, every one agrees. The second run turns numpy’s AVX-512 kernels off (NPY_DISABLE_CPU_FEATURES).
The replica’s differences from the originals in the runs of 2026-11-09, triaged
| Status | Tool | What it was | Register |
|---|---|---|---|
| registervalidation/difftest/cases/ndimage-skimage/binary-erosion-int8-mask-overwritten.json | ndimage-skimage | an iterated binary_erosion with an int8 mask (try1 120): SciPy’s propagation strategy uses the caller’s int8 mask as its scratch (np.asarray to int8 does not copy it), so the the replica side, given the same array after SciPy’s call, saw another mask; each side now builds its own arguments, compared afterwards too, and SCI-31 is registered (rule A: the mask left as given; reproduce writes SciPy’s values; binary_closing’… | SCI-31 |
| registervalidation/investigations/sdcflows-fieldmap-b/relay27/probe_sci32.py | ndimage-skimage | fmapb-try1 2984 (binary_propagation with origin [0, -1, 1]) and two worker deaths (fmapb-try1 2721: abort; malloc(): unsorted double linked list corrupted): SciPy’s dilation propagation strategy with a non-zero origin reads and writes outside its arrays (relay27/probe_sci32.py, one process per case: results other than its brute force, aborts, segmentation faults; the replica = the brute force); registered as SCI-32 (mem… | SCI-32 |
| fixedvalidation/difftest/cases/ndimage-skimage/random-walker-cg-mg-without-zeros.json | ndimage-skimage | random_walker(mode=‘cg_mg’) with no label 0 (try3 380, AVX-512 off): scikit-image returns before it names the mode it replaces (its _solve_linear_system); the replica warned about pyamg first: the mode warnings now follow the early returns | – |
| fixedvalidation/difftest/cases/ndimage-skimage/binary-opening-step-notice-without-change.json | ndimage-skimage | binary_opening with a uint16 mask (fmapb-try2 1211): its erosion step differs between the modes (SCI-10’s int8 cast) but the opening does not; the replica named the step’s defect: binary_opening and binary_closing name their steps’ defects only where the result (or the caller’s mask) changes | – |
| registervalidation/difftest/cases/niworkflows-helpers/denoise-image-lists-noise-image.json | niworkflows-helpers | DenoiseImage without save_noise (try1 35, 41): nipype lists noise_image ( | PIPE-38 |
| harnesspython/larmorx/_nipype.py | niworkflows-helpers | antsApplyTransforms with print_out_composite_warp_file and no output_image (fmapb-try1 284, 1719, 1782): nipype’s requires check refuses it; larmorx._nipype documents that nipype’s requires checks that do not change a line are not ported (nothing the replica runs reaches them); the draw now gives the option with output_image only | – |
| registervalidation/difftest/cases/niworkflows-helpers/intra-modal-merge-ras-mask.json | niworkflows-helpers | IntraModalMerge with to_ras, grand_mean_scaling and in_mask (fmapb-try1 114, 377): niworkflows reorients the series to RAS but not the mask (and its indexing fails anyway: PIPE-18); the replica’s fix raised a ValueError naming no defect; registered as PIPE-40 (rule A: the mask reoriented with the series, named) | PIPE-40 |
| fixedvalidation/difftest/cases/sdcflows-estimation/readout-time-invalid-direction.json | sdcflows-estimation | GetReadoutTime of a string TotalReadoutTime and of an invalid PhaseEncodingDirection (try1 19, 30, 149): nipype’s traits raise TraitError with its message, the replica a TypeError of its own words or no error; the replica now checks the outputs as traits do (larmorx._nipype.TraitError; DistortionParameters too), in declared order: nipype’s order is a set’s (PIPE-39, nondeterministic), so the comparison checks the original’s… | – |
| harnessvalidation/src/larmorx_validation/parity/fieldmaps_b_random.py | sdcflows-estimation | one input file or one direction (try1 36, 48, 115, 130): nipype’s OutputMultiObject gives a list of one as its element; the comparison iterated it (a float, a string’s characters); it now takes nipype’s outputs as lists | – |
| fixedvalidation/difftest/cases/sdcflows-estimation/uniform-grid-4d-off-the-grid.json | sdcflows-estimation | UniformGrid of a 4-D image on another grid (try1 59, 103, 181): nitransforms’ map_coordinates raises SciPy’s RuntimeError(‘invalid shape for coordinate array’); the replica refused with NotImplementedError: it now lets its map_coordinates raise SciPy’s error | – |
| fixedvalidation/difftest/cases/sdcflows-estimation/brain-masker-no-positive-value.json | sdcflows-estimation | brain_masker of an image with no positive value (try1 15, 183): numpy’s IndexError of the empty array’s percentile; the replica’s binding raised it as ValueError (SdcError::Index now) | – |
| registervalidation/difftest/cases/sdcflows-estimation/brain-masker-padding-0.json | sdcflows-estimation | brain_masker with padding=0 (try1 104): sdcflows crops with […, 0:-0, …] and writes empty probability and mask images, the brain unmasked; the replica wrote the whole image’s; registered as SDC-46 (rule A, reproduce = sdcflows’ files) | SDC-46 |
| fixedvalidation/difftest/cases/sdcflows-estimation/match-histogram-message-dtype.json | sdcflows-estimation | match_histogram of an unsigned image with a float reference, reproduced (try1 134): numpy’s bincount message names nibabel’s dtype(‘<f4’), the replica’s native dtype(‘float32’); the replica now keeps nibabel’s data types (the header’s byte order) for unscaled data | – |
| fixedvalidation/difftest/cases/sdcflows-estimation/epi-mask-watershed-notice-without-change.json | sdcflows-estimation | epi_mask (fmapb-try1: 15 cases): the watershed’s labels differ between the modes only where the brain’s dilated label is the same, and the replica named SCI-13, SCI-14 without a change; epi_mask now names them only when its mask changes (check_epi_mask’s own rule) | – |
| harnessvalidation/src/larmorx_validation/parity/fieldmaps_b_random.py | sdcflows-estimation | the estimators below a folder named like a derivatives entity (try1 92, andres-lab): SDC-45’s notice is about the entities parsed from the folders above a participant’s, which need not change the estimators found; accepted without a change (silent_ok), as part A’s SCI-02 | – |
| fixedvalidation/difftest/cases/sdcflows-estimation/reorient-rotation-with-two-candidates.json | sdcflows-estimation | ReorientImageAndMetadata of an affine whose rotation has two equal candidates (fmapb-try2 725): nibabel’s io_orientation (numpy’s SVD, LAPACK 3.12.1 in the newest environment) picks the axis; the replica used a platform-independent SVD (another axis: other directions and dim_info); it now uses lx.io.nibabel_header.io_orientation (aff2axcodes too) | – |
| fixedvalidation/investigations/sdcflows-fieldmap-b/relay28/replay_masker_cases.py | sdcflows-estimation | brain_masker cases whose random walker does not converge (fmapb-try1 216, 492): SciPy’s conjugate gradients run to their limit (2 x 162,120 iterations), 23 s in sdcflows and 209 s in the replica at one thread (relay27/slow_masker_*.py): no result within the 240 s limit; the limit is 900 s and brain_masker drawn less often; in the run 8 of 518 brain_masker cases still had no result within 900 s (the walkers that do not… | – |
validation/difftest/triage.toml (2026-11-09): each difference of the short runs before the two runs and of the two runs themselves, a mistake of the replica’s fixed with a permanent case, a defect of the original registered by the rules A to D, or a slow original.
Every case
Each case of the records, with what it tests, its command line, its verdict and the reason. Search, filter by category or verdict (or select a segment of the chart above), sort by a column; #case=<name> links to one.
57 cases
| Case | Category | What it tests | Verdict | Checks |
|---|---|---|---|---|
masker | scikit-image and the brain masker | sdcflows' brain_masker on fMRIPrep's callscommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_skimage.py --sections masker | Bit-identical Every one of its 6 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 6/6 |
masker-steps | the brain masker's steps | sdcflows' brain_masker step by step on fMRIPrep's callscommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_masker_steps.py | Bit-identical Every one of its 16 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 16/16 |
epi-mask | epi_ | sdcflows' epi_mask on synthetic images and four fMRIPrep runs' BOLD referencescommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_epi_mask.py --sections synthetic,real | Bit-identical Every one of its 26 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too; the originals’ step: 3 comparisons, 0 changed with a known reason. | 26/26 |
match-histogram | histogram matching | sdcflows' match_histogram on synthetic images and the SyN runs' anatomycommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_match_histogram.py --sections synthetic,real | Bit-identical Every one of its 37 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too; the originals’ step: 3 comparisons, 0 changed with a known reason. | 37/37 |
workflows | the field-map workflows | the brain-extraction, magnitude and field-map workflows (direct field maps)command linepython -P validation/investigations/sdcflows-fieldmap-b/check_workflows.py | Bit-identical Every one of its 53 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 53/53 |
pepolar-units | PEPOLAR | PEPOLAR's interfaces (readout times, SelectPEVolumes, SortPEBlips, UniformGrid, TOPUP's inputs, RobustAverage)command linepython -P validation/investigations/sdcflows-fieldmap-b/check_pepolar.py --sections units,ravg | Bit-identical Every one of its 27 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 27/27 |
contract-audit | the per-program contract (these families) | the per-program contract for these families: every registered _core function has its stub, every public function its API row, every source file its PROVENANCE linecommand linepython -P validation/investigations/sdcflows-fieldmap-b/relay22/audit_contract.py | Bit-identical Every one of its 6 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 6/6 |
qwarp-steps | 3dQwarp's Python steps | 3dQwarp's Python steps (Flatten, _sorted_pe, qwarp2ants) and the workflow's refusalcommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_qwarp_steps.py | Bit-identical Every one of its 22 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 22/22 |
syn-preprocessing | the fieldmap-less preprocessing | init_syn_preprocessing_wf's nodes on fMRIPrep's --use-syn-sdc runs and its library stepscommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_syn_preprocessing.py --sections nodes,library | Bit-identical Every one of its 65 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 65/65 |
syn-sdc | the fieldmap-less estimation | init_syn_sdc_wf's nodes on fMRIPrep's --use-syn-sdc estimatorscommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_syn_sdc.py --sections nodes | Bit-identical Every one of its 29 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 29/29 |
estimators | the estimators of a BIDS dataset | lx.bids' index, sdcflows' wrangler and estimators (datasets below folders named like entities too: SDC-45, PIPE-37), fMRIPrep's estimator selection on every fMRIPrep runcommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_estimators.py --sections index,wrangler,units,fmriprep,runs,apps,roots | Bit-identical Every one of its 54 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 54/54 |
derivatives | the derivatives | DerivativesDataSink, build_path, the derivatives and fmap_preproc workflowscommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_derivatives.py --sections nodes workflow synthetic | Bit-identical Every one of its 40 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 40/40 |
fmap-stage | fMRIPrep's field-map stage | larmorprepx's field-map estimation stage against fMRIPrep 25.2.6's graph and nodescommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_fmap_stage.py --sections graph nodes | Bit-identical Every one of its 46 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 46/46 |
unwarp | the unwarping | unwarp_workflow (threads, cases, errors)command linepython -P validation/investigations/sdcflows-fieldmap-b/check_unwarp.py | Bit-identical Every one of its 31 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 31/31 |
app | sdcflows' BIDS app | sdcflows' BIDS app: its parser, TOML and settingscommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_app.py --sections parser toml settings | Bit-identical Every one of its 27 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 27/27 |
app-dry-runs | sdcflows' BIDS app | sdcflows' BIDS app: dry runs and exit statusescommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_app.py --sections dryrun exits | Bit-identical Every one of its 22 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 22/22 |
bold-fmap | fMRIPrep's BOLD field-map nodes | fMRIPrep's BOLD field-map nodes (coregistration, skull strip, coeff2epi)command linepython -P validation/investigations/sdcflows-fieldmap-b/check_bold_fmap.py | Bit-identical Every one of its 34 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 34/34 |
bold-steps | fMRIPrep's BOLD field-map steps | fMRIPrep's DistortionParameters, ConcatenateXFMs, reconstruct_fieldmap, unwarpcommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_bold_steps.py | Bit-identical Every one of its 30 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 30/30 |
bold-stage | fMRIPrep's BOLD field-map stages | larmorprepx's BOLD fit field-map stages against fMRIPrep's files (PIPE-20)command linepython -P validation/investigations/sdcflows-fieldmap-b/check_bold_stage.py | Bit-identical Every one of its 38 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 38/38 |
pepolar-workflow | PEPOLAR | topup_workflow, both wirings (sdcflows 2.15 and 2.17.1), against sdcflows' own graphscommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_pepolar.py --sections wf | Bit-identical Every one of its 29 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 29/29 |
pepolar-image | PEPOLAR | the PEPOLAR steps with fMRIPrep's libraries against fMRIPrep's own node filescommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_pepolar.py --sections image | Bit-identical Every one of its 27 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 27/27 |
syn-preprocessing-workflow | the fieldmap-less preprocessing | sdcflows' own SyN preprocessing graph run by nipypecommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_syn_preprocessing.py --sections workflow | Bit-identical Every one of its 11 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 11/11 |
syn-sdc-workflow | the fieldmap-less estimation | the SyN registration against ANTs 2.6.5 and sdcflows' own graph run by nipypecommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_syn_sdc.py --sections syn,workflow | Bit-identical Every one of its 11 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 11/11 |
estimators-image | the estimators of a BIDS dataset | the estimators against fMRIPrep's own image (Apptainer)command linepython -P validation/investigations/sdcflows-fieldmap-b/check_estimators.py --sections image | Bit-identical Every one of its 4 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 4/4 |
derivatives-preproc | the derivatives | init_fmap_preproc_wf run whole against sdcflows' own runcommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_derivatives.py --sections preproc --datasets ds005752-sub-ON01016-direct | Bit-identical Every one of its 11 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 11/11 |
app-run-ds005752 | sdcflows' BIDS app | sdcflows' BIDS app run whole on ds005752-sub-ON01016-direct (a direct field map), against sdcflows' owncommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_app.py --sections run --datasets ds005752-sub-ON01016-direct | Bit-identical Every one of its 19 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 19/19 |
app-run-ds001600 | sdcflows' BIDS app | sdcflows' BIDS app run whole on ds001600-sub-1 (three phase-difference field maps, two of them from two phases, and a PEPOLAR pair), against sdcflows' owncommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_app.py --sections run --datasets ds001600-sub-1 | Bit-identical Every one of its 19 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 19/19 |
app-run-ds002422 | sdcflows' BIDS app | sdcflows' BIDS app run whole on ds002422-sub-02 (two phase differences at 1.5 T), against sdcflows' owncommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_app.py --sections run --datasets ds002422-sub-02 | Bit-identical Every one of its 19 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 19/19 |
app-run-ds002603 | sdcflows' BIDS app | sdcflows' BIDS app run whole on ds002603-sub-01 (Philips: a phase difference with one magnitude and two PEPOLAR estimators each pairing an EPI with a BOLD run), against sdcflows' owncommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_app.py --sections run --datasets ds002603-sub-01 | Bit-identical Every one of its 19 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 19/19 |
app-run-ds004958 | sdcflows' BIDS app | sdcflows' BIDS app run whole on ds004958-sub-fsm64ps-pepolar (a phase difference and a PEPOLAR pair, multiband-8), against sdcflows' owncommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_app.py --sections run --datasets ds004958-sub-fsm64ps-pepolar | Bit-identical Every one of its 19 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 19/19 |
app-run-ds005040 | sdcflows' BIDS app | sdcflows' BIDS app run whole on ds005040-sub-002 (a PEPOLAR pair), against sdcflows' owncommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_app.py --sections run --datasets ds005040-sub-002 | Bit-identical Every one of its 19 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 19/19 |
app-run-ds005454 | sdcflows' BIDS app | sdcflows' BIDS app run whole on ds005454-sub-16 (a phase difference named by its B0FieldIdentifier, multiband), against sdcflows' owncommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_app.py --sections run --datasets ds005454-sub-16 | Bit-identical Every one of its 19 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 19/19 |
app-run-ds006736 | sdcflows' BIDS app | sdcflows' BIDS app run whole on ds006736-sub-004 (a PEPOLAR pair), against sdcflows' owncommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_app.py --sections run --datasets ds006736-sub-004 | Bit-identical Every one of its 19 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 19/19 |
shared/app-run-ds005752 | sdcflows' BIDS app | sdcflows' BIDS app run whole on ds005752-sub-ON01016-direct (a direct field map), against sdcflows' own (the shared environment)command linepython -P validation/investigations/sdcflows-fieldmap-b/check_app.py --sections run --datasets ds005752-sub-ON01016-direct | Bit-identical Every one of its 19 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 19/19 |
shared/app-run-ds001600 | sdcflows' BIDS app | sdcflows' BIDS app run whole on ds001600-sub-1 (three phase-difference field maps, two of them from two phases, and a PEPOLAR pair), against sdcflows' own (the shared environment)command linepython -P validation/investigations/sdcflows-fieldmap-b/check_app.py --sections run --datasets ds001600-sub-1 | Bit-identical Every one of its 19 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 19/19 |
shared/app-run-ds002422 | sdcflows' BIDS app | sdcflows' BIDS app run whole on ds002422-sub-02 (two phase differences at 1.5 T), against sdcflows' own (the shared environment)command linepython -P validation/investigations/sdcflows-fieldmap-b/check_app.py --sections run --datasets ds002422-sub-02 | Bit-identical Every one of its 19 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 19/19 |
shared/app-run-ds002603 | sdcflows' BIDS app | sdcflows' BIDS app run whole on ds002603-sub-01 (Philips: a phase difference with one magnitude and two PEPOLAR estimators each pairing an EPI with a BOLD run), against sdcflows' own (the shared environment)command linepython -P validation/investigations/sdcflows-fieldmap-b/check_app.py --sections run --datasets ds002603-sub-01 | Bit-identical Every one of its 19 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 19/19 |
shared/app-run-ds004958 | sdcflows' BIDS app | sdcflows' BIDS app run whole on ds004958-sub-fsm64ps-pepolar (a phase difference and a PEPOLAR pair, multiband-8), against sdcflows' own (the shared environment)command linepython -P validation/investigations/sdcflows-fieldmap-b/check_app.py --sections run --datasets ds004958-sub-fsm64ps-pepolar | Bit-identical Every one of its 19 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 19/19 |
shared/app-run-ds005040 | sdcflows' BIDS app | sdcflows' BIDS app run whole on ds005040-sub-002 (a PEPOLAR pair), against sdcflows' own (the shared environment)command linepython -P validation/investigations/sdcflows-fieldmap-b/check_app.py --sections run --datasets ds005040-sub-002 | Bit-identical Every one of its 19 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 19/19 |
shared/app-run-ds005454 | sdcflows' BIDS app | sdcflows' BIDS app run whole on ds005454-sub-16 (a phase difference named by its B0FieldIdentifier, multiband), against sdcflows' own (the shared environment)command linepython -P validation/investigations/sdcflows-fieldmap-b/check_app.py --sections run --datasets ds005454-sub-16 | Bit-identical Every one of its 19 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 19/19 |
shared/app-run-ds006736 | sdcflows' BIDS app | sdcflows' BIDS app run whole on ds006736-sub-004 (a PEPOLAR pair), against sdcflows' own (the shared environment)command linepython -P validation/investigations/sdcflows-fieldmap-b/check_app.py --sections run --datasets ds006736-sub-004 | Bit-identical Every one of its 19 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 19/19 |
ndimage-quick | SciPy's ndimage | SciPy's ndimage filters, morphology, labels and sums, a quick draw of every sectioncommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_ndimage.py --quick | Bit-identical Every one of its 181 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too; the originals’ step: 77 comparisons, 26 changed with a known reason. | 181/181 |
ndimage | SciPy's ndimage | SciPy's ndimage: every filter, binary and grey morphology, labels, sums, their arguments as SciPy's and SCI-09 to SCI-30 both wayscommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_ndimage.py | Bit-identical Every one of its 181 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too; the originals’ step: 77 comparisons, 26 changed with a known reason. | 181/181 |
numpy | numpy | numpy's percentiles, medians, clips and float32 exp on seeded arrayscommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_numpy.py | Bit-identical Every one of its 15 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too; the originals’ step: 6 comparisons, 1 changed with a known reason. | 15/15 |
skimage | scikit-image and the brain masker | scikit-image's ball and threshold_otsu, numpy's dot, norm and histogramcommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_skimage.py --sections ball,dot,hist,otsu | Bit-identical Every one of its 19 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too; the originals’ step: 8 comparisons, 0 changed with a known reason. | 19/19 |
skimage-random-walker | scikit-image and the brain masker | scikit-image's random_walker (both SciPy orders, copy=False, isolated labels)command linepython -P validation/investigations/sdcflows-fieldmap-b/check_skimage.py --sections rw | Bit-identical Every one of its 14 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too; the originals’ step: 5 comparisons, 1 changed with a known reason. | 14/14 |
scipy-inv-quick | SciPy's inv | SciPy's inv on 2,000 seeded matrices per family and the edge casescommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_scipy_inv.py --n 2000 | Bit-identical Every one of its 88 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too; the originals’ step: 43 comparisons, 36 changed with a known reason. | 88/88 |
scipy-inv | SciPy's inv | SciPy's inv on 20,000 seeded matrices per family, the edge cases and the fMRIPrep runs' image affinescommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_scipy_inv.py --n 20000 | Bit-identical Every one of its 90 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too; the originals’ step: 44 comparisons, 36 changed with a known reason. | 90/90 |
gaussian-filters | regridding and Gaussian filters | SciPy's correlate1d and Gaussian filters (derivatives, complex input, long-double sigma)command linepython -P validation/investigations/sdcflows-fieldmap-b/check_regrid.py --sections filters | Bit-identical Every one of its 47 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too; the originals’ step: 21 comparisons, 0 changed with a known reason. | 47/47 |
watershed-com | epi_ | SciPy's watershed_ift (SCI-W1 to SCI-W4 both ways) and center_of_masscommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_epi_mask.py --sections watershed,com | Bit-identical Every one of its 18 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too; the originals’ step: 4 comparisons, 0 changed with a known reason. | 18/18 |
match-histograms | histogram matching | scikit-image's match_histograms on arrays (channels, types, errors)command linepython -P validation/investigations/sdcflows-fieldmap-b/check_match_histogram.py --sections arrays | Bit-identical Every one of its 7 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too; the originals’ step: 2 comparisons, 0 changed with a known reason. | 7/7 |
numpy-expf | numpy | numpy's float32 exp on every float32 value (with numpy's AVX-512 kernels and without), its working files in the case's foldercommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_numpy.py --expf | Bit-identical Every one of its 19 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too; the originals’ step: 8 comparisons, 1 changed with a known reason. | 19/19 |
merge | niworkflows' IntraModalMerge | IntraModalMerge: seeded series, errors, RAS reorientation, grand mean scalingcommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_merge.py --sections synth,errors,ras,gms | Bit-identical Every one of its 14 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 14/14 |
merge-hmc | niworkflows' IntraModalMerge | IntraModalMerge's head-motion correction (FSL's mcflirt replica) and fMRIPrep's magnitude mergescommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_merge.py --sections hmc,fmriprep | Bit-identical Every one of its 11 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 11/11 |
nipype-command-lines | nipype's command lines | nipype's command lines of every program on these paths against every fMRIPrep run's command.txtcommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_nipype.py | Bit-identical Every one of its 26 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 26/26 |
regrid | regridding and Gaussian filters | RegridToZooms (SciPy's inv, gaussian_filter, nibabel) on seeded images and fMRIPrep's callscommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_regrid.py --sections regrid,runs | Bit-identical Every one of its 10 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too; the originals’ step: 2 comparisons, 0 changed with a known reason. | 10/10 |
intensity-clip | scikit-image and the brain masker | IntensityClip on fMRIPrep's callscommand linepython -P validation/investigations/sdcflows-fieldmap-b/check_skimage.py --sections clip | Bit-identical Every one of its 7 checks: the outputs bit-identical to the originals’ (or fMRIPrep’s own files), their messages, warnings and exit statuses too. | 7/7 |
Known limits
- sdcflows’
init_3dQwarp_wf(the other PEPOLAR workflow, which sdcflows never chooses and fMRIPrep’s image cannot run) needs AFNI’s 3dQwarp, FreeSurfer’smri_robust_templateand niworkflows’init_enhance_and_skullstrip_bold_wf, not ported yet.lx.sdcflows.qwarp_workflowstops with an error naming them (SDC-23); its own Python steps are ported and checked. - sdcflows’ reports (its reportlets) are larmorprepx’s, with the pipeline’s reports.
- fMRIPrep’s BOLD steps that use the field (
B0FieldTransformin its resampler) are on their own page; the rest of fMRIPrep’s BOLD workflow comes with larmorprepx. - The comparisons with fMRIPrep stage by stage come once every tool is ported.
History
- 2026-11-08: sdcflows 2.17.1’s own BIDS app run on the eight datasets of its own runs, the reference of the app’s cases.
- 2026-11-09: the replica’s six records and its two random-testing runs, 312,081 cases.
- 2026-11-10: the replica of PEPOLAR, direct and fieldmap-less estimation, sdcflows’ masks and BIDS app, niworkflows’ helpers, the BIDS index and fMRIPrep’s field-map steps complete (the roadmap).
Data credits
The data this page shows or names: each dataset with its version, DOI and licence, from LARMORX's test-data catalog. Public-domain dedications (CC0, PDDL) ask nothing; the datasets are cited all the same.
- Children and adults watching a short film (OpenNeuro ds000228, version 1.1.1, doi:10.18112/openneuro.ds000228.v1.1.1), CC0 1.0 public-domain dedication.
- Example fieldmaps (OpenNeuro ds001600, version 1.0.0), Creative Commons Attribution-ShareAlike (CC BY-SA; the dataset gives no version). Attribution: Cieslak M., Elliott M., Satterthwaite T. Example Fieldmaps. OpenNeuro ds001600, version 1.0.0 (Siemens Prisma, University of Pennsylvania). The images shown are adapted from it: reoriented to RAS, cropped to the region shown, masked outside it, and shown as the outputs of the programs compared. Share-alike: the images adapted from this dataset are shared under the same licence, CC BY-SA.
- fMRI: resting state and arithmetic task (OpenNeuro ds002422, version 1.1.0, doi:10.18112/openneuro.ds002422.v1.1.0), CC0 1.0 public-domain dedication.
- MB-EPI-comparison (OpenNeuro ds002603, version 1.0.0, doi:10.18112/openneuro.ds002603.v1.0.0), CC0 1.0 public-domain dedication.
- Neurocognitive aging data release (OpenNeuro ds003592, version 1.0.13, doi:10.18112/openneuro.ds003592.v1.0.13), CC0 1.0 public-domain dedication.
- The FreeSurfer Maintenance Dataset (OpenNeuro ds004958, version 1.0.0, doi:10.18112/openneuro.ds004958.v1.0.0), CC0 1.0 public-domain dedication.
- Political Moralization (OpenNeuro ds005040, version 1.2.0, doi:10.18112/openneuro.ds005040.v1.2.0), CC0 1.0 public-domain dedication.
- fMRIPrep boot camp 7T training dataset (OpenNeuro ds005454, version 1.0.0, doi:10.18112/openneuro.ds005454.v1.0.0), Creative Commons Attribution 4.0 (CC BY 4.0). Attribution: Sleight EC, Esteban O, Grouiller F. fMRIPrep boot camp -- 7T training dataset. OpenNeuro ds005454, version 1.0.0. doi:10.18112/openneuro.ds005454.v1.0.0 The images shown are adapted from it: reoriented to RAS, cropped to the region shown, masked outside it, and shown as the outputs of the programs compared.
- NIMH Healthy Research Volunteer Dataset (OpenNeuro ds005752, version 2.1.0, doi:10.18112/openneuro.ds005752.v2.1.0), CC0 1.0 public-domain dedication.
- CS_fmri (OpenNeuro ds006736, version 1.0.0, doi:10.18112/openneuro.ds006736.v1.0.0), CC0 1.0 public-domain dedication.