Simply EEGLAB
1-Hz filtering for ICA & copying weights
Station 4 · Lesson 4 · EEGLAB 2026.1
In the GUI
- Datasets
D1 mainD1 ica1hz - ICA weightsYes
- ICA weightsNoChannels per frame
- EditDataset info
- ICA weights array or text/binary file (if any):from other datasetOK
2ALLEEG(2).icaweightsALLEEG(2).icasphereALLEEG(2).icachansind - OKICA weightsYes
- PlotComponent mapsIn 2-D
- FileSave current dataset as
D1_main_ica.set
Script
EEG_main.icaweights = EEG_ica.icaweights;
EEG_main.icasphere = EEG_ica.icasphere;
EEG_main.icachansind = EEG_ica.icachansind;
EEG_main.icawinv = []; % recomputed by eeg_checkset
EEG_main.icaact = [];
EEG = eeg_checkset(EEG_main);
fprintf('Same weights: %d\n', isequal(EEG.icaweights, EEG_ica.icaweights));
fprintf('Largest scalp map difference: %g\n', max(abs(EEG.icawinv(:) - EEG_ica.icawinv(:))));
fprintf('ICA components: %d\n', size(EEG.icawinv, 2));
epMain = pop_rmbase(pop_epoch(EEG, {'square'}, [-0.2 0.8]), [-200 0]);
epIca = pop_rmbase(pop_epoch(EEG_ica, {'square'}, [-0.2 0.8]), [-200 0]);
pz = find(strcmp({EEG.chanlocs.labels}, 'Pz'));
win = epMain.times >= 300 & epMain.times <= 600;
erpMain = mean(epMain.data(pz, :, :), 3);
erpIca = mean(epIca.data(pz, :, :), 3);
fprintf('Mean at Pz, 300-600 ms: 0.1 Hz copy %.2f uV, 1 Hz copy %.2f uV\n', ...
mean(erpMain(win)), mean(erpIca(win)));
figure;
plot(epMain.times, erpMain, epIca.times, erpIca);
legend('Main dataset (0.1 Hz)', 'ICA copy (1 Hz)');
xlabel('Time (ms)'); ylabel('Amplitude (uV)');
EEG = pop_saveset(EEG, 'filename', 'D1_main_ica.set', 'filepath', pwd);Which value should I choose?
| Setting | Value |
|---|---|
| High-pass for the ICA copy | 1 Hz |
| If components stay ambiguous | 2 Hz |
| High-pass for the main dataset | 0.1 Hz, unchanged |
| What you copy | icaweights, icasphere, and icachansind |
| Channels in the two copies | Exactly the same, in the same order |
Check
- Main window
- Same maps
- The script check
- The ERP stays whole
For your Methods
Independent component analysis (extended Infomax; Lee et al., 1999) was computed with runica ([31] components after PCA reduction to the data rank) on a copy of the data high-pass filtered at 1 Hz, and the resulting weights were applied to the 0.1 Hz high-pass filtered data.