EEG headset¶
A class representing a headset device used for EEG data acquisition.
Interface¶
- class src.data_acquisition.eeg_headset.EEGHeadset(*, debug: bool = False, logger: Logger | None = None)[source]¶
Bases:
ABC- __init__(*, debug: bool = False, logger: Logger | None = None) None[source]¶
- Parameters:
debug – If True, the EEG device will not actually be used and no recording will be made.
- annotate(annotation: str) None[source]¶
Makes an annotation in the EEG recording.
- Parameters:
annotation – Annotation text.
- Raises:
EEGHeadsetError – If the EEG headset is not running, or if it had been disconnected.
- disconnect() None[source]¶
Should be called after the EEG headset is no longer needed. Some EEG devices may perform cleanup operations here. If called, the object cannot be used anymore.
- Raises:
EEGHeadsetError – If the EEG headset has already been disconnected.
How to subclass¶
Subclasses should implement the following methods:
_start()_stop_and_save_at_path(save_path: Path)_annotate(annotation: str)optionally
_disconnect()- if the headset requires a specific disconnection procedure. Empty by default.