Skip to content

Add yasa.Hypnogram.as_events() example #191

@remrama

Description

@remrama

The new yasa.Hypnogram class has a method .as_events() that complies with some of the MNE annotation norms and possibly BIDS event files.

It would be nice to have an example of this in the documentation, either in a notebook or a docstrings example.

One possibility is an example on how to add the events returned from hyp.as_events() to an MNE raw object with raw.set_annotations().

annotations = mne.Annotations(onset, duration, description)
raw.set_annotations(annotations)

See MNE events_from_annotations and annotations_from_events.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions