Getting Started
Documentation
Documentation can be found here:
Introduction to the fundamental Eelbrain data types.
Examples demonstrating different applications.
Eelbrain, a Python toolkit for time-continuous analysis with temporal response functions: A tutorial on using Eelbrain for analyzing an EEG experiment with temporal response functions. Including a GitHub repoitory with code to reproduce all figures in the paper.
The MneExperiment Pipeline for step-by-step instructions on setting up a M/EEG group level analysis pipeline.
Reference on API and details of all the functionality.
Getting help
To get help, you may want to check (and contribute to):
The Eelbrian wiki.
GitHub Dicussions.
Plots and GUIs
Eelbrain plots have two different “modes”. When created in a notebook, plots are static images, but they can be modified through initial parameters, the plots’ methods, and matplotlib. When created from an iPython terminal, plots should open in separate windows with different GUI elements that allow interaction with the plots. This allows, for example, scrolling through time.
When using a terminal, the terminal usually stays active while allowing interaction with plots. This functionality relies on Prompt Toolkit, and can become unreliable with highly interactive GUIs (primarily the ICA and trial selection GUIs). These GUIs may be more reliable after disabling Prompt Toolkit through calling:
>>> configure(prompt_toolkit=False)
After disabling Prompt Toolkit, the GUI has to be explicitly invoked. This can be done by running gui.run()
:
>>> configure(prompt_toolkit=False)
>>> plot.Array(array_1)
>>> plot.Array(array_2)
>>> gui.run()
Or by using run=True
in a plot command:
>>> configure(prompt_toolkit=False)
>>> plot.Array(array, run=True)
To return control to the Terminal, quit the python
application that opens the plot windows.
Note
On macOS, the GUI backend that Eelbrain uses when run from the command-line interpreter requires a special build of Python called a “Framework build”. Eelbrain installs a shortcut to start IPython with a Framework build:
$ eelbrain
This automatically launches IPython with the “eelbrain” profile. A default startup script that executes from eelbrain import *
is created, and can be changed in the corresponding IPython profile.
Interacting with other Python libraries
- Pandas
Convert an Eelbrain
Dataset
to apandas.DataFrame
usingDataset.as_dataframe()
. Useful libraries: Pingouin (statistics); Seaborn (plotting).- R
When using R from Python through the
rpy2
bridge, transfer data between Rdata.frame
and EelbrainDataset
usingDataset.from_r()
andDataset.to_r()
.
Windows: Scrolling
Scrolling inside a plot axes normally uses arrow keys, but this is currently not possible on Windows (due to an issue in Matplotlib). Instead, the following keys can be used:
↑ |
||
← |
→ |
|
↓ |