Skip to content

Commit 1883c15

Browse files
committed
fix: restore demeaning, resample in sloppy mode
1 parent e5c0f89 commit 1883c15

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

sdcflows/interfaces/bspline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ class _BSplineApproxInputSpec(BaseInterfaceInputSpec):
6565
1e-4, usedefault=True, desc="controls the regularization"
6666
)
6767
recenter = traits.Enum(
68-
False,
69-
"mode",
7068
"median",
69+
"mode",
7170
"mean",
71+
False,
7272
usedefault=True,
7373
desc="strategy to recenter the distribution of the input fieldmap",
7474
)

sdcflows/workflows/fit/fieldmap.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ def init_fmap_wf(omp_nthreads=1, sloppy=False, debug=False, mode="phasediff", na
8787
from ...interfaces.bspline import (
8888
BSplineApprox,
8989
DEFAULT_HF_ZOOMS_MM,
90-
DEFAULT_ZOOMS_MM,
9190
)
9291
from ...interfaces.fmap import CheckRegister
9392

@@ -113,9 +112,11 @@ def _unzip(fmap_spec):
113112
magnitude_wf = init_magnitude_wf(omp_nthreads=omp_nthreads)
114113
bs_filter = pe.Node(BSplineApprox(), name="bs_filter")
115114
bs_filter.interface._always_run = debug
116-
bs_filter.inputs.bs_spacing = (
117-
[DEFAULT_HF_ZOOMS_MM] if not sloppy else [DEFAULT_ZOOMS_MM]
118-
)
115+
bs_filter.inputs.bs_spacing = [DEFAULT_HF_ZOOMS_MM]
116+
117+
if sloppy:
118+
bs_filter.inputs.zooms_min = 4.0
119+
119120
bs_filter.inputs.extrapolate = not debug
120121

121122
# fmt: off

0 commit comments

Comments
 (0)