-
Notifications
You must be signed in to change notification settings - Fork 6
/
ExptWrapper_FileProcess.m
executable file
·151 lines (115 loc) · 4.22 KB
/
ExptWrapper_FileProcess.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
%%
seed = sum(100*clock); %get random seed
RandStream.setGlobalStream(RandStream('mt19937ar','seed',seed));%set seed
%% first specify things that change
subjectNum = 114;
subjectRun = 1; % run number for the day
subjectDay = 3; % this will determine which mask the RT thing will use VERY IMPORTANT AND COUNTERBALANCING
group='MDD'; %or 'MDD';
% check that subject number makes sense
if strcmp(group,'HC')
if subjectNum < 100
fprintf('HC numbering starts at 1.\n')
else
error('ERROR: HC numbering too high.')
end
elseif strcmp(group, 'MDD')
if subjectNum <= 100
error('ERROR: MDD numbering needs to be increased.')
else
fprintf('MDD numbering starts at 101.\n')
end
else
error('ERROR: incorrect group label.')
end
%%
%imgDirHeader = '/Data1/subjects/';
% for testing code at Princeton
% for Penn
%imgDirHeader = '/Data1/subjects/';
%imgDirHeader = '/mnt/rtexport/RTexport_Current/';
imgDirHeader = '/mnt/Data/';
realtimeData = 1;
debug = 0;
%% specify everything else
projectName = 'rtAttenPenn';
subjectName = [datestr(now,5) datestr(now,7) datestr(now,11) num2str(subjectRun) '_' projectName];
%subjDate = '4-5-17';
%subjectName = [datestr(subjDate,5) datestr(subjDate,7) datestr(subjDate,11) num2str(subjectRun) '_' projectName];
% **** types of stimuli to train/show to subjects *******
NEUTRAL = 1;
SAD = 2;
HAPPY = 3;
% *******************************************************
typeNum = SAD;
addpath(genpath('/opt/psychtoolbox/'))
KbName('UnifyKeyNames')
%% Generate expt sequence
runNum = 1;
rtfeedback = 0;
[blockData patterns] = RealTimePunisherExptSequence(subjectNum,subjectName,runNum,rtfeedback,typeNum,subjectDay)
runNum = 2;
% changing it here for behavioral have rtfeedback = 0
rtfeedback = 1;
[blockData patterns] = RealTimePunisherExptSequence(subjectNum,subjectName,runNum,rtfeedback,typeNum,subjectDay)
runNum = 3;
rtfeedback = 1;
[blockData patterns] = RealTimePunisherExptSequence(subjectNum,subjectName,runNum,rtfeedback,typeNum,subjectDay)
runNum = 4;
rtfeedback = 1;
[blockData patterns] = RealTimePunisherExptSequence(subjectNum,subjectName,runNum,rtfeedback,typeNum,subjectDay)
runNum = 5;
rtfeedback = 1;
[blockData patterns] = RealTimePunisherExptSequence(subjectNum,subjectName,runNum,rtfeedback,typeNum,subjectDay)
runNum = 6;
rtfeedback = 1;
[blockData patterns] = RealTimePunisherExptSequence(subjectNum,subjectName,runNum,rtfeedback,typeNum,subjectDay)
runNum = 7;
rtfeedback = 1;
[blockData patterns] = RealTimePunisherExptSequence(subjectNum,subjectName,runNum,rtfeedback,typeNum,subjectDay)
if subjectDay > 1 % don't need to make if on day 1
runNum = 8;
rtfeedback = 1;
[blockData patterns] = RealTimePunisherExptSequence(subjectNum,subjectName,runNum,rtfeedback,typeNum,subjectDay)
if subjectDay == 2
runNum = 9;
rtfeedback = 1;
[blockData patterns] = RealTimePunisherExptSequence(subjectNum,subjectName,runNum,rtfeedback,typeNum,subjectDay)
end
end
%% Run 1 file process
runNum = 1;
fMRI = 15;
[patterns] = RealTimePunisherFileProcess(imgDirHeader,subjectNum,subjectName,runNum,fMRI,realtimeData,subjectDay)
%% Run 2 fi1le process
runNum = 2;
fMRI = 17;
[patterns] = RealTimePunisherFileProcess(imgDirHeader,subjectNum,subjectName,runNum,fMRI,realtimeData,subjectDay)
%%
runNum = 3;
fMRI = 19;
[patterns] = RealTimePunisherFileProcess(imgDirHeader,subjectNum,subjectName,runNum,fMRI,realtimeData,subjectDay)
%%
runNum = 4;
fMRI = 14;
[patterns] = RealTimePunisherFileProcess(imgDirHeader,subjectNum,subjectName,runNum,fMRI,realtimeData,subjectDay)
%%
runNum = 5;
fMRI = 16;
[patterns] = RealTimePunisherFileProcess(imgDirHeader,subjectNum,subjectName,runNum,fMRI,realtimeData,subjectDay)
%%
runNum = 6;
fMRI = 18;
[patterns] = RealTimePunisherFileProcess(imgDirHeader,subjectNum,subjectName,runNum,fMRI,realtimeData,subjectDay)
%%
runNum = 7;
fMRI = 20;
[patterns] = RealTimePunisherFileProcess(imgDirHeader,subjectNum,subjectName,runNum,fMRI,realtimeData,subjectDay)
%%
runNum = 8;
fMRI = 22;
[patterns] = RealTimePunisherFileProcess(imgDirHeader,subjectNum,subjectName,runNum,fMRI,realtimeData,subjectDay)
%%
runNum = 9;
fMRI = 24;
[patterns] = RealTimePunisherFileProcess(imgDirHeader,subjectNum,subjectName,runNum,fMRI,realtimeData,subjectDay)