eegyolk.helper_functions module

Copyright 2022 Netherlands eScience Center and Utrecht University. Licensed under the Apache License, version 2.0. See LICENSE for details.

This file contains functions originally designed to work with ePODIUM EEG data, that can be applied to other EEG data as well.

eegyolk.helper_functions.band_pass_filter(data_raw, lo_freq, hi_freq)

Band pass filter code to filter out certain frequencies.

Parameters
  • data_raw (mne.io.Raw) – raw EEG data, result of mne.io.read_raw functions

  • lo_freq (int) – Hertz below which to disinclude

  • high_freq (int) – Hertz above which to disinclude

Returns

filtered

Return type

array

eegyolk.helper_functions.create_epoch(eeg, event_markers_simplified, time_before_event, time_after_event, autoreject=False)

This function turns eeg data into epochs. Inputs are eeg data files, event parkers, time before event, and time after event Outputs are eeg data divided in epochs

eegyolk.helper_functions.evoked_responses(epochs, avg_variable)

This function creates an average evoked response for each event. The input is epoched data, variable where needs to be averaged on e.g. average per participant per event The output is evoked responses

eegyolk.helper_functions.filter_eeg_raw(eeg, lowpass, highpass, freqs, mastoid_channels, drop_ch)

This is a filtering function for eeg data.

eegyolk.helper_functions.hash_it_up_right_all(folder, extension)

This function creates a hash signature for every file in a folder, with a specified extension (e.g. cnt or fif) and then puts the hases into a table.

Parameters

folder (string) – the folder with files to hasg

Returns

dataframe

Return type

pandas.core.frame.DataFrame

eegyolk.helper_functions.input_mmr_prep(metadata, epochs, standard_events)

This function creates calculations about mis-match response over a set of participant data.

eegyolk.helper_functions.load_metadata(filename, path_metadata, path_output, make_excel_files=True, make_csv_files=True)

Loads the metadata stored in the metadata folder, and makes an excel or csv from the txt. Inputs are filename, path_metadata(file where metadata is), ) make_excel_files, make_csv_files (True makes this type of file), path_output(where we put the file) Outputs are a csv and/or excel file