Authored by Anthony Boyer

Fix event parsing for HUH.

@@ -492,10 +492,18 @@ for c = 1:length(KeepEvent) % Navigate all stim events @@ -492,10 +492,18 @@ for c = 1:length(KeepEvent) % Navigate all stim events
492 tmpchLabel1 = strrep(chLabel1, chInd1, num2str(str2double(chInd1))); 492 tmpchLabel1 = strrep(chLabel1, chInd1, num2str(str2double(chInd1)));
493 iChanMatch1 = find(strcmpi(tmpchLabel1, csv_chanlabels)); 493 iChanMatch1 = find(strcmpi(tmpchLabel1, csv_chanlabels));
494 end 494 end
  495 + if isempty(iChanMatch1) && ~isempty(chInd1)
  496 + tmpchLabel1 = strrep(chLabel1, chInd1, ['_' chInd1]);
  497 + iChanMatch1 = find(strcmpi(tmpchLabel1, csv_chanlabels));
  498 + end
495 if isempty(iChanMatch2) && ~isempty(chInd2) 499 if isempty(iChanMatch2) && ~isempty(chInd2)
496 tmpchLabel2 = strrep(chLabel2, chInd2, num2str(str2double(chInd2))); 500 tmpchLabel2 = strrep(chLabel2, chInd2, num2str(str2double(chInd2)));
497 iChanMatch2 = find(strcmpi(tmpchLabel2, csv_chanlabels)); 501 iChanMatch2 = find(strcmpi(tmpchLabel2, csv_chanlabels));
498 end 502 end
  503 + if isempty(iChanMatch2) && ~isempty(chInd2)
  504 + tmpchLabel2 = strrep(chLabel2, chInd2, ['_' chInd2]);
  505 + iChanMatch2 = find(strcmpi(tmpchLabel2, csv_chanlabels));
  506 + end
499 507
500 %{ 508 %{
501 %% uncomment this section for some datasets 509 %% uncomment this section for some datasets
@@ -114,6 +114,7 @@ for j=1:length(KeepEvent) % Navigate all stim events @@ -114,6 +114,7 @@ for j=1:length(KeepEvent) % Navigate all stim events
114 noteName = regexprep(noteName,'_+','_'); noteName = regexprep(noteName,'µ','u'); 114 noteName = regexprep(noteName,'_+','_'); noteName = regexprep(noteName,'µ','u');
115 if strcmpi(patientCode(5:end),'MIL');noteName = strrep(noteName,'.0',''); noteName = strrep(noteName,'_MA_','_');end%some MIL notes 115 if strcmpi(patientCode(5:end),'MIL');noteName = strrep(noteName,'.0',''); noteName = strrep(noteName,'_MA_','_');end%some MIL notes
116 if strcmpi(patientCode(5:end),'REN');noteName = strrep(noteName,'.0','');end%some REN notes 116 if strcmpi(patientCode(5:end),'REN');noteName = strrep(noteName,'.0','');end%some REN notes
  117 + if strcmpi(patientCode(5:end),'HUH');noteName = strrep(noteName,'.0','');end%some HUH notes
117 noteName = strrep(noteName,'.',''); noteName = strrep(noteName,',',''); % /!\ float value becomes integer /!\ 118 noteName = strrep(noteName,'.',''); noteName = strrep(noteName,',',''); % /!\ float value becomes integer /!\
118 noteName = strrep(noteName,'sec','s'); noteName = strrep(noteName,'AA','A'); 119 noteName = strrep(noteName,'sec','s'); noteName = strrep(noteName,'AA','A');
119 noteName = strrep(noteName,'Stim_Start_',''); noteName = strrep(noteName,'Stim_Stop_',''); 120 noteName = strrep(noteName,'Stim_Start_',''); noteName = strrep(noteName,'Stim_Stop_','');