Skip to content

Commit 2e2dac1

Browse files
committed
rename inputs to conform with RapidArt
1 parent 7e8d871 commit 2e2dac1

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

nipype/algorithms/confounds.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,9 @@ def _list_outputs(self):
196196

197197
class FramewiseDisplacementInputSpec(BaseInterfaceInputSpec):
198198
in_file = File(exists=True, mandatory=True, desc='motion parameters as written by FSL MCFLIRT or AFNI 3dvolreg')
199-
format = traits.Enum("FSL", "AFNI", desc="Format of the motion parameters file: FSL (radians), AFNI (degrees)")
199+
parameter_source = traits.Enum("FSL", "AFNI",
200+
desc="Source of movement parameters",
201+
mandatory=True)
200202
radius = traits.Float(50, usedefault=True,
201203
desc='radius in mm to calculate angular FDs, 50mm is the '
202204
'default since it is used in Power et al. 2012')
@@ -253,7 +255,7 @@ def _run_interface(self, runtime):
253255
mpars = np.loadtxt(self.inputs.in_file) # mpars is N_t x 6
254256
diff = mpars[:-1, :] - mpars[1:, :]
255257
diff[:, :3] *= self.inputs.radius
256-
if self.inputs.format == "AFNI":
258+
if self.inputs.parameter_source == "AFNI":
257259
diff[:, :3] *= (np.pi / 180)
258260
fd_res = np.abs(diff).sum(axis=1)
259261

nipype/algorithms/tests/test_confounds.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def test_fd(tmpdir):
2323
ground_truth = np.loadtxt(example_data('fsl_motion_outliers_fd.txt'))
2424
fdisplacement = FramewiseDisplacement(in_file=example_data('fsl_mcflirt_movpar.txt'),
2525
out_file=tempdir + '/fd.txt',
26-
format="FSL")
26+
parameter_source="FSL")
2727
res = fdisplacement.run()
2828

2929
with open(res.outputs.out_file) as all_lines:

0 commit comments

Comments
 (0)