|
23 | 23 | logloc = dir([data_path '*.log']); |
24 | 24 | if isempty(logloc) |
25 | 25 | trigger_info = 'No triggers and no logfiles'; |
26 | | - clear logloc |
27 | 26 | else |
28 | 27 | trigger_info = 'No triggers but has logfile'; |
29 | 28 | clear logloc |
30 | 29 | end |
31 | 30 | %based on the raw data we decided that for these people we could place the triggers in the same place |
32 | | - |
| 31 | + if strcmp(subject_list{s},'placeholder') |
| 32 | + EEG = pop_importevent( EEG, 'event',[home_path 'trigger_info.txt'],'fields',{'latency' 'type' 'position'},'skipline',1,'timeunit',1); |
| 33 | + end |
| 34 | + if strcmp(subject_list{s},'7094') |
| 35 | + EEG = pop_importevent( EEG, 'event',[home_path 'trigger_info_early.txt'],'fields',{'latency' 'type' 'position'},'skipline',1,'timeunit',1); |
| 36 | + end |
33 | 37 |
|
34 | 38 |
|
35 | 39 | %% looking and replacing wrong tiggers due to USB error |
|
81 | 85 | end |
82 | 86 | end |
83 | 87 |
|
84 | | - %% doing the final test to make sure everyone has trigger 50 and 51 (ignoring boundary) |
| 88 | + %doing the final test to make sure everyone has trigger 50 and 51 (ignoring boundary) |
85 | 89 | final_triggers={EEG.event.type}; |
86 | 90 | for i=length(final_triggers):-1:1 |
87 | 91 | if strcmp(final_triggers(1,i),'boundary') |
88 | 92 | final_triggers(i)=[]; |
89 | 93 | end |
90 | 94 | end |
91 | | - %we manually checked these people and they have a onset of alpha based on that they have specific onsets for the triggers. Later we will delete at least the first 10sec of data, this gives us a range, so mulitple people can use the same trigger time |
92 | | - if strcmp(subject_list{s},'7094') |
93 | | - EEG = pop_importevent( EEG, 'event',[home_path 'trigger_info_early.txt'],'fields',{'latency' 'type' 'position'},'skipline',1,'timeunit',1); |
94 | | - elseif strcmp(subject_list{s}, '2204') || strcmp(subject_list{s}, '2207') || strcmp(subject_list{s}, '2231') || strcmp(subject_list{s}, '10748') |
| 95 | + %we manually checked these people and they have a onset of alpha |
| 96 | + % 7059 - very clearly at 186.5 - dont use this one (too few data) |
| 97 | + % 12512- at 227 |
| 98 | + % 12215- maybe at 232 - dont use |
| 99 | + % 12272- 236 |
| 100 | + % 2229 - 264, |
| 101 | + % 12755- not sure maybe at 246 - dont use |
| 102 | + % 2281 -282 |
| 103 | + % 7092 -clear at 291 - |
| 104 | + % 2270 - maybe at 312 boundry? - dont use |
| 105 | + %7075 -no idication , also no events in previous files... - dont use |
| 106 | + %12413- no idea - dont use |
| 107 | + % alpha at 306 '2204' 2207 at 296 2231 at 302 - 10748 clear at 304 - |
| 108 | + % everyone that has between 295 and 305 %since we'll cut the first 10 sec we have a range |
| 109 | + if strcmp(subject_list{s}, '2204') || strcmp(subject_list{s}, '2207') || strcmp(subject_list{s}, '2231') || strcmp(subject_list{s}, '10748') |
95 | 110 | EEG = pop_importevent( EEG, 'event',[home_path 'trigger_info.txt'],'fields',{'latency' 'type' 'position'},'skipline',1,'timeunit',1); |
96 | 111 | final_triggers= {'added 50', 'added 51'}; |
97 | 112 | elseif strcmp(subject_list{s}, '12512') || strcmp(subject_list{s}, '12272') |
|
103 | 118 | elseif strcmp(subject_list{s}, '2281') || strcmp(subject_list{s}, '7092') |
104 | 119 | EEG = pop_importevent( EEG, 'event',[home_path 'trigger_info_282.txt'],'fields',{'latency' 'type' 'position'},'skipline',1,'timeunit',1); |
105 | 120 | final_triggers= {'added 50', 'added 51'}; |
106 | | - % from here on out we should see nobody in the end with errors if so, either find out where the triggers should go, if not sure, don't use data |
107 | 121 | elseif length(final_triggers) > 2 |
108 | 122 | final_triggers= {'error too ', 'many triggers'}; |
109 | 123 | elseif length(final_triggers) < 1 |
110 | 124 | final_triggers= {'error ', 'no triggers'}; |
| 125 | +% logloc = dir([data_path '*.log']); |
| 126 | +% if isempty(logloc) |
| 127 | +% %No triggers and no logfiles |
| 128 | +% final_triggers= {'nothing', 'nothing'} |
| 129 | +% clear logloc |
| 130 | +% else |
| 131 | +% final_triggers= {'nothing', 'nothing'};%No triggers but has logfile |
| 132 | +% % EEG = pop_importevent( EEG, 'event',[home_path 'trigger_info.txt'],'fields',{'latency' 'type' 'position'},'skipline',1,'timeunit',1); |
| 133 | +% % final_triggers= {'added 50', 'added 51'};%No triggers but has logfile |
| 134 | +% clear logloc |
| 135 | +% end |
111 | 136 | elseif strcmp(final_triggers(1),'condition 50') && length(final_triggers)==1 |
112 | 137 | final_triggers= {'has 50', 'missing 51'}; |
113 | 138 | if strcmp(subject_list{s}, '12177') |
|
127 | 152 | end |
128 | 153 | save([home_path 'participant_info'], 'participant_info'); |
129 | 154 |
|
130 | | -%changed how it checks for bad triggers. Before it not delete all |
131 | | -%boundaries only last one, now all and will see if there is anything but |
132 | | -%condtion 51 and condtion 50 |
|
0 commit comments