Authored by Anthony Boyer

Fix event parsing for HUH.

... ... @@ -492,10 +492,18 @@ for c = 1:length(KeepEvent) % Navigate all stim events
tmpchLabel1 = strrep(chLabel1, chInd1, num2str(str2double(chInd1)));
iChanMatch1 = find(strcmpi(tmpchLabel1, csv_chanlabels));
end
if isempty(iChanMatch1) && ~isempty(chInd1)
tmpchLabel1 = strrep(chLabel1, chInd1, ['_' chInd1]);
iChanMatch1 = find(strcmpi(tmpchLabel1, csv_chanlabels));
end
if isempty(iChanMatch2) && ~isempty(chInd2)
tmpchLabel2 = strrep(chLabel2, chInd2, num2str(str2double(chInd2)));
iChanMatch2 = find(strcmpi(tmpchLabel2, csv_chanlabels));
end
if isempty(iChanMatch2) && ~isempty(chInd2)
tmpchLabel2 = strrep(chLabel2, chInd2, ['_' chInd2]);
iChanMatch2 = find(strcmpi(tmpchLabel2, csv_chanlabels));
end
%{
%% uncomment this section for some datasets
... ...
... ... @@ -114,6 +114,7 @@ for j=1:length(KeepEvent) % Navigate all stim events
noteName = regexprep(noteName,'_+','_'); noteName = regexprep(noteName,'µ','u');
if strcmpi(patientCode(5:end),'MIL');noteName = strrep(noteName,'.0',''); noteName = strrep(noteName,'_MA_','_');end%some MIL notes
if strcmpi(patientCode(5:end),'REN');noteName = strrep(noteName,'.0','');end%some REN notes
if strcmpi(patientCode(5:end),'HUH');noteName = strrep(noteName,'.0','');end%some HUH notes
noteName = strrep(noteName,'.',''); noteName = strrep(noteName,',',''); % /!\ float value becomes integer /!\
noteName = strrep(noteName,'sec','s'); noteName = strrep(noteName,'AA','A');
noteName = strrep(noteName,'Stim_Start_',''); noteName = strrep(noteName,'Stim_Stop_','');
... ...