From 091a915dedde33921fe02e7a81eab7e2343bbf80 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Fri, 2 Sep 2022 11:44:09 +0200 Subject: [PATCH] MAINT: Remove unused argument from ``topup`` related interface While debugging nipreps/fmriprep#2830, I've found this potential issue. Inserting this change before major bugfixes are pushed. --- sdcflows/interfaces/bspline.py | 15 +-------------- sdcflows/workflows/fit/pepolar.py | 1 - 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/sdcflows/interfaces/bspline.py b/sdcflows/interfaces/bspline.py index d515c85eb8..1776f8c674 100644 --- a/sdcflows/interfaces/bspline.py +++ b/sdcflows/interfaces/bspline.py @@ -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): @@ -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 ), @@ -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 diff --git a/sdcflows/workflows/fit/pepolar.py b/sdcflows/workflows/fit/pepolar.py index 0c2d6f01a2..676ec33e19 100644 --- a/sdcflows/workflows/fit/pepolar.py +++ b/sdcflows/workflows/fit/pepolar.py @@ -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")]),