biopsykit.signals.eeg package

Module for EEG data analysis and visualization.

class biopsykit.signals.eeg.EegProcessor(data, sampling_rate=None, time_intervals=None, include_start=False)[source]

Bases: biopsykit.signals._base._BaseProcessor

Initialize an EegProcessor instance.

You can either pass a data dictionary ‘data_dict’ containing EEG data or dataframe containing EEG data. For the latter, you can additionally supply time information via time_intervals parameter to automatically split the data into single phases.

Parameters
  • data (DataFrame or dict) – dataframe (or dict of such) with EEG data

  • sampling_rate (float, optional) – sampling rate of recorded data

  • time_intervals (dict or Series, optional) – time intervals indicating how data should be split. Can either be a Series with the start times of the single phases (the phase names are then derived from the index) or a dictionary with tuples indicating start and end times of phases (the phase names are then derived from the dict keys). Default: None (data is not split further)

  • include_start (bool, optional) – True to include the data from the beginning of the recording to the first time interval as the first phase (then named Start), False otherwise. Default: False

eeg_result: Dict[str, pandas.core.frame.DataFrame]

Dictionary with EEG processing result dataframes, split into different phases.

relative_band_energy(freq_bands=None, title=None)[source]

Process EEG signal.

Parameters
  • freq_bands (dict) –

    dictionary with frequency bounds of EEG frequency bands. By default (None) the following frequency band definition (in Hz) is used:

    • theta: [4, 8]

    • alpha: [8, 13]

    • beta: [13, 30]

    • gamma: [30, 44]

  • title (str, optional) – title of ECG processing progress bar in Jupyter Notebooks or None to leave empty. Default: None

Return type

None