Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
fix
Commits
f284a66e
Commit
f284a66e
authored
Aug 11, 2015
by
Stephen Smith
Committed by
Duncan Mortimer
Feb 27, 2019
Browse files
Updated fix_3_clean.m
parent
d1a753ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
fix_3_clean.m
View file @
f284a66e
...
...
@@ -68,24 +68,24 @@ ICA=functionnormalise(load(sprintf('filtered_func_data.ica/melodic_mix')));
if
aggressive
==
1
sprintf
(
'aggressive cleanup'
)
confounds
=
[
confounds
ICA
(:,
DDremove
)];
cts
=
cts
-
(
confounds
*
(
pinv
(
confounds
)
*
cts
));
cts
=
cts
-
(
confounds
*
(
pinv
(
confounds
,
1e-6
)
*
cts
));
if
DObrainord
==
1
BO
.
cdata
=
BO
.
cdata
-
(
confounds
*
(
pinv
(
confounds
)
*
BO
.
cdata
'))'
;
BO
.
cdata
=
BO
.
cdata
-
(
confounds
*
(
pinv
(
confounds
,
1e-6
)
*
BO
.
cdata
'))'
;
end
else
sprintf
(
'unaggressive cleanup'
)
if
domot
==
1
% aggressively regress out motion parameters from ICA and from data
ICA
=
ICA
-
(
confounds
*
(
pinv
(
confounds
)
*
ICA
));
cts
=
cts
-
(
confounds
*
(
pinv
(
confounds
)
*
cts
));
ICA
=
ICA
-
(
confounds
*
(
pinv
(
confounds
,
1e-6
)
*
ICA
));
cts
=
cts
-
(
confounds
*
(
pinv
(
confounds
,
1e-6
)
*
cts
));
if
DObrainord
==
1
BO
.
cdata
=
BO
.
cdata
-
(
confounds
*
(
pinv
(
confounds
)
*
BO
.
cdata
'))'
;
BO
.
cdata
=
BO
.
cdata
-
(
confounds
*
(
pinv
(
confounds
,
1e-6
)
*
BO
.
cdata
'))'
;
end
end
betaICA
=
pinv
(
ICA
)
*
cts
;
% beta for ICA (good *and* bad)
betaICA
=
pinv
(
ICA
,
1e-6
)
*
cts
;
% beta for ICA (good *and* bad)
cts
=
cts
-
(
ICA
(:,
DDremove
)
*
betaICA
(
DDremove
,:));
% cleanup
if
DObrainord
==
1
betaICA
=
pinv
(
ICA
)
*
BO
.
cdata
'
;
% beta for ICA (good *and* bad)
betaICA
=
pinv
(
ICA
,
1e-6
)
*
BO
.
cdata
'
;
% beta for ICA (good *and* bad)
BO
.
cdata
=
BO
.
cdata
-
(
ICA
(:,
DDremove
)
*
betaICA
(
DDremove
,:))
'
;
% cleanup
end
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment