Computes an MEG/EEG forward solution (lead-field matrix) using MNE-Python's
mne.make_forward_solution. The forward solution maps from source space (dipoles on the
cortical surface) to sensor space (MEG/EEG channels). It combines a pre-computed source space
(src.fif), a coregistration transform (trans.fif), and a BEM solution (bem-sol.fif). If no
source space is provided, the app falls back to an fsaverage oct6 template source space; if no
trans/BEM is provided and the data is EEG-only, it falls back to the fsaverage 3-layer template
BEM (a sphere model is not used because radial dipoles give zero potential on a perfect sphere).
The app generates:
- the forward solution (
fwd.fif) - an HTML report
- a sensor-head alignment figure, when the fsaverage template source space is used
mne(neuro/meeg/mne/raw): continuous data, used for channel info and projectors (one ofmne/epo/evokedrequired)epo(neuro/meeg/mne/epochs): epoched data, used for channel info and projectors (one ofmne/epo/evokedrequired)evoked(neuro/meeg/mne/evoked): evoked/averaged data, used for channel info and projectors (one ofmne/epo/evokedrequired)output(raw, taggedsource_space): pre-computed source space directory from app-source-space-v2 (optional; falls back to an fsaverageoct6template source space if absent)trans(neuro/meeg/mne/trans): coregistration transform from app-coreg-v2 (optional for EEG-only data, required for MEG)fif(neuro/meg/fif): BEM solution from app-bem-v2 (optional for EEG-only data, required for MEG)
If multiple of mne/epo/evoked are provided, the most downstream/processed one is used, in
the order evoked > epochs > raw.
out_dir/fwd.fif(neuro/meeg/mne/forward-inverse): the forward solution (lead-field matrix)out_report/report.html: HTML reportout_figs/alignment.png: sensor-head alignment figure (only when the fsaverage template source space is used)
| key | type | default | description |
|---|---|---|---|
mindist |
number | 5.0 |
Minimum distance (mm) of sources from the inner skull surface; sources closer than this are removed. |
- Select your sensor data (
mne,epo, orevoked) as input. - Optionally select a source space (
output, from app-source-space-v2), a coregistration transform (trans, from app-coreg-v2), and a BEM solution (fif, from app-bem-v2). - Set
mindistif the default is not appropriate. - Submit the process.
- Review the alignment figure (if present) and the HTML report in the output viewer.
# Edit config.json to point "mne"/"epo"/"evoked", "output", "trans" and "fif" at real files, then:
python main.pyapp-source-space-v2 → src.fif ─┐
app-coreg-v2 → trans.fif ├→ app-forward-v2 → fwd.fif
app-bem-v2 → bem.fif ─┘
epochs / evoked / raw ─────────────┘
- Guiomar Niso (https://github.com/guiomar)
- Antonio Caulín (https://github.com/AntonioCauAt)
- Maximilien Chaumon (https://github.com/dnacombo)
- obVdo (https://github.com/obVdo)
- Hayashi, S., Caron, B.A., Heinsfeld, A.S. et al. brainlife.io: a decentralized and open-source cloud platform to support neuroscience research. Nat Methods 21, 809–813 (2024). https://doi.org/10.1038/s41592-024-02237-2
- Gramfort, A. et al. MEG and EEG data analysis with MNE-Python. Front. Neurosci. 7, 267 (2013). https://doi.org/10.3389/fnins.2013.00267
brainlife.io is publicly funded and for the sustainability of the project it is helpful to acknowledge the use of the platform. We kindly ask that you acknowledge the funding below in your code and publications.
Copyright (c) 2026 MEEG Brainlife team. Licensed under AGPL-3.0, see license.txt.