Skip to content

Commit

Permalink
Headmodel: clarify error for NIRS (#631)
Browse files Browse the repository at this point in the history
* Clarify error for NIRS
* Update error message
  • Loading branch information
Edouard2laire authored Jul 10, 2023
1 parent c3e84d8 commit 78cfcc4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion toolbox/forward/panel_headmodel.m
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,14 @@ function UpdateComment(varargin)
isEeg = any(strcmpi(sStudies(i).Channel.DisplayableSensorTypes, 'EEG'));
isEcog = any(strcmpi(sStudies(i).Channel.DisplayableSensorTypes, 'ECOG'));
isSeeg = any(strcmpi(sStudies(i).Channel.DisplayableSensorTypes, 'SEEG'));
isNIRS = any(strcmpi(sStudies(i).Channel.DisplayableSensorTypes, 'NIRS'));
end
end
% Check that at least one modality is available
if ~isMeg && ~isEeg && ~isEcog && ~isSeeg
if isNIRS
errMessage = ['To compute head model for NIRS, use process:' 10 'NIRS > Sources > Compute head model from fluence' 10 'NIRSTORM plugin is required'];
return;
elseif ~isMeg && ~isEeg && ~isEcog && ~isSeeg
errMessage = 'No valid sensor types to estimate a head model.';
return;
end
Expand Down

0 comments on commit 78cfcc4

Please sign in to comment.