mne.count_annotations#

mne.count_annotations(annotations)[source]#

Count annotations.

Parameters:
annotationsmne.Annotations

The annotations instance.

Returns:
countsdict

A dictionary containing unique annotation descriptions as keys with their counts as values.

Examples

>>> annotations = mne.Annotations([0, 1, 2], [1, 2, 1], ["T0", "T1", "T0"])
>>> count_annotations(annotations)
{'T0': 2, 'T1': 1}