Skip to content

Commit 51674ea

Browse files
Revert "automatically synchronized identical files to d18e73b"
This reverts commit 3b5b2c8.
1 parent 081b920 commit 51674ea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+607
-4
lines changed

connectivity/private/det2x2.mexmaci64

8.78 KB
Binary file not shown.
9.95 KB
Binary file not shown.

connectivity/private/ft_getopt.mexw32

8.5 KB
Binary file not shown.

fileio/private/ft_getopt.mexmaci

9.95 KB
Binary file not shown.

fileio/private/ft_getopt.mexw32

8.5 KB
Binary file not shown.

fileio/private/ft_senstype.m

Lines changed: 116 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,4 +339,119 @@
339339
elseif (mean(ismember(ft_senslabel('yokogawa64'), sens.label)) > 0.4)
340340
type = 'yokogawa64';
341341
elseif (mean(ismember(ft_senslabel('yokogawa64_planar'), sens.label)) > 0.4)
342-
type =
342+
type = 'yokogawa64_planar';
343+
elseif all(ismember(ft_senslabel('yokogawa9'), sens.label))
344+
type = 'yokogawa9';
345+
346+
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
349+
type = 'neuromag122';
350+
351+
elseif (mean(ismember(ft_senslabel('biosemi256'), sens.label)) > 0.8)
352+
type = 'biosemi256';
353+
elseif (mean(ismember(ft_senslabel('biosemi128'), sens.label)) > 0.8)
354+
type = 'biosemi128';
355+
elseif (mean(ismember(ft_senslabel('biosemi64'), sens.label)) > 0.8)
356+
type = 'biosemi64';
357+
elseif (mean(ismember(ft_senslabel('egi256'), sens.label)) > 0.8)
358+
type = 'egi256';
359+
elseif (mean(ismember(ft_senslabel('egi128'), sens.label)) > 0.8)
360+
type = 'egi128';
361+
elseif (mean(ismember(ft_senslabel('egi64'), sens.label)) > 0.8)
362+
type = 'egi64';
363+
elseif (mean(ismember(ft_senslabel('egi32'), sens.label)) > 0.8)
364+
type = 'egi32';
365+
366+
% the following check on the fraction of channels in the user's data rather than on the fraction of channels in the predefined set
367+
elseif (mean(ismember(sens.label, ft_senslabel('eeg1020'))) > 0.8)
368+
type = 'eeg1020';
369+
elseif (mean(ismember(sens.label, ft_senslabel('eeg1010'))) > 0.8)
370+
type = 'eeg1010';
371+
elseif (mean(ismember(sens.label, ft_senslabel('eeg1005'))) > 0.8)
372+
type = 'eeg1005';
373+
374+
elseif (sum(ismember(sens.label, ft_senslabel('eeg1005'))) > 10) % Otherwise it's not even worth recognizing
375+
type = 'ext1020'; % this will also cover small subsets of eeg1020, eeg1010 and eeg1005
376+
elseif any(ismember(ft_senslabel('btiref'), sens.label))
377+
type = 'bti'; % it might be 148 or 248 channels
378+
elseif any(ismember(ft_senslabel('ctfref'), sens.label))
379+
type = 'ctf'; % it might be 151 or 275 channels
380+
381+
% elseif (mean(ismember(sens.label, ft_senslabel('nirs'))) > 0.8)
382+
% type = 'nirs';
383+
end
384+
end % look at label, ori and/or pos
385+
end % if isfield(sens, 'type')
386+
387+
if strcmp(type, 'unknown') && ~recursion
388+
% try whether only lowercase channel labels makes a difference
389+
if islabel
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+
if islabel
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+
switch desired
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
453+
current_argout = {type};
454+
previous_argin = current_argin;
455+
previous_argout = current_argout;
456+
457+
return % ft_senstype main()
8.48 KB
Binary file not shown.

fileio/private/mxSerialize_c.mexa64

7.86 KB
Binary file not shown.

fileio/private/mxSerialize_cpp.mexw32

6.5 KB
Binary file not shown.

forward/ft_senstype.m

Lines changed: 116 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,4 +339,119 @@
339339
elseif (mean(ismember(ft_senslabel('yokogawa64'), sens.label)) > 0.4)
340340
type = 'yokogawa64';
341341
elseif (mean(ismember(ft_senslabel('yokogawa64_planar'), sens.label)) > 0.4)
342-
type =
342+
type = 'yokogawa64_planar';
343+
elseif all(ismember(ft_senslabel('yokogawa9'), sens.label))
344+
type = 'yokogawa9';
345+
346+
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
349+
type = 'neuromag122';
350+
351+
elseif (mean(ismember(ft_senslabel('biosemi256'), sens.label)) > 0.8)
352+
type = 'biosemi256';
353+
elseif (mean(ismember(ft_senslabel('biosemi128'), sens.label)) > 0.8)
354+
type = 'biosemi128';
355+
elseif (mean(ismember(ft_senslabel('biosemi64'), sens.label)) > 0.8)
356+
type = 'biosemi64';
357+
elseif (mean(ismember(ft_senslabel('egi256'), sens.label)) > 0.8)
358+
type = 'egi256';
359+
elseif (mean(ismember(ft_senslabel('egi128'), sens.label)) > 0.8)
360+
type = 'egi128';
361+
elseif (mean(ismember(ft_senslabel('egi64'), sens.label)) > 0.8)
362+
type = 'egi64';
363+
elseif (mean(ismember(ft_senslabel('egi32'), sens.label)) > 0.8)
364+
type = 'egi32';
365+
366+
% the following check on the fraction of channels in the user's data rather than on the fraction of channels in the predefined set
367+
elseif (mean(ismember(sens.label, ft_senslabel('eeg1020'))) > 0.8)
368+
type = 'eeg1020';
369+
elseif (mean(ismember(sens.label, ft_senslabel('eeg1010'))) > 0.8)
370+
type = 'eeg1010';
371+
elseif (mean(ismember(sens.label, ft_senslabel('eeg1005'))) > 0.8)
372+
type = 'eeg1005';
373+
374+
elseif (sum(ismember(sens.label, ft_senslabel('eeg1005'))) > 10) % Otherwise it's not even worth recognizing
375+
type = 'ext1020'; % this will also cover small subsets of eeg1020, eeg1010 and eeg1005
376+
elseif any(ismember(ft_senslabel('btiref'), sens.label))
377+
type = 'bti'; % it might be 148 or 248 channels
378+
elseif any(ismember(ft_senslabel('ctfref'), sens.label))
379+
type = 'ctf'; % it might be 151 or 275 channels
380+
381+
% elseif (mean(ismember(sens.label, ft_senslabel('nirs'))) > 0.8)
382+
% type = 'nirs';
383+
end
384+
end % look at label, ori and/or pos
385+
end % if isfield(sens, 'type')
386+
387+
if strcmp(type, 'unknown') && ~recursion
388+
% try whether only lowercase channel labels makes a difference
389+
if islabel
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+
if islabel
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+
switch desired
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
453+
current_argout = {type};
454+
previous_argin = current_argin;
455+
previous_argout = current_argout;
456+
457+
return % ft_senstype main()

0 commit comments

Comments
 (0)