Simply EEGLAB

Source localization with DIPFIT

Station 10 · Lesson 1 · EEGLAB 2026.1

In the GUI

  1. FileManage EEGLAB extensionsYes eeglabFieldtrip-lite extension is not installed. Do you want to download it now?
  2. EditChannel locations
  3. Look up locsuse MNI coordinate file for BEM dipfit modelOk
  4. Ok Channel lookup: no location for EOG1,EOG2
  5. ToolsSource localization using DIPFITHead model and settings
  6. Select a head modelTemplate Boundary Element Model (MNI)
  7. Matrix to align chan. locs. with head model -1.5708
  8. Ok Warning: 2 channels without coordinates removed from dipole fitting
  9. ToolsSource localization using DIPFITComponent dipole autofit
  10. Component indices (default:all)
  11. Rejection threshold RV (%) 100
  12. Plot resulting dipoles using dipplot (check)Ok
  13. PlotComponent mapsIn 2-DPlot associated dipole(s) (if present) 1:12
  14. ToolsSource localization using DIPFITComponent dipole plotPlot summary modeOk
  15. FileSave current dataset as D1_dipfit.set

Script

if ~exist('ft_dipolefitting', 'file')
    plugin_askinstall('Fieldtrip-lite', 'ft_dipolefitting', true);
end
EEG.setname = 'D1 dipfit';
EEG = pop_chanedit(EEG, 'lookup', 'standard_1005.elc');
EEG = pop_dipfit_settings(EEG, 'model', 'standardBEM');
disp(EEG.dipfit.coord_transform);   % expect 0 0 0 0 0 -1.5708 1 1 1
EEG = pop_multifit(EEG, [], 'threshold', 100);
rv = 100 * [EEG.dipfit.model.rv];
fprintf('IC %2d: RV = %5.1f%%\n', [1:numel(rv); rv]);
fprintf('%d of %d components below 15%% RV\n', sum(rv < 15), numel(rv));
pop_topoplot(EEG, 0, 1:12, 'D1 dipfit', 0, 1);
pop_dipplot(EEG, 1:numel(EEG.dipfit.model), 'normlen', 'on', 'summary', 'on', 'num', 'on');
EEG = pop_saveset(EEG, 'filename', 'D1_dipfit.set', 'filepath', pwd);

Which value should I choose?

SettingValue
Head modelTemplate Boundary Element Model (MNI)
Dipole acceptance limitResidual variance below 15%
Rejection threshold during the fit100% while learning
Number of dipolesOne; two symmetric dipoles only when the map is symmetric across hemispheres

For your Methods

Equivalent current dipoles were fitted to each independent component (pop_multifit, dipfit plugin 5.6, EEGLAB 2026.1) using the template boundary element head model (MNI) and template electrode positions (standard_1005); components with residual variance above 15% were considered non-dipolar.

Full lesson: https://simplyeeglab.pages.dev/en/lesson/dipfit/

Content license: CC BY-NC-SA 4.0 · MIT (code)

An independent learning site, not affiliated with EEGLAB or SCCN.