eegyolk.rawf 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 related to reproduction of 2021 work. Specifically, it helps reading in raw data from known types of files.
- class eegyolk.rawf.RawData(raw_data_dir, meta_dir)¶
Bases:
object- age_files = {11: 'ages_11mnths.txt', 17: 'ages_17mnths.txt', 23: 'ages_23mnths.txt', 29: 'ages_29mnths.txt', 35: 'ages_35mnths.txt', 41: 'ages_41mnths.txt', 47: 'ages_47mnths.txt'}¶
- age_groups = {11: '11mnd mmn', 17: '17mnd mmn', 23: '23mnd mmn', 29: '29mnd mmn', 35: '35mnd mmn', 41: '41mnd mmn', 47: '47mnd mmn'}¶
- property as_mne¶
- breakdown_by_age()¶
- cnt_read_args = {'data_format': 'int16', 'date_format': 'dd/mm/yy', 'eog': 'auto', 'verbose': False}¶
- count_events()¶
- fill_unlabeled()¶
Fill in the missing age data based on the age group the subject is in
We know the age group (i.e. 11, 17, 23, … months etc) of all the subjects, based on the folder the files are in and based on the file name. We have got the exact ages (in days) of most subjects seperately, which we have added to the DataFrame above. For some of the subjects, we don’t have the exact age and therefore we set this equal to the age group.
- filter_broken()¶
This did not exist in the original code, but it makes it easier to deal with MNE file reading errors: we just try reading all the files once, and sort them into two groups: raw_good and raw_bad.
- read_age_group(raw_data_dir, age_group, directory)¶
- read_ages_meta(meta_dir)¶
- read_all_age_groups(raw_data_dir)¶
- read_cnt(fname, preload=True)¶
- read_good_cnt(fname, preload=True)¶
- unlabeled()¶
- class eegyolk.rawf.RawDataBdf(raw_data_dir, meta_dir)¶
Bases:
objectDoc
- breakdown_by_age(sample='a')¶
- filter_broken()¶
This did not exist in the original code, but it makes it easier to deal with MNE file reading errors: we just try reading all the files once, and sort them into two groups: raw_good and raw_bad.
- read_bdf(fname, preload=True)¶
- class eegyolk.rawf.SwitchedRawData(raw_data_dir, meta_dir)¶
Bases:
object- age_files = {11: 'ages_11mnths.txt', 17: 'ages_17mnths.txt', 23: 'ages_23mnths.txt', 29: 'ages_29mnths.txt', 35: 'ages_35mnths.txt', 41: 'ages_41mnths.txt', 47: 'ages_47mnths.txt'}¶
- age_groups = {11: '11mnd mmn', 17: '17mnd mmn', 23: '23mnd mmn', 29: '29mnd mmn', 35: '35mnd mmn', 41: '41mnd mmn', 47: '47mnd mmn'}¶
- property as_mne¶
- breakdown_by_age()¶
- cnt_read_args = {'data_format': 'int32', 'date_format': 'dd/mm/yy', 'eog': 'auto', 'verbose': False}¶
- count_events()¶
- fill_unlabeled()¶
Fill in the missing age data based on the age group the subject is in
We know the age group (i.e. 11, 17, 23, … months etc) of all the subjects, based on the folder the files are in and based on the file name. We have got the exact ages (in days) of most subjects seperately, which we have added to the DataFrame above. For some of the subjects, we don’t have the exact age and therefore we set this equal to the age group.
- filter_broken()¶
This did not exist in the original code, but it makes it easier to deal with MNE file reading errors: we just try reading all the files once, and sort them into two groups: raw_good and raw_bad.
- read_age_group(raw_data_dir, age_group, directory)¶
- read_ages_meta(meta_dir)¶
- read_all_age_groups(raw_data_dir)¶
- read_cnt(fname, preload=True)¶
- read_good_cnt(fname, preload=True)¶
- unlabeled()¶