Skip to content

Conversation

effigies
Copy link
Member

These are changes that are patched in to the epi_reference_wf in SyN-SDC in https://github.com/nipreps/fmriprep-rodents/pull/55/files.

The expected diff would be:

             syn_preprocessing_wf = init_syn_preprocessing_wf(
                 omp_nthreads=config.nipype.omp_nthreads,
                 debug=config.execution.debug is True,
                 auto_bold_nss=True,
                 t1w_inversion=False,
+                n4_iterations=[50] * 4,
+                n4_shrink_factor=1,
+                calculate_n4_spline_grid=True,
                 name=f"syn_preprocessing_{estimator.bids_id}",
             )
             syn_preprocessing_wf.inputs.inputnode.in_epis = sources
             syn_preprocessing_wf.inputs.inputnode.in_meta = source_meta
-
-            #  The default N4 shrink factor (4) appears to artificially blur values across
-            #  anisotropic voxels. Shrink factors are intended to speed up calculation
-            #  but in most cases, the extra calculation time appears to be minimal.
-            syn_preprocessing_wf.inputs.epi_reference_wf.n4_avgs.shrink_factor = 1
-            #  Similarly, the use of an asymmetric bspline grid improves performance
-            #  in anisotropic voxels, so set INU bspline grid based on voxel size
-            syn_preprocessing_wf.inputs.epi_reference_wf.n4_avgs.args = _bspline_grid(sources[0])
-            # The number of N4 iterations are also reduced.
-            syn_preprocessing_wf.inputs.epi_reference_wf.n4_avgs.n_iterations = [50] * 4

cc @eilidhmacnicol

Copy link

codecov bot commented Sep 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.15%. Comparing base (b588f75) to head (1d90e1d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #503   +/-   ##
=======================================
  Coverage   84.15%   84.15%           
=======================================
  Files          30       30           
  Lines        2872     2872           
  Branches      382      382           
=======================================
  Hits         2417     2417           
  Misses        381      381           
  Partials       74       74           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant