Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Remove unused argument from topup related interface #276

Merged
merged 1 commit into from
Sep 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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