diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index ecb8d4e8a8..da75db9ace 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -599,11 +599,11 @@ class NonSteadyStateDetector(BaseInterface): output_spec = NonSteadyStateDetectorOutputSpec def _run_interface(self, runtime): - in_nii = nb.load(self.inputs.in_plots) + in_nii = nb.load(self.inputs.in_file) global_signal = in_nii.get_data()[:,:,:,:50].mean(axis=0).mean(axis=0).mean(axis=0) self._results = { - 'out_file': _is_outlier(global_signal) + 'n_volumes_to_discard': _is_outlier(global_signal) } return runtime @@ -611,7 +611,7 @@ def _run_interface(self, runtime): def _list_outputs(self): return self._results -def _is_outlier(points, thresh=3.5): +def is_outlier(points, thresh=3.5): """ Returns a boolean array with True if points are outliers and False otherwise. diff --git a/nipype/algorithms/tests/test_confounds.py b/nipype/algorithms/tests/test_confounds.py index 4eaa9dc073..7d6eff1283 100644 --- a/nipype/algorithms/tests/test_confounds.py +++ b/nipype/algorithms/tests/test_confounds.py @@ -7,7 +7,7 @@ import pytest from nipype.testing import example_data from nipype.algorithms.confounds import FramewiseDisplacement, ComputeDVARS, \ - _is_outlier + is_outlier import numpy as np @@ -71,5 +71,5 @@ def test_outliers(tmpdir): in_data = np.random.randn(100) in_data[0] += 10 - assert _is_outlier(in_data) == 1 + assert is_outlier(in_data) == 1