Skip to content

Commit dc5fe25

Browse files
committed
fix: reverted mask generation to match matlab art
1 parent 360e685 commit dc5fe25

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

nipype/algorithms/rapidart.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,9 +376,7 @@ def _detect_outliers_core(self, imgfile, motionfile, runidx, cwd=None):
376376
# Use an SPM like approach
377377
mask_tmp = vol > \
378378
(_nanmean(vol) / self.inputs.global_threshold)
379-
g_vol = np.nansum(vol * mask_tmp)/np.nansum(mask_tmp)
380-
mask = mask * \
381-
(vol > g_vol)
379+
mask = mask * mask_tmp
382380
for t0 in range(timepoints):
383381
vol = data[:, :, :, t0]
384382
g[t0] = _nanmean(vol[mask])

0 commit comments

Comments
 (0)