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 larmorx Apache-2.0: crates larmorx-sdcflows and larmorx-ndimage; lx.sdcflows, lx.niworkflows, lx.ndimage, lx.skimage, lx.bids and 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
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-AP and dir-PA). sdcflows’ init_topup_wf regrids their volumes onto one grid, merges them and gives them to FSL’s topup (its b02b0 settings), 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_wf merges 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_wf with its derivatives and reports’ data sinks (niworkflows’ DerivativesDataSink), the field map’s registration to the EPI and init_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.

bash
larmorx sdcflows sdcflows /data/bids /data/out participant --participant-label 01
python
import 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, so n_threads never 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.

Agreement, 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 (standard comparison, 57 cases of the record), by category and verdict
scikit-image and the brain masker4
the brain masker's steps1
epi_mask and the watershed2
histogram matching2
the field-map workflows1
PEPOLAR3
the per-program contract (these families)1
3dQwarp's Python steps1
the fieldmap-less preprocessing2
the fieldmap-less estimation2
the estimators of a BIDS dataset2
the derivatives2
fMRIPrep's field-map stage1
the unwarping1
sdcflows' BIDS app18
fMRIPrep's BOLD field-map nodes1
fMRIPrep's BOLD field-map steps1
fMRIPrep's BOLD field-map stages1
SciPy's ndimage2
numpy2
SciPy's inv2
regridding and Gaussian filters2
niworkflows' IntraModalMerge2
nipype's command lines1

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)

RecordSuiteComparisonEnvironmentCasesPassChecksThe originals' step: compared / changed
sdcflows-estimationsdcflows-estimationstandardnewest19196096 / 0
sdcflows-estimation-fullsdcflows-estimationfullnewest1414245–
sdcflows-estimation-app-sharedsdcflows-estimationfullshared88152–
ndimage-skimagendimage-skimagestandardnewest1010660287 / 126
ndimage-skimage-fullndimage-skimagefullnewest11198 / 1
niworkflows-helpersniworkflows-helpersstandardnewest55682 / 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 in fix and in reproduce.

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.

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 sdcflows with 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 of fix, 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

