mne_run_code
Run custom Python/MNE code in a persistent session with access to loaded data, returning final expression values, captured stdout, and matplotlib figures as PNG paths.
Instructions
Execute arbitrary Python/MNE code in the persistent session namespace. Pre-bound names: mne, np, pd, plt, plus every object you have loaded (e.g. raw, epochs, evoked, ica). Like a notebook cell: the value of a final expression is returned, stdout is captured, and any matplotlib figures are saved as PNG (paths returned). Use this for anything the structured tools do not cover.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |