Commit fc366310 authored by Matthew Webster's avatar Matthew Webster
Browse files

MG changes to generated denoised motion regressors

parent 82c70c1a
14/02/20 1.06.14
* Generate denoised motion regressors
......@@ -147,3 +147,17 @@ if DObrainord
ciftisavereset(BO,'Atlas_clean_vn.dscalar.nii',WBC);
end
%%%% compute movement regressors with noise components removed
if domot == 0
confounds = functionmotionconfounds(TR,hp);
if aggressive == 1
% aggressively regress out noise ICA components from movement regressors
betaconfounds = pinv(ICA(:,DDremove),1e-6) * confounds; % beta for confounds (bad only)
confounds = confounds - (ICA(:,DDremove) * betaconfounds); % cleanup
else
% non-aggressively regress out noise ICA components from movement regressors
betaconfounds = pinv(ICA,1e-6) * confounds; % beta for confounds (good *and* bad)
confounds = confounds - (ICA(:,DDremove) * betaconfounds(DDremove,:)); % cleanup
end
save_avw(reshape(confounds',size(confounds,2),1,1,size(confounds,1)),'mc/prefiltered_func_data_mcf_conf_hp_clean','f',[1 1 1 TR]);
end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment