Skip to content

Commit 8b6b263

Browse files
committed
Fix DVARS calculation.
1 parent 7d96581 commit 8b6b263

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nipype/algorithms/confounds.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ def compute_dvars(in_file, in_mask, remove_zerovariance=False):
662662
func_diff = np.diff(mfunc, axis=1)
663663

664664
# DVARS (no standardization)
665-
dvars_nstd = func_diff.std(axis=0)
665+
dvars_nstd = np.sqrt(np.square(func_diff).mean(axis=0))
666666

667667
# standardization
668668
dvars_stdz = dvars_nstd / diff_sd_mean

0 commit comments

Comments
 (0)