File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 1111% check for ica
1212assert(isfield(EEG , ' icawinv' ), ' You must have an ICA decomposition to use ICLabel' )
1313
14- % calculate ica activations if missing
14+ % calculate ica activations if missing and cast to double
1515if isempty(EEG .icaact )
1616 EEG.icaact = eeg_getica(EEG );
1717end
18+ EEG.icaact = double(EEG .icaact );
1819
1920% check ica is real
2021assert(isreal(EEG .icaact ), ' Your ICA decomposition must be real to use ICLabel' )
Original file line number Diff line number Diff line change @@ -35,9 +35,11 @@ function run_tests()
3535 EEG = pop_epoch(EEG , {' square' }, [-1 1 ]);
3636 end
3737
38- %% test complete ICA
38+ %% test complete ICA with data as singles
3939
4040 EEG_temp = setup(EEG , icasphere , icaweights , 1 : 32 );
41+ EEG_temp.data = single(EEG_temp .data );
42+ EEG_temp.icaact = single(EEG_temp .icaact );
4143
4244 test_iclabel(EEG_temp )
4345
You can’t perform that action at this time.
0 commit comments