Wonambi
Overview
Wonambi is an open-source package for the analysis of EEG, ECoG and other electrophysiology modalities. It allows for the visualization of data and sleep stage scoring in a GUI, as well as providing automatic detectors for sleep spindles and slow waves.
It is a dependency of seapipe and therefore it is included when you install seapipe.
Reading data
To begin, open python and load wonambi:
(.venv) $ python
>>> from wonambi import dataset
Then you can load a recording by specifying the path to your data.
>>> data = Dataset('/home/username/project/participant/session/eeg/sub-001_ses-01_eeg.edf')
Annotations file
When working with EEG, it is often necessary to tag, or annotate, certain events or periods of the recording that will be analysed at a later stage. In the context of sleep analyses, the most common example of this would be sleep stage scoring, but other events can also be annotated (e.g. spindles, slow oscillations, arousals etc.)
Wonambi utilises an Annotations file, which is in the XML format
BIDS 🧠
When working with BIDS, it has been proposed that an events.tsv file should exist that specifies all events which have been recorded during the session (e.g. which reference presented stimuli with the stimuli directory of the dataset). To learn more about converting between Wonambi’s annotations format and BIDS compatible events.tsv, see Converting between Formats
First load in the function Annotations
>>> from wonambi.attr import Annotations
Then,
Channel Names
[to be edited]
inconsistencies in EEG channel names !!
When working with EEG studies across several different datasets, you may run into the situation when studies might have been collected with different recording devices or software, each with their own convention for naming electrodes. This causes serious headaches when trying to automate analyses in mixed datasets. To learn more about how to set up a tracking sheet, and what column names are required for seapipe, see Tracking Sheet