eeg_utils module

eeg_utils.getchannelnamesfromedffile(edffilepath)

Return the names of the channels from an EDF file

Parameters:
edffilepath : str

Path of the edf file

Returns:
ch_names : array

Channel names

eeg_utils.io_eeg_to_mne(filepath, read_data=True)

Import an EEG file to MNE as a Raw instance. Supported formats : ‘edf’, ‘eeg’, ‘trc’

Parameters:
filepath : str

EEG filepath

read_data : bool (default: True)

If True, read the data

Returns:
mne_raw : MNE RAW instance

Output MNE structure

ch_names : list

Channel names

eeg_utils.readfileedf(edfilepath, t_start=[], t_end=[], channel_sel=[])

Read an edf file using the mne package

Parameters:
edfilepath : str

Filepath

t_start : float | none

Starting time of the selection

t_end : float | none

Ending time of the selection

channel_sel : list | array

Index of selected channels - if none select all channels

Returns:
data : array

data matrix

times : array

time vector

raw.info :

mne-type dictionnary containing informations about the signal

eeg_utils.smooth1d(x, w, mode='valid')

Smooth a 1D-array using a convolution between the input array x and the window w. The window is normalized before the convolution.

Parameters:
x : array

Input array to be smoothed

w : array

Window used to smooth the array

mode : str (default: ‘valid’)

Convolution mode

Returns:
y : array

Smooted array