Authored by Olivier David

for VAL patients

... ... @@ -318,28 +318,25 @@ if strcmpi(patientCode(5:end),'STR')
end
end
val_flag = 0;
% VAL patients have fixed parameters
if strcmpi(patientCode(5:end),'VAL')
load('/gin/data/database/02-raw/stim_parameters-ftract-val.mat','stim_params')
Loc = find(ismember(stim_params.PCode, patientCode), 1);
if ~isempty(Loc)
fre_flag = 1;
Frq = stim_params.Freq{Loc};
Amp = stim_params.Ampl{Loc};
Pul = stim_params.Pulse{Loc};
for n = 1:length(KeepEvent)
undsc = strfind(Notes{KeepEvent(n)},'_');
if ~isempty(undsc)
Notes{KeepEvent(n)} = strcat(Notes{KeepEvent(n)}(1:undsc(1)),Amp,'_',Frq,'_',Pul);
end
Notes{KeepEvent(n)} = char(Notes{KeepEvent(n)});
evt(KeepEvent(n)).type = Notes{KeepEvent(n)};
val_flag = 1;
Frq = '1Hz';
Amp = '3mA';
Pul = '500us';
for n = 1:length(KeepEvent)
undsc = strfind(Notes{KeepEvent(n)},'_');
if ~isempty(undsc)
Notes{KeepEvent(n)} = strcat(Notes{KeepEvent(n)}(1:undsc(1)),Amp,'_',Frq,'_',Pul);
end
D = events(D,1,evt);
D2 = clone(D, D.fnamedat, [D.nchannels D.nsamples D.ntrials]);
D2(:,:,:) = D(:,:,:);
save(D2);
fprintf('\n \n MESSAGE: .. %s parameters updated ..::\n',patientCode);
Notes{KeepEvent(n)} = char(Notes{KeepEvent(n)});
evt(KeepEvent(n)).type = Notes{KeepEvent(n)};
end
D = events(D,1,evt);
D2 = clone(D, D.fnamedat, [D.nchannels D.nsamples D.ntrials]);
D2(:,:,:) = D(:,:,:);
save(D2);
fprintf('\n \n MESSAGE: .. %s parameters updated ..::\n',patientCode);
end
... ...