Skip to content

Commit

Permalink
fix: restore demeaning, resample in sloppy mode
Browse files Browse the repository at this point in the history
  • Loading branch information
oesteban committed Jul 4, 2024
1 parent e5c0f89 commit 1883c15
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions sdcflows/interfaces/bspline.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ class _BSplineApproxInputSpec(BaseInterfaceInputSpec):
1e-4, usedefault=True, desc="controls the regularization"
)
recenter = traits.Enum(
False,
"mode",
"median",
"mode",
"mean",
False,
usedefault=True,
desc="strategy to recenter the distribution of the input fieldmap",
)
Expand Down
9 changes: 5 additions & 4 deletions sdcflows/workflows/fit/fieldmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ def init_fmap_wf(omp_nthreads=1, sloppy=False, debug=False, mode="phasediff", na
from ...interfaces.bspline import (
BSplineApprox,
DEFAULT_HF_ZOOMS_MM,
DEFAULT_ZOOMS_MM,
)
from ...interfaces.fmap import CheckRegister

Expand All @@ -113,9 +112,11 @@ def _unzip(fmap_spec):
magnitude_wf = init_magnitude_wf(omp_nthreads=omp_nthreads)
bs_filter = pe.Node(BSplineApprox(), name="bs_filter")
bs_filter.interface._always_run = debug
bs_filter.inputs.bs_spacing = (
[DEFAULT_HF_ZOOMS_MM] if not sloppy else [DEFAULT_ZOOMS_MM]
)
bs_filter.inputs.bs_spacing = [DEFAULT_HF_ZOOMS_MM]

if sloppy:
bs_filter.inputs.zooms_min = 4.0

Check warning on line 118 in sdcflows/workflows/fit/fieldmap.py

View check run for this annotation

Codecov / codecov/patch

sdcflows/workflows/fit/fieldmap.py#L118

Added line #L118 was not covered by tests

bs_filter.inputs.extrapolate = not debug

# fmt: off
Expand Down

0 comments on commit 1883c15

Please sign in to comment.