Skip to content

Commit ebdbf21

Browse files
committed
1 parent 078037f commit ebdbf21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nipype/algorithms/confounds.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,8 +685,8 @@ def compute_dvars(in_file, in_mask, remove_zerovariance=False,
685685
warnings.filterwarnings('error')
686686

687687
# voxelwise standardization
688-
diff_vx_stdz = func_diff / np.array([diff_sdhat] * func_diff.shape[-1]).T
689-
dvars_vx_stdz = diff_vx_stdz.std(axis=0, ddof=1)
688+
diff_vx_stdz = np.square(func_diff) / np.array([diff_sdhat] * func_diff.shape[-1]).T
689+
dvars_vx_stdz = np.sqrt(diff_vx_stdz.mean(axis=0))
690690

691691
return (dvars_stdz, dvars_nstd, dvars_vx_stdz)
692692

0 commit comments

Comments
 (0)