-
Notifications
You must be signed in to change notification settings - Fork 1
/
mprf_runAllAnalyses.m
79 lines (66 loc) · 2.5 KB
/
mprf_runAllAnalyses.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
% mprf_runAllAnalysis.m
%
% Master script to run 3 types of analyses of the manuscript:
% 1. Original: predict MEG responses for single subject, using initally
% estimated fMRI pRF parameters
%
% 2. Systematically varying pRF size: use predictions from pRFs
% where sigma is systematically scaled (up or down) from original
% estimate to explain MEG responses.
%
% 3. Systematically varying pRF position: use predictions from pRFs
% where [x,y] is systematically rotated around the fovea to explain
% MEG responses.
% A population receptive field model of the magnetoencephalography response
% by Kupers, Edadan, Benson, Zuiderbaan, de Jong, Dumoulin and Winawer.
% YEAR. JOURNAL. DOI.
%
% Default script runs the modelfits with 2 free parameters, a gain and a
% reference phase. Model uses split-half cross-validation to get the
% the final reference phase and betas within a subject.
%
% To visualize the results, you run the script mprf_makeManuscriptFigures.m
%
% Written by EK @ NYU
%% Define all subjects
subjects = {'wlsubj004', 'wlsubj039', 'wlsubj040', 'wlsubj058','wlsubj068', ...
'wlsubj070', 'wlsubj081', 'wlsubj106', 'wlsubj109', 'wlsubj111'}; %
% Define additional free params / options here, such as:
saveFig = false;
verbose = false;
%% Fit model with fMRI pRF parameters
opt = getOpts('saveFig', saveFig,'verbose',verbose); % see getOpts function for defaults and more options
for s = length(subjects)
subjID = subjects{s};
mprf_main(subjID, opt);
end
%% Fit model with altered pRF size
opt = getOpts('saveFig',saveFig,'verbose',verbose, 'perturbOrigPRFs','size');
for s = 1:length(subjects)
subjID = subjects{s};
mprf_main(subjID, opt);
close all
end
%% Fit model with rotated pRF position
opt = getOpts('saveFig',saveFig,'verbose',verbose, 'perturbOrigPRFs','position');
for s = 1:length(subjects)
subjID = subjects{s};
mprf_main(subjID, opt);
close all
end
%% Fit model with pRF parameters using the group average retinotopy data set collected at NYU 3T scanner.
for s = 1:length(subjects)
subjID = subjects{s};
opt = getOpts('saveFig', saveFig,'verbose',verbose, ...
'useNYU3TAveMaps', true);
mprf_main(subjID, opt);
close all;
end
%% Fit model with scrambled pRF parameters across cortex.
% opt = getOpts('saveFig',saveFig,'verbose',verbose, 'perturbOrigPRFs','scramble');
% for s = 1:length(subjects)
% subjID = subjects{s};
% mprf_main(subjID, opt);
% close all
% end
return