Inputds006736: EPI, phase encoding APthe first volume (SelectPEVolumes' output)
Originalsdcflows 2.17.11 thread · its BIDS app; numpy 2.5.4, SciPy 1.18.1; FSL 6.0.7.23's topup, ANTs 2.6.5's N4 (one thread, correctly rounded maths), AFNI 26.3.05's 3dvolreg: LARMORX's reference
fMRIPrep's outputfMRIPrep's outputfMRIPrep 25.2.6's own files: sdcflows 2.15.1 in its image (numpy 2.2.6, SciPy 1.15.2); N4 at 8 threads, glibc's maths
Replicareplicalarmorx, Apache-2.0 · 1 thread, its BIDS app, reproduce; LARMORX's replicas underneath · against sdcflows 2.17.1
the original against itself: versions 2.15.1 and 2.17.1, with their librariesfMRIPrep's output − sdcflows 2.17.1, 1 threadscale ±144

Bit-identical274,688 of 274,688 voxels equal

the replica against the originalreplica − sdcflows 2.17.1 (both one thread)

Bit-identical274,688 of 274,688 voxels equal

the replica against fMRIPrep's outputreplica as fMRIPrep ran the stage − fMRIPrep's output
the replica against itself: fix and reproducereplica at 14 threads: fix − reproducescale ±144

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 reasonOutputmax |Δ|Values that differRMS of Δmax |Δ| ÷ range1 − 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`)00 of 274,688000
EPI reference (`desc-epi`)18 of 274,688 (0.00291 %)0.00540.003922.18e−9
Brain probability (the masker node)0.00102235,162 of 274,688 (85.6 %)4.96e−60.001021.19e−10
Brain mask (`desc-brain`)00 of 274,688000
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`)145274,687 of 274,688 (100 %)7.430.310.0251
EPI reference (`desc-epi`)187130,359 of 274,688 (47.5 %)9.590.7330.00654
Brain probability (the masker node)0.168246,881 of 274,688 (89.9 %)0.008280.1690.000319
Brain mask (`desc-brain`)1467 of 274,688 (0.17 %)0.041210.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 outputidentical: 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`)00 of 274,688000
EPI reference (`desc-epi`)1302 of 274,688 (0.11 %)0.03320.003927.94e−8
Brain probability (the masker node)0.00755245,722 of 274,688 (89.5 %)2.53e−50.007583.07e−9
Brain mask (`desc-brain`)00 of 274,688000
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 outputidentical: 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.692274,679 of 274,688 (100 %)0.02740.001483.13e−7
EPI reference (`desc-epi`)102106,176 of 274,688 (38.7 %)3.910.40.00111
Brain probability (the masker node)0.137246,692 of 274,688 (89.8 %)0.003320.1384.91e−5
Brain mask (`desc-brain`)1203 of 274,688 (0.0739 %)0.027210.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 larmorx 682ca1f16151; 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 its RUN_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.

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 sdcflows with 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 of fix, 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
Inputds005752: magnitudethe BIDS `magnitude` image as merged (magmrg)
Originalsdcflows 2.17.11 thread · its BIDS app; numpy 2.5.4, SciPy 1.18.1; FSL 6.0.7.23's topup, ANTs 2.6.5's N4 (one thread, correctly rounded maths), AFNI 26.3.05's 3dvolreg: LARMORX's reference
fMRIPrep's outputfMRIPrep's outputfMRIPrep 25.2.6's own files: sdcflows 2.15.1 in its image (numpy 2.2.6, SciPy 1.15.2); N4 at 8 threads, glibc's maths
Replicareplicalarmorx, Apache-2.0 · 1 thread, its BIDS app, reproduce; LARMORX's replicas underneath · against sdcflows 2.17.1

Bit-identical196,608 of 196,608 voxels equal

the original against itself: versions 2.15.1 and 2.17.1, with their librariesfMRIPrep's output − sdcflows 2.17.1, 1 thread

Bit-identical196,608 of 196,608 voxels equal

the replica against the originalreplica − sdcflows 2.17.1 (both one thread)

Bit-identical196,608 of 196,608 voxels equal

the replica against fMRIPrep's outputreplica as fMRIPrep ran the stage − fMRIPrep's output
the replica against itself: fix and reproducereplica at 14 threads: fix − reproducescale ±31.1

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 reasonOutputmax |Δ|Values that differRMS of Δmax |Δ| ÷ range1 − 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`)00 of 196,608000
Magnitude (`desc-magnitude`)1198 of 196,608 (0.101 %)0.03170.003926.05e−8
Brain probability (the masker node)0.00163179,346 of 196,608 (91.2 %)1.25e−50.001638.13e−10
Brain mask (`desc-brain`)00 of 196,608000
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`)00 of 196,608000
Magnitude (`desc-magnitude`)3281 of 196,608 (0.143 %)0.05070.01181.55e−7
Brain probability (the masker node)0.00381179,850 of 196,608 (91.5 %)2.62e−50.003833.56e−9
Brain mask (`desc-brain`)00 of 196,608000
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 outputidentical: 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`)00 of 196,608000
Magnitude (`desc-magnitude`)1197 of 196,608 (0.1 %)0.03170.003926.02e−8
Brain probability (the masker node)0.00163179,402 of 196,608 (91.2 %)1.25e−50.001638.14e−10
Brain mask (`desc-brain`)00 of 196,608000
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 outputidentical: 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.1196,608 of 196,608 (100 %)1.540.07960.00221
Magnitude (`desc-magnitude`)11372,470 of 196,608 (36.9 %)6.960.4430.00283
Brain probability (the masker node)0.411180,531 of 196,608 (91.8 %)0.01130.4130.000639
Brain mask (`desc-brain`)1852 of 196,608 (0.433 %)0.065810.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 larmorx 682ca1f16151; 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 its RUN_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' runEstimatorsChecks, newestChecks, sharedsdcflows (s)replica (s)
ds005752-sub-ON01016-directa direct field map19/1919/19214
ds001600-sub-1three phase-difference field maps, two of them from two phases, and a PEPOLAR pair19/1919/19––
ds002422-sub-02two phase differences at 1.5 T19/1919/19277
ds002603-sub-01Philips: a phase difference with one magnitude and two PEPOLAR estimators each pairing an EPI with a BOLD run19/1919/19––
ds004958-sub-fsm64ps-pepolara phase difference and a PEPOLAR pair, multiband-819/1919/19––
ds005040-sub-002a PEPOLAR pair19/1919/1910387
ds005454-sub-16a phase difference named by its B0FieldIdentifier, multiband19/1919/195023
ds006736-sub-004a PEPOLAR pair19/1919/197956

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 runNIfTI filesidenticaldata identical, FSL's build string in descripafter an N4 nodethe replica's stage
every run36131310–
ds005752-sub-ON01016-noreconall-direct43011 s
ds001600-sub-1-noreconall1666479 s
ds005040-sub-002-noreconall402232 s
ds002422-sub-02-noreconall84222 s
ds006736-sub-004-noreconall403152 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_wf brings the anatomical image, its brain mask and an atlas of where distortion occurs into the EPI’s space;
  • init_syn_sdc_wf registers 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-sdc case); the replica at commit f786069d2750, 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
Inputds000228: the EPI referencethe workflow's epi_ref (syn_preprocessing's clip_bg_noise), as fMRIPrep gave it
OriginalANTs antsRegistration 2.6.5, correctly rounded maths1 thread · the GCC 14.3 build with CORE-MATH's functions preloaded, on fMRIPrep's command line; sdcflows' steps after it: LARMORX's reference
fMRIPrep's outputfMRIPrep's outputfMRIPrep 25.2.6's own files: its image's ANTs 2.6.2.dev1 at 4 threads, glibc's maths
Replicareplicalarmorx, Apache-2.0 · 14 threads, lx.sdcflows.syn_sdc_workflow on fMRIPrep's inputs, reproduce; its antsRegistration computes ANTs' one-thread result at any thread count · against ANTs antsRegistration 2.6.5, correctly rounded maths
the original against itself: 1 and 4 threadsANTs antsRegistration 2.6.5 with glibc's maths: 4 threads − 1 threadscale ±1.8
the original against itself: fMRIPrep's build and the repository'sfMRIPrep's output (ANTs 2.6.2.dev1) − ANTs antsRegistration 2.6.5, both at 4 threads with glibc's mathsscale ±1.8

Bit-identical131,072 of 131,072 voxels equal

the replica against the original: correctly rounded mathsreplica (14 threads) − ANTs antsRegistration 2.6.5, 1 thread, correctly rounded maths
the replica against fMRIPrep's outputreplica − fMRIPrep's outputscale ±1.8

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 reasonOutputmax |Δ|Values that differRMS of Δmax |Δ| ÷ range1 − 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.0159131,067 of 131,072 (100 %)0.002080.0002318.8e−8
Corrected EPI reference (`_sdc`)474,904 of 131,072 (57.1 %)0.01440.01421.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.7131,072 of 131,072 (100 %)0.1310.02480.000337
Corrected EPI reference (`_sdc`)1774,965 of 131,072 (57.2 %)0.20.06052.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.701131,072 of 131,072 (100 %)0.02790.01031.3e−5
Corrected EPI reference (`_sdc`)474,932 of 131,072 (57.2 %)0.05490.01421.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.697131,071 of 131,072 (100 %)0.03050.01021.87e−5
Corrected EPI reference (`_sdc`)1174,934 of 131,072 (57.2 %)0.06360.03912.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 outputsidentical: 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.8131,071 of 131,072 (100 %)0.1360.02630.000362
Corrected EPI reference (`_sdc`)1774,967 of 131,072 (57.2 %)0.1850.06052.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.82131,071 of 131,072 (100 %)0.04090.0123.37e−5
Corrected EPI reference (`_sdc`)5.0974,915 of 131,072 (57.2 %)0.07710.01813.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 larmorx f786069d2750; 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 its RUN_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.

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-Mm2 magnitude 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_masker at commit 26df46d1a985; 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
Inputds002603: magnitude, clipped and N4-correctedthe masker node's input (niworkflows' IntensityClip, ANTs' N4, IntensityClip again)
Originalsdcflows brain_masker 2.17.1numpy 2.5.4, SciPy 1.18.1, scikit-image 0.26.0: LARMORX's reference
fMRIPrep's outputfMRIPrep's outputfMRIPrep 25.2.6's own files: sdcflows 2.15.1 in its image: numpy 2.2.6, SciPy 1.15.2
Replicareplicalarmorx, Apache-2.0 · 1 thread, reproduce · against sdcflows brain_masker 2.17.1
the original against itself: fMRIPrep's libraries and the newest releasesfMRIPrep's output − sdcflows brain_masker 2.17.1, the newest releasesscale ±1.19e−6

Bit-identical2,097,152 of 2,097,152 voxels equal

the replica against the originalreplica − sdcflows brain_masker 2.17.1

Bit-identical2,097,152 of 2,097,152 voxels equal

the replica against fMRIPrep's outputreplica with fMRIPrep's libraries − fMRIPrep's output

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 reasonOutputmax |Δ|Values that differRMS of Δmax |Δ| ÷ range1 − 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−61,891,835 of 2,097,152 (90.2 %)9.8e−81.19e−65.95e−14
Brain mask00 of 2,097,152000
Masked magnitude00 of 2,097,152000
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 outputidentical: 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 outputidentical: 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 outputidentical: 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 larmorx 26df46d1a985; 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 its RUN_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.

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 reproduce 12,843, in fix 51,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_mask at commit 26df46d1a985
Grid
64 × 64 × 43 voxels of 3.38 × 3.38 × 3 mm; shown: 52 × 58 × 43 around the brain
Inputds003592: BOLD referencefMRIPrep's `desc-hmc_boldref`, epi_mask's input
Inputds003592: fMRIPrep's brain mask`desc-brain_mask` (niworkflows' skull stripping), the independent reference
Originalsdcflows epi_mask 2.17.1SciPy 1.18.1's watershed_ift: LARMORX's reference
Replicareplicalarmorx, Apache-2.0 · fix (the default): the corrected watershed (SCI-13, SCI-14)

Bit-identical176,128 of 176,128 voxels equal

the replica against the originalreplica, reproduce − sdcflows epi_mask 2.17.1
the replica against itself: fix and reproducereplica: fix − reproducescale ±1

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 reasonmax |Δ|Values that differRMS of Δmax |Δ| ÷ range1 − 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-14138,319 of 176,128 (21.8 %)0.46610.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 larmorx 26df46d1a985; 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 its RUN_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

ReferencefMRIPrep's masksdcflows: voxelsDiceoutside fMRIPrep'sfix: voxelsDiceoutside fMRIPrep'sreproduce = sdcflowsnamed by fix
ds003592 (64 × 64 × 43)42,46412,8430.4641051,1620.9048,828identicalSCI-13, SCI-14
ds000228 (64 × 64 × 32)39,159131,0720.4691,91347,0810.9067,998identicalSCI-13, SCI-14
ds005040 (64 × 64 × 40)51,89115,8820.469016,1060.4747identicalSCI-13, SCI-14
ds004958 (104 × 104 × 72)171,4001430.0016701430.001670identical–

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)

EntryOriginalClassWhat the original doesfMRIPrep's callsWhat the replica doesSwitch
SDC-12sdcflows ReorientImageAndMetadatacchecks the upper-cased orientation code but reorients to the code as given: a lower-case one (las) fails in nibabelnone (fMRIPrep’s PEPOLAR wiring passes LAS)rule A: the upper-cased code; reproduce nibabel’s error (lx.sdcflows, field maps part B)yes
SDC-13sdcflows Deoblique, Reobliquecnibabel’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 positionthe SyN runs’ EPIs (oblique up to 20.7°): left as they arerule 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-14sdcflows _norm_lapcan image with no positive (or no negative) value after the median’s subtraction fails with numpy’s IndexError (the percentile of nothing)nonerule B: a ValueError saying so; reproduce numpy’s IndexErroryes
SDC-15sdcflows init_syn_sdc_wfcthe zooms_epi node regrids the clipped EPI and nothing reads itevery SyN run (dead work)rule C: kept as sdcflows (no result depends on it); the replica does not compute it–
SDC-16sdcflows _warp_dircthe 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 axisnone (fMRIPrep’s SyN EPIs are axial)rule A: the phase encoding’s world axis; reproduce sdcflows’ position, with a warningyes
SDC-17sdcflows find_estimators (2.17.1)cbids_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 noticesyes
SDC-18sdcflows bidictca new estimator gets the last free auto_ index in range(len(used) + 1), not the firstevery run with unnamed estimators (the names in its derivatives)rule C: kept (the names are in fMRIPrep’s and sdcflows’ derivatives and logs)–
SDC-19sdcflows find_estimatorsbthe named estimators are built in a set’s order, which changes between processesruns with several named estimators (their order)pybids’ natural order in both modes (nondeterminism is never reproduced)–
SDC-20sdcflows get_identifierfthe KeyError for an unknown index table is the raw string ‘{by}’nonerule A (a message): the table’s name; reproduce the literal textyes
SDC-21sdcflows find_estimatorsccase-insensitive regex filters: subject 01 matches 010, part-mag matches part-imag, pe matches PE: other subjects’ or identifiers’ files join the estimatordatasets with list-valued B0FieldIdentifiers and several subjects in one indexrule A: exact filters and list membership; reproduce sdcflows’yes
SDC-22sdcflows get_workflow, init_fmap_preproc_wfeevery keyword argument goes to the estimator’s init_*_wf, which ignores the ones it does not take: a misspelt option is ignorednonerule B: a TypeError for an argument no estimator workflow takes; reproduce sdcflows’yes
SDC-23sdcflows init_3dQwarp_wfainputnode.in_reference is connected but not declared (in_data, metadata): its fmap_ref can never be computednone (fMRIPrep does not run 3dQwarp’s estimation)the workflow waits for 3dQwarp’s port (NotImplementedError); then rule B, a clear error–
SDC-24sdcflows _qwarp2antscnp.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 fieldnonerule A: only the axes after the third dropped; reproduce sdcflows’yes
SDC-25sdcflows init_unwarp_wfcthe output documented as the displacement field is never connected: nipype leaves it undefinednone (no caller reads it)rule C: kept (None); the same field is B0FieldTransform.to_displacements–
SDC-26sdcflows init_unwarp_wf, ApplyCoeffsFieldefmap2data_xfm and data2fmap_xfm, declared exclusive, are both set by the graph and data2fmap_xfm wins without a wordnonerule B: a ValueError; reproduce sdcflows’yes
SDC-27sdcflows match_histogramamatched 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 castsyes
SDC-28sdcflows epi_maskanp.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 0yes
SDC-29sdcflows’ BIDS appea participant without field maps gets SyN estimators without their anatomical inputs: they fail when run, after the other estimators’ worknone (fMRIPrep wires them)rule B: the run stops before any work naming them and --no-fmapless; reproduce sdcflows’ order and failureyes
SDC-30sdcflows’ BIDS apperecorded and never used: every session is estimatednonerule A: the sessions given; reproduce every sessionyes
SDC-31sdcflows’ BIDS apperead and never usednonerule A: its fmap entry restricts the field maps (fMRIPrep’s convention); reproduce ignoredyes
SDC-32sdcflows’ BIDS apperecorded, and every estimator built with sloppy=False, debug=Falsenonerule A: they reach the workflows; reproduce ignoredyes
SDC-33sdcflows’ BIDS appea --mem-gb unit _to_gb cannot look up, a missing or non-JSON --bids-filter-file, a missing --use-plugin file: a traceback, exit 1nonerule B: argparse’s error (exit 2); reproduce the tracebackyes
SDC-34sdcflows’ BIDS appba non-integer --nprocs is named by a functools.partial representation; missing labels and analysis_level in a set’s ordernoneinvalid _min_one value; sorted (nondeterminism is never reproduced)–
SDC-35sdcflows’ BIDS appethe file is read with PyYAML’s load without the Loader PyYAML 6 requires (TypeError)nonerule A: accepted (it must exist; no effect); reproduce the TypeErroryes
SDC-36sdcflows’ BIDS appcone registry for every participant: two participants with the same B0FieldIdentifier (unique only within a participant in BIDS) stop it with KeyErrornone (fMRIPrep: PIPE-32)rule A: a registry per participant (the automatic names kept); reproduce the KeyErroryes
SDC-37sdcflows brain_maskercthe rough mask’s largest component is the background (size 0): the whole image is the brain; a constant image divides 0 by 0nonerule B: a ValueError; reproduce sdcflows’yes
SDC-38sdcflows brain_maskercwith 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’snonerule B: a ValueError; reproduce sdcflows’yes
SDC-39sdcflows brain_maskerc?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-40sdcflows’ BIDS appethe database is built first, so an output folder equal to the dataset (refused next) gets .bids_db written into the datasetnoneThe replica writes no database (nothing to reproduce)–
SDC-41sdcflows configaos.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-42sdcflows init_sdcflows_wfcthe figures are named desc-EstimatorType.PEPOLAR_fieldmap.svg (the enum’s text), not the method’s namesdcflows’ app’s reports (fMRIPrep names them itself)the reports are larmorprepx’s (D7): rule A there, reproduce the enum’s text–
SDC-43sdcflows get_trtfa zero or empty TotalReadoutTime raises ValueError whose message is only the value in quotes (‘0’)nonethe same message (kept)–
SDC-44sdcflows _warp_dirfthe oblique-dataset message goes through Logger.warn (a DeprecationWarning)every oblique SyN run (a deprecation warning)the same message through warning–
SDC-45sdcflows FieldmapFile, find_anatomical_estimatorsaFieldmapFile 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 erroryes
SDC-46sdcflows brain_maskerathe 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 brainyes
PIPE-18niworkflows IntraModalMergecgrand_mean_scaling indexes the series with a mask of the wrong shape: numpy’s IndexError for every series of two or more volumesnone (fMRIPrep leaves it off)rule A: each volume scaled by the largest median over its own in the mask, with a warning; reproduce the IndexErroryes
PIPE-19niworkflows IntraModalMergeca 6- or 7-dimensional image passes the check for more than four dimensions and is averaged over its fourth axisnonerule B: niworkflows’ own error; reproduce numpy’s meanyes
PIPE-20fMRIPrep DistortionParametersca missing readout time or phase-encoding direction becomes undefined outputs: the run is resampled without its field map, the report still names the correctionBOLD runs without readout metadata whose estimator has itthe 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 warningyes
PIPE-21fMRIPrep ReconstructFieldmapcthe 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 targetdirect field maps on LAS targets (the SyN runs’ path)rule A: the values on the target’s grid; reproduce fMRIPrep’s imageyes
PIPE-22nitransforms (fMRIPrep’s itk_mat2txt)c?the desc-fmap_xfm parameters written with “%g”, read back by every later ReconstructFieldmapevery run with a field map (corners within 7.9e-05 mm)rule C: kept (a correction measured to bring no gain)–
PIPE-23nipype is_outlier (NonsteadyStatesDetector)ca median absolute deviation of 0 makes the values at the median 0/0, NaN outliers: every leading volume non-steadynone in the fMRIPrep runs (a constant or padded series)rule A: a z-score of 0 at the median; reproduce nipype’syes
PIPE-24niworkflows ValidateImagecnibabel’s get_xyzt_units raises KeyError for a spatial unit code 4 to 7nonerule A: the translation reported in mm; reproduce the KeyErroryes
PIPE-25fMRIPrep get_estimatorcwith several B0FieldIdentifier values on the sources, the estimator is named after one in a set’s order; a run whose B0FieldSource is another gets nonedatasets with aliases (sdcflows’ own test data)rule A: the alias reaches its estimator, with a warning; reproduce fMRIPrep’syes
PIPE-26niworkflows DerivativesDataSinkbwith two or more list-valued entity inputs the files are matched to the names in a Python set’s ordernone (fMRIPrep’s field-map sinks have one)the entities’ sorted order, with a warning (nondeterminism is never reproduced)yes
PIPE-27niworkflows DerivativesDataSinkf“from float32 to float32”: the original type named twiceevery coerced derivative’s log linerule A (a message): the new type; reproduce niworkflows’ textyes
PIPE-28niworkflows DerivativesDataSinkefewer compress values than files (but more than one): Python’s IndexErrornonerule B: a ValueError; reproduce the IndexErroryes
PIPE-29niworkflows DerivativesDataSinkavalues out of the integer type’s range and NaN cast with numpy’s cast (undefined in C)none in the fMRIPrep runsthe rule of the corrections by default: clamped (NaN to 0) with a warning; reproduce x86-64’s castsyes
PIPE-30niworkflows DerivativesDataSinkcthe header fix sets four voxel sizes on an image that is not 4-D: nibabel’s HeaderDataErrornonerule A: the fourth size only on a 4-D image, the sidecar with the value; reproduce the erroryes
PIPE-31fMRIPrep init_single_subject_wfederivatives lacking the field map, reference or coefficients file stop the graph’s construction with a bare KeyError–derivatives users with incomplete field-map derivativesrule B: a ValueError naming the identifier and the files; reproduce the KeyErroryes
PIPE-32fMRIPrep map_fieldmap_estimationcevery participant of a run goes into sdcflows’ one registry: a second participant with a B0FieldIdentifier an earlier one used stops it with KeyError: “‘’ is already in mapping”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 KeyErroryes
PIPE-33niworkflows IntensityClipcan image constant between its percentiles divided by its maximum, 0: NaN, cast to int16/uint8 by an undefined conversion (0 on x86-64)nonerule B: a ValueError; reproduce niworkflows’ result with x86-64’s NaN and casts on every platformyes
PIPE-34niworkflows RobustAverageca gathered volume whose mean is 0 after the clipping is divided by it: NaN or infinite voxels, registered and averagednonerule B: a ValueError naming the volumes; reproduce niworkflows’yes
PIPE-35niworkflows resample_by_spacing, RegridToZoomsc?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-36fMRIPrep extract_entities, get_sbrefs, collect_derivatives’ entitiesaextract_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 entityevery 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-37pybids BIDSLayout (BIDSLayoutIndexer)athe 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 resa 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-38nipype DenoiseImage (CommandLine._list_outputs)cnipype lists every name_source input’s file name, so noise_image (_noise) is among the outputs without save_noise or noise_image, a file the program never writesnone (fMRIPrep and sdcflows use output_image only)rule C: nipype’s listing kept (larmorx._nipype.denoise_image; nothing the replica runs reads it)–
PIPE-39nipype BaseInterface.aggregate_outputsbthe 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-40niworkflows IntraModalMergeawith 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-01scikit-image random_walkercwith 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’syes
SKI-02scikit-image match_histogramscan unsigned image’s reference counted with bincount: a float or negative reference, or a uint64 image, refusednone (no workflow calls it)rule A: counted with unique, scikit-image’s result wherever it gives one; reproduce its erroryes
SKI-03scikit-image random_walkerclabels 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’syes
SKI-04scikit-image random_walkercreturn_full_prob with no pixel to segment returns the seeds’ boolean masks along the last axis, not (nlabels, …) probabilitiesnonerule A: the documented probabilities, with a warning; reproduce scikit-image’syes
SCI-06SciPy binary_erosion, binary_dilationaan origin that puts the centre before the structure: a segmentation fault or memory’s valuesnonerule B: ValueError(“invalid origin”) (never reproduced)–
SCI-07SciPy n-dimensional filtersaa coordinate two whole periods before an axis maps to index -1 (a footprint over eight times the axis)noneindex 0, the reflection’s value (never reproduced)–
SCI-08SciPy _rank_filter_1daa window much larger than the input, or a large wrap origin, reads before or after itnonethe mode’s extension (never reproduced)–
SCI-09SciPy rank_filter, median_filter, percentile_filtercon a 1-D input the running rank takes the footprint’s whole window, its false elements includednone (sdcflows’ filters are 3-D)rule A: the n-dimensional filter, with a warning; reproduce SciPy’syes
SCI-10SciPy binary morphologycmore 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’syes
SCI-11SciPy binary morphologyauntil nothing changes, with a structure whose centre is false: two states alternate for evernonerule B: RuntimeError when a state repeats (never reproduced)–
SCI-12SciPy grey morphologyc?the structure’s values added in the input’s type (a uint8 dilation wraps), the running result in doublenone (float images)rule C: kept (SciPy’s definition)–
SCI-13SciPy watershed_iftcneighbours by C-order offsets checked only against the size: the last element of a row neighbours the first of the nextnone (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 1yes
SCI-14SciPy watershed_iftcan element alone in its queue is not taken out when its cost drops: queues join, elements are never processed or processed at the wrong levelnone (sdcflows’ epi_mask only)rule A (with SCI-13’s measurement): corrected by default, reproduce SciPy’syes
SCI-15SciPy watershed_iftcmarkers and labels read as C ints: 2**32 + 5 is 5nonerule A: 64 bits; reproduce SciPy’syes
SCI-16SciPy watershed_iftaabove 2 GiB of input or output it reads and writes outside its arraysnone64-bit offsets in both modes, with a warning (never reproduced)yes
SCI-17SciPy 1.15 _rank_filter_1dcan input shorter than half the footprint returns before writing (gh-23293)nonefixed in SciPy 1.18, which the replica follows in both modes–
SCI-18SciPy 1.18.1 scipy.linalg.invcfor 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 warningnone (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 factorsyes
SCI-19SciPy 1.18.1 scipy.linalg.invfthe 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-20SciPy 1.18.1 scipy.linalg.invffor 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-21SciPy rank_filter, median_filter, percentile_filter (_rank_filter_1d)afor 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-22SciPy rank_filter, median_filter, percentile_filter (_rank_filter_1d)cthe 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 bothnonerule A: filtered (the native copy’s result), with a notice; reproduce SciPy’s errorsyes
SCI-23SciPy rank_filter, median_filter, percentile_filter (_rank_filter_1d)finto 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 releaseyes
SCI-24SciPy 1.15.3 _rank_filter_1dfan error its C++ raises (a longlong input, a cval its type cannot take) is left set while it returns None: CPython raises SystemError: returned a result with an exception setnonefixed in SciPy 1.18.1 (it checks PyErr_Occurred), whose error the replica gives in both modes–
SCI-25SciPy binary_erosion, binary_closing (NI_BinaryErosion2)afor 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’syes
SCI-26SciPy binary_erosion, binary_dilation, binary_opening, binary_closing, binary_propagation, binary_fill_holes (Py_BinaryErosion2)fthe 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 backnone (a warning)rule A (the values are right): no warning by default; reproduce numpy’s warning, its text by the running numpy’s releaseyes
SCI-27SciPy label (_ni_label._label)cCython’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)nonerule A: labelled as the native copy (the labels written into a big-endian output), with a notice; reproduce SciPy’s erroryes
SCI-28SciPy label (_ni_label._label)fthe labels are written through the output’s data pointer whatever its flagsnonerule 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-29SciPy label (_ni_label._label)aa 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)nonerule 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-30SciPy sum_labels, sum, center_of_mass (_stats)fwith 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 IndexErrornonerule 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 errorsyes
SCI-31SciPy binary_erosion, binary_dilation, binary_opening, binary_closing, binary_propagation (NI_BinaryErosion2)athe 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-32SciPy binary_dilation, binary_propagation, binary_fill_holes, the dilations of binary_opening and binary_closing (NI_BinaryErosion2)awith 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 unaffectednone (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

CaseComparisonsChangedReasons
every case303127–
ndimage-skimage/ndimage-quick7726NUMPY-2.4-SCALAR, NUMPY-2.5-WRITEBACK-TEXT, SCIPY-1.16-SCI-17, SCIPY-1.18-SCI-24
ndimage-skimage/ndimage7726NUMPY-2.4-SCALAR, NUMPY-2.5-WRITEBACK-TEXT, SCIPY-1.16-SCI-17, SCIPY-1.18-SCI-24
ndimage-skimage/numpy61NUMPY-2.5-PERCENTILE-RANGE
ndimage-skimage/skimage-random-walker51SCIPY-1.16-ROW-ORDER
ndimage-skimage/scipy-inv-quick4336SCIPY-1.18-INV
ndimage-skimage/scipy-inv4436SCIPY-1.18-INV
ndimage-skimage/numpy-expf81NUMPY-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 (IntensityClip and RobustAverage’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).
Speed, 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

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
  1. brain_masker: ds002603's magnitudethe original, 1 thread 8.04 sreplica, 1 thread 6.93 sreplica, 14 threads 2.47 s1.2×
  2. IntensityClip: ds002603's magnitudethe original, 1 thread 1.4 sreplica, 1 thread 1.63 sreplica, 14 threads 0.189 s0.86×
  3. 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×
  4. ReconstructFieldmap: ds005454 onto its T1wthe original, 1 thread 0.891 sreplica, 1 thread 0.3 sreplica, 14 threads 0.14 s3×
  5. the BIDS app: ds005752-sub-ON01016-directthe original, 1 thread 21 sreplica, 1 thread 4 s5.2×
  6. the BIDS app: ds005454-sub-16the original, 1 thread 50 sreplica, 1 thread 23 s2.2×
  7. the BIDS app: ds002422-sub-02the original, 1 thread 27 sreplica, 1 thread 7 s3.9×
  8. the BIDS app: ds005040-sub-002the original, 1 thread 103 sreplica, 1 thread 87 s1.2×
  9. the BIDS app: ds006736-sub-004the original, 1 thread 79 sreplica, 1 thread 56 s1.4×
  10. random walker that does not converge (random testing's case)the original, 1 thread 22 sreplica, 1 thread 0.0529 s4.2e2×
0.01 s0.1 s1 s10 s100 s1000 s

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)

Callthe originalreplica, reproducereplica, fixreplica ÷ the original
sdcflows’ brain_masker, ds002603’s magnitude (128 × 128 × 128 padded)1,4394284320.3
niworkflows’ IntensityClip, ds002603’s merged magnitude14484850.591
niworkflows’ RobustAverage’s own steps, ds004958’s PEPOLAR series1501081080.724
fMRIPrep’s ReconstructFieldmap, ds005454 onto its T1w grid1,4402302290.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 original180,542131,539
sdcflows-estimation13,122 cases: 13,116 agree, 6 timeout; 49 options drawn9,584 cases: 9,582 agree, 2 timeout; 49 options drawn
ndimage-skimage100,483 cases: 86,195 agree, 14,288 skipped; 707 options drawn73,201 cases: 73,201 agree; 622 options drawn
niworkflows-helpers66,937 cases: 54,798 agree, 12,139 skipped; 31 options drawn48,754 cases: 48,754 agree; 31 options drawn
length (minutes)47.748.4
seed, the replica’s commitfmapb-trial, e88326b608fcfmapb-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

StatusToolWhat it wasRegister
registervalidation/difftest/cases/ndimage-skimage/binary-erosion-int8-mask-overwritten.jsonndimage-skimagean 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.pyndimage-skimagefmapb-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.jsonndimage-skimagerandom_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.jsonndimage-skimagebinary_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.jsonniworkflows-helpersDenoiseImage without save_noise (try1 35, 41): nipype lists noise_image (_noise) as it lists every name_source output, a file the program does not write; the replica’s formatter left it out; rule C: nipype’s listing keptPIPE-38
harnesspython/larmorx/_nipype.pyniworkflows-helpersantsApplyTransforms 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.jsonniworkflows-helpersIntraModalMerge 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.jsonsdcflows-estimationGetReadoutTime 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.pysdcflows-estimationone 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.jsonsdcflows-estimationUniformGrid 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.jsonsdcflows-estimationbrain_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.jsonsdcflows-estimationbrain_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.jsonsdcflows-estimationmatch_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.jsonsdcflows-estimationepi_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.pysdcflows-estimationthe 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.jsonsdcflows-estimationReorientImageAndMetadata 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.pysdcflows-estimationbrain_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

CaseCategoryWhat it testsVerdictChecks
maskerscikit-image and the brain maskersdcflows' brain_masker on fMRIPrep's calls
command 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-stepsthe brain masker's stepssdcflows' brain_masker step by step on fMRIPrep's calls
command 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-maskepi_mask and the watershedsdcflows' epi_mask on synthetic images and four fMRIPrep runs' BOLD references
command 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-histogramhistogram matchingsdcflows' match_histogram on synthetic images and the SyN runs' anatomy
command 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
workflowsthe field-map workflowsthe 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-unitsPEPOLARPEPOLAR'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-auditthe 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 line
command 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-steps3dQwarp's Python steps3dQwarp's Python steps (Flatten, _sorted_pe, qwarp2ants) and the workflow's refusal
command 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-preprocessingthe fieldmap-less preprocessinginit_syn_preprocessing_wf's nodes on fMRIPrep's --use-syn-sdc runs and its library steps
command 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-sdcthe fieldmap-less estimationinit_syn_sdc_wf's nodes on fMRIPrep's --use-syn-sdc estimators
command 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
estimatorsthe estimators of a BIDS datasetlx.bids' index, sdcflows' wrangler and estimators (datasets below folders named like entities too: SDC-45, PIPE-37), fMRIPrep's estimator selection on every fMRIPrep run
command 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
derivativesthe derivativesDerivativesDataSink, build_path, the derivatives and fmap_preproc workflows
command 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-stagefMRIPrep's field-map stagelarmorprepx's field-map estimation stage against fMRIPrep 25.2.6's graph and nodes
command 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
unwarpthe unwarpingunwarp_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
appsdcflows' BIDS appsdcflows' BIDS app: its parser, TOML and settings
command 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-runssdcflows' BIDS appsdcflows' BIDS app: dry runs and exit statuses
command 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-fmapfMRIPrep's BOLD field-map nodesfMRIPrep'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-stepsfMRIPrep's BOLD field-map stepsfMRIPrep's DistortionParameters, ConcatenateXFMs, reconstruct_fieldmap, unwarp
command 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-stagefMRIPrep's BOLD field-map stageslarmorprepx'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-workflowPEPOLARtopup_workflow, both wirings (sdcflows 2.15 and 2.17.1), against sdcflows' own graphs
command 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-imagePEPOLARthe PEPOLAR steps with fMRIPrep's libraries against fMRIPrep's own node files
command 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-workflowthe fieldmap-less preprocessingsdcflows' own SyN preprocessing graph run by nipype
command 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-workflowthe fieldmap-less estimationthe SyN registration against ANTs 2.6.5 and sdcflows' own graph run by nipype
command 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-imagethe estimators of a BIDS datasetthe 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-preprocthe derivativesinit_fmap_preproc_wf run whole against sdcflows' own run
command 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-ds005752sdcflows' BIDS appsdcflows' BIDS app run whole on ds005752-sub-ON01016-direct (a direct field map), against sdcflows' own
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
app-run-ds001600sdcflows' BIDS appsdcflows' 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
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
app-run-ds002422sdcflows' BIDS appsdcflows' BIDS app run whole on ds002422-sub-02 (two phase differences at 1.5 T), against sdcflows' own
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
app-run-ds002603sdcflows' BIDS appsdcflows' 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
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
app-run-ds004958sdcflows' BIDS appsdcflows' BIDS app run whole on ds004958-sub-fsm64ps-pepolar (a phase difference and a PEPOLAR pair, multiband-8), against sdcflows' own
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
app-run-ds005040sdcflows' BIDS appsdcflows' BIDS app run whole on ds005040-sub-002 (a PEPOLAR pair), against sdcflows' own
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
app-run-ds005454sdcflows' BIDS appsdcflows' BIDS app run whole on ds005454-sub-16 (a phase difference named by its B0FieldIdentifier, multiband), against sdcflows' own
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
app-run-ds006736sdcflows' BIDS appsdcflows' BIDS app run whole on ds006736-sub-004 (a PEPOLAR pair), against sdcflows' own
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
shared/app-run-ds005752sdcflows' BIDS appsdcflows' 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-ds001600sdcflows' BIDS appsdcflows' 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-ds002422sdcflows' BIDS appsdcflows' 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-ds002603sdcflows' BIDS appsdcflows' 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-ds004958sdcflows' BIDS appsdcflows' 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-ds005040sdcflows' BIDS appsdcflows' 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-ds005454sdcflows' BIDS appsdcflows' 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-ds006736sdcflows' BIDS appsdcflows' 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-quickSciPy's ndimageSciPy's ndimage filters, morphology, labels and sums, a quick draw of every section
command 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
ndimageSciPy's ndimageSciPy's ndimage: every filter, binary and grey morphology, labels, sums, their arguments as SciPy's and SCI-09 to SCI-30 both ways
command 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
numpynumpynumpy's percentiles, medians, clips and float32 exp on seeded arrays
command 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
skimagescikit-image and the brain maskerscikit-image's ball and threshold_otsu, numpy's dot, norm and histogram
command 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-walkerscikit-image and the brain maskerscikit-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-quickSciPy's invSciPy's inv on 2,000 seeded matrices per family and the edge cases
command 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-invSciPy's invSciPy's inv on 20,000 seeded matrices per family, the edge cases and the fMRIPrep runs' image affines
command 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-filtersregridding and Gaussian filtersSciPy'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-comepi_mask and the watershedSciPy's watershed_ift (SCI-W1 to SCI-W4 both ways) and center_of_mass
command 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-histogramshistogram matchingscikit-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-expfnumpynumpy's float32 exp on every float32 value (with numpy's AVX-512 kernels and without), its working files in the case's folder
command 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
mergeniworkflows' IntraModalMergeIntraModalMerge: seeded series, errors, RAS reorientation, grand mean scaling
command 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-hmcniworkflows' IntraModalMergeIntraModalMerge's head-motion correction (FSL's mcflirt replica) and fMRIPrep's magnitude merges
command 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-linesnipype's command linesnipype's command lines of every program on these paths against every fMRIPrep run's command.txt
command 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
regridregridding and Gaussian filtersRegridToZooms (SciPy's inv, gaussian_filter, nibabel) on seeded images and fMRIPrep's calls
command 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-clipscikit-image and the brain maskerIntensityClip on fMRIPrep's calls
command 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’s mri_robust_template and niworkflows’ init_enhance_and_skullstrip_bold_wf, not ported yet. lx.sdcflows.qwarp_workflow stops 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 (B0FieldTransform in 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.