Import, save and add annotationsΒΆ

Import annotations from a text file and annotate trials.

All annotations are added to the Annotations/ tab. Then, select a row of the table to jump to it.

Download an example of annotation file :

from visbrain import Signal
from visbrain.utils import generate_eeg

sf = 512.  # sampling frequency
n_pts = 4000  # number of time points
n_trials = 125  # number of trials in the dataset

"""Generate a random EEG vector of shape (n_trials, n_pts). This time, we
smooth signals and decrease the noise on it.
data, _ = generate_eeg(sf=sf, n_pts=n_pts, n_trials=n_trials, smooth=200,

"""Specify the path to the annotation file :
annotations = 'signal_annotations.txt'

Signal(data, sf=sf, axis=-1, line_lw=2., annotations=annotations).show()

Total running time of the script: ( 0 minutes 0.000 seconds)

Gallery generated by Sphinx-Gallery