You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
elseif any(mean(ismember(ft_senslabel('neuromag306'), sens.label)) >0.4) % there are two possibilities for the channel labels: with and without a space
347
+
type ='neuromag306';
348
+
elseif any(mean(ismember(ft_senslabel('neuromag122'), sens.label)) >0.4) % there are two possibilities for the channel labels: with and without a space
% try whether only lowercase channel labels makes a difference
389
+
ifislabel
390
+
recursion =true;
391
+
type = ft_senstype(lower(input));
392
+
recursion =false;
393
+
elseif isfield(input, 'label')
394
+
input.label = lower(input.label);
395
+
recursion =true;
396
+
type = ft_senstype(input);
397
+
recursion =false;
398
+
end
399
+
end
400
+
401
+
if strcmp(type, 'unknown') && ~recursion
402
+
% try whether only uppercase channel labels makes a difference
403
+
ifislabel
404
+
recursion =true;
405
+
type = ft_senstype(upper(input));
406
+
recursion =false;
407
+
elseif isfield(input, 'label')
408
+
input.label = upper(input.label);
409
+
recursion =true;
410
+
type = ft_senstype(input);
411
+
recursion =false;
412
+
end
413
+
end
414
+
415
+
if ~isempty(desired)
416
+
% return a boolean flag
417
+
switchdesired
418
+
case'ext1020'
419
+
type = any(strcmp(type, {'eeg1005''eeg1010''eeg1020''ext1020'}));
420
+
case {'eeg''electrode'}
421
+
type = any(strcmp(type, {'eeg''electrode''ant128''biosemi64''biosemi128''biosemi256''egi32''egi64''egi128''egi256''eeg1005''eeg1010''eeg1020''ext1020'}));
422
+
case'biosemi'
423
+
type = any(strcmp(type, {'biosemi64''biosemi128''biosemi256'}));
424
+
case'egi'
425
+
type = any(strcmp(type, {'egi32''egi64''egi128''egi256'}));
426
+
case'meg'
427
+
type = any(strcmp(type, {'meg''magnetometer''ctf''bti''ctf64''ctf151''ctf275''ctf151_planar''ctf275_planar''neuromag122''neuromag306''bti148''bti148_planar''bti248''bti248_planar''bti248grad''bti248grad_planar''yokogawa9''yokogawa160''yokogawa160_planar''yokogawa64''yokogawa64_planar''yokogawa440''itab''itab28''itab153''itab153_planar'}));
428
+
case'ctf'
429
+
type = any(strcmp(type, {'ctf''ctf64''ctf151''ctf275''ctf151_planar''ctf275_planar'}));
430
+
case'bti'
431
+
type = any(strcmp(type, {'bti''bti148''bti148_planar''bti248''bti248_planar''bti248grad''bti248grad_planar'}));
432
+
case'neuromag'
433
+
type = any(strcmp(type, {'neuromag122''neuromag306'}));
434
+
case'babysquid'
435
+
type = any(strcmp(type, {'babysquid74''artenis123''magview'}));
436
+
case'yokogawa'
437
+
type = any(strcmp(type, {'yokogawa160''yokogawa160_planar''yokogawa64''yokogawa64_planar''yokogawa440'}));
438
+
case'itab'
439
+
type = any(strcmp(type, {'itab''itab28''itab153''itab153_planar'}));
440
+
case'meg_axial'
441
+
% note that neuromag306 is mixed planar and axial
442
+
type = any(strcmp(type, {'neuromag306''ctf64''ctf151''ctf275''bti148''bti248''bti248grad''yokogawa9''yokogawa64''yokogawa160''yokogawa440'}));
443
+
case'meg_planar'
444
+
% note that neuromag306 is mixed planar and axial
445
+
type = any(strcmp(type, {'neuromag122''neuromag306''ctf151_planar''ctf275_planar''bti148_planar''bti248_planar''bti248grad_planar''yokogawa160_planar''yokogawa64_planar'}));
446
+
otherwise
447
+
type = any(strcmp(type, desired));
448
+
end% switch desired
449
+
end% detemine the correspondence to the desired type
450
+
451
+
% remember the current input and output arguments, so that they can be
452
+
% reused on a subsequent call in case the same input argument is given
elseif any(mean(ismember(ft_senslabel('neuromag306'), sens.label)) >0.4) % there are two possibilities for the channel labels: with and without a space
347
+
type ='neuromag306';
348
+
elseif any(mean(ismember(ft_senslabel('neuromag122'), sens.label)) >0.4) % there are two possibilities for the channel labels: with and without a space
% try whether only lowercase channel labels makes a difference
389
+
ifislabel
390
+
recursion =true;
391
+
type = ft_senstype(lower(input));
392
+
recursion =false;
393
+
elseif isfield(input, 'label')
394
+
input.label = lower(input.label);
395
+
recursion =true;
396
+
type = ft_senstype(input);
397
+
recursion =false;
398
+
end
399
+
end
400
+
401
+
if strcmp(type, 'unknown') && ~recursion
402
+
% try whether only uppercase channel labels makes a difference
403
+
ifislabel
404
+
recursion =true;
405
+
type = ft_senstype(upper(input));
406
+
recursion =false;
407
+
elseif isfield(input, 'label')
408
+
input.label = upper(input.label);
409
+
recursion =true;
410
+
type = ft_senstype(input);
411
+
recursion =false;
412
+
end
413
+
end
414
+
415
+
if ~isempty(desired)
416
+
% return a boolean flag
417
+
switchdesired
418
+
case'ext1020'
419
+
type = any(strcmp(type, {'eeg1005''eeg1010''eeg1020''ext1020'}));
420
+
case {'eeg''electrode'}
421
+
type = any(strcmp(type, {'eeg''electrode''ant128''biosemi64''biosemi128''biosemi256''egi32''egi64''egi128''egi256''eeg1005''eeg1010''eeg1020''ext1020'}));
422
+
case'biosemi'
423
+
type = any(strcmp(type, {'biosemi64''biosemi128''biosemi256'}));
424
+
case'egi'
425
+
type = any(strcmp(type, {'egi32''egi64''egi128''egi256'}));
426
+
case'meg'
427
+
type = any(strcmp(type, {'meg''magnetometer''ctf''bti''ctf64''ctf151''ctf275''ctf151_planar''ctf275_planar''neuromag122''neuromag306''bti148''bti148_planar''bti248''bti248_planar''bti248grad''bti248grad_planar''yokogawa9''yokogawa160''yokogawa160_planar''yokogawa64''yokogawa64_planar''yokogawa440''itab''itab28''itab153''itab153_planar'}));
428
+
case'ctf'
429
+
type = any(strcmp(type, {'ctf''ctf64''ctf151''ctf275''ctf151_planar''ctf275_planar'}));
430
+
case'bti'
431
+
type = any(strcmp(type, {'bti''bti148''bti148_planar''bti248''bti248_planar''bti248grad''bti248grad_planar'}));
432
+
case'neuromag'
433
+
type = any(strcmp(type, {'neuromag122''neuromag306'}));
434
+
case'babysquid'
435
+
type = any(strcmp(type, {'babysquid74''artenis123''magview'}));
436
+
case'yokogawa'
437
+
type = any(strcmp(type, {'yokogawa160''yokogawa160_planar''yokogawa64''yokogawa64_planar''yokogawa440'}));
438
+
case'itab'
439
+
type = any(strcmp(type, {'itab''itab28''itab153''itab153_planar'}));
440
+
case'meg_axial'
441
+
% note that neuromag306 is mixed planar and axial
442
+
type = any(strcmp(type, {'neuromag306''ctf64''ctf151''ctf275''bti148''bti248''bti248grad''yokogawa9''yokogawa64''yokogawa160''yokogawa440'}));
443
+
case'meg_planar'
444
+
% note that neuromag306 is mixed planar and axial
445
+
type = any(strcmp(type, {'neuromag122''neuromag306''ctf151_planar''ctf275_planar''bti148_planar''bti248_planar''bti248grad_planar''yokogawa160_planar''yokogawa64_planar'}));
446
+
otherwise
447
+
type = any(strcmp(type, desired));
448
+
end% switch desired
449
+
end% detemine the correspondence to the desired type
450
+
451
+
% remember the current input and output arguments, so that they can be
452
+
% reused on a subsequent call in case the same input argument is given
0 commit comments