Showing
1 changed file
with
16 additions
and
19 deletions
@@ -318,28 +318,25 @@ if strcmpi(patientCode(5:end),'STR') | @@ -318,28 +318,25 @@ if strcmpi(patientCode(5:end),'STR') | ||
318 | end | 318 | end |
319 | end | 319 | end |
320 | val_flag = 0; | 320 | val_flag = 0; |
321 | +% VAL patients have fixed parameters | ||
321 | if strcmpi(patientCode(5:end),'VAL') | 322 | if strcmpi(patientCode(5:end),'VAL') |
322 | - load('/gin/data/database/02-raw/stim_parameters-ftract-val.mat','stim_params') | ||
323 | - Loc = find(ismember(stim_params.PCode, patientCode), 1); | ||
324 | - if ~isempty(Loc) | ||
325 | - fre_flag = 1; | ||
326 | - Frq = stim_params.Freq{Loc}; | ||
327 | - Amp = stim_params.Ampl{Loc}; | ||
328 | - Pul = stim_params.Pulse{Loc}; | ||
329 | - for n = 1:length(KeepEvent) | ||
330 | - undsc = strfind(Notes{KeepEvent(n)},'_'); | ||
331 | - if ~isempty(undsc) | ||
332 | - Notes{KeepEvent(n)} = strcat(Notes{KeepEvent(n)}(1:undsc(1)),Amp,'_',Frq,'_',Pul); | ||
333 | - end | ||
334 | - Notes{KeepEvent(n)} = char(Notes{KeepEvent(n)}); | ||
335 | - evt(KeepEvent(n)).type = Notes{KeepEvent(n)}; | 323 | + val_flag = 1; |
324 | + Frq = '1Hz'; | ||
325 | + Amp = '3mA'; | ||
326 | + Pul = '500us'; | ||
327 | + for n = 1:length(KeepEvent) | ||
328 | + undsc = strfind(Notes{KeepEvent(n)},'_'); | ||
329 | + if ~isempty(undsc) | ||
330 | + Notes{KeepEvent(n)} = strcat(Notes{KeepEvent(n)}(1:undsc(1)),Amp,'_',Frq,'_',Pul); | ||
336 | end | 331 | end |
337 | - D = events(D,1,evt); | ||
338 | - D2 = clone(D, D.fnamedat, [D.nchannels D.nsamples D.ntrials]); | ||
339 | - D2(:,:,:) = D(:,:,:); | ||
340 | - save(D2); | ||
341 | - fprintf('\n \n MESSAGE: .. %s parameters updated ..::\n',patientCode); | 332 | + Notes{KeepEvent(n)} = char(Notes{KeepEvent(n)}); |
333 | + evt(KeepEvent(n)).type = Notes{KeepEvent(n)}; | ||
342 | end | 334 | end |
335 | + D = events(D,1,evt); | ||
336 | + D2 = clone(D, D.fnamedat, [D.nchannels D.nsamples D.ntrials]); | ||
337 | + D2(:,:,:) = D(:,:,:); | ||
338 | + save(D2); | ||
339 | + fprintf('\n \n MESSAGE: .. %s parameters updated ..::\n',patientCode); | ||
343 | end | 340 | end |
344 | 341 | ||
345 | 342 |
-
Please register or login to post a comment