Skip to content

Commit

Permalink
Merge pull request #276 from nipreps/sty/topup-unused-argument
Browse files Browse the repository at this point in the history
MAINT: Remove unused argument from ``topup`` related interface
  • Loading branch information
oesteban authored Sep 2, 2022
2 parents c85a14d + 091a915 commit 86f460f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
15 changes: 1 addition & 14 deletions sdcflows/interfaces/bspline.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,18 +369,6 @@ class _TOPUPCoeffReorientInputSpec(BaseInterfaceInputSpec):
File(exist=True), mandatory=True, desc="input coefficients file(s) from TOPUP"
)
fmap_ref = File(exists=True, mandatory=True, desc="the fieldmap reference")
pe_dir = traits.Enum(
"+",
"-",
"i",
"i-",
"j",
"j-",
"k",
"k-",
usedefault=True,
desc="the polarity of the phase-encoding direction corresponding to fmap_ref",
)


class _TOPUPCoeffReorientOutputSpec(TraitedSpec):
Expand Down Expand Up @@ -422,7 +410,6 @@ def _run_interface(self, runtime):
_fix_topup_fieldcoeff(
in_coeff,
self.inputs.fmap_ref,
refpe_reversed=self.inputs.pe_dir.endswith("-"),
out_file=fname_presuffix(
in_coeff, suffix="_fixed", newpath=runtime.cwd
),
Expand Down Expand Up @@ -461,7 +448,7 @@ def bspline_grid(img, control_zooms_mm=DEFAULT_ZOOMS_MM):
return img.__class__(np.zeros(bs_shape, dtype="float32"), bs_affine)


def _fix_topup_fieldcoeff(in_coeff, fmap_ref, refpe_reversed=False, out_file=None):
def _fix_topup_fieldcoeff(in_coeff, fmap_ref, out_file=None):
"""Read in a coefficients file generated by TOPUP and fix x-form headers."""
from pathlib import Path
import numpy as np
Expand Down
1 change: 0 additions & 1 deletion sdcflows/workflows/fit/pepolar.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ def init_topup_wf(
("pe_dir_fsl", "encoding_direction")]),
(regrid, pad_ref_slices, [("reference", "in_file")]),
(pad_ref_slices, fix_coeff, [("out_file", "fmap_ref")]),
(readout_time, fix_coeff, [(("pe_direction", _front), "pe_dir")]),
(topup, fix_coeff, [("out_fieldcoef", "in_coeff")]),
(topup, outputnode, [("out_jacs", "jacobians"),
("out_mats", "xfms")]),
Expand Down

0 comments on commit 86f460f

Please sign in to comment.