Skip to content

janfreyberg/cookiecutter-healthy-brain

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

Cookiecutter template for working with the healthy brain data

This is a template that implements some nice data-import syntax for the Child Mind Institute's Healthy Brain Data.

The main benefit to using this template is the provided data imports.

To see both live in action, take a look at the following notebooks:

Downloading data


For example, to download some data, you can use:

from data.download import download_sample_eeg

download_sample_eeg(n=5)

This will download 5 EEG datasets

Importing data


You can also import data by simply using an import statement:

from data.eeg.preprocessed.resting_state import raws

for raw in raws():
    # <your code here>

You can also import the phenotypic data:

from data import phenotypes

Implemented so far


At the moment, I've implemented raw and preprocessed EEG data imports for the resting-state, the video and the surround suppression conditions. For each one, you can import raws (mne.Raw), epochs (mne.Epochs), and events (nx3 numpy.array).

When import raw data (from data.eeg.raw...), you will literally just get all the data loaded in an MNE data structure. You can import the events and do the epoching yourself: from data.eeg.raw.resting_state import events.

So the following:

from data.eeg.preprocessed.resting_state import raws, events

for raw, event in zip(raws(), events():
    epoch = mne.Epochs(raw, event, tmin=0, tmax=20)

would be equivalent to:

from data.eeg.preprocessed.resting_state import epochs

for epoch in epochs(tmin=0, tmax=20):
    pass

The epoching is done semi-intelligently, so for example, when importing for the video condition, you get Epochs that start with the video start and end with the video end. Do double check each import and how epochs are defined, simply check the corresponding python scripts!

To be implemented


Similar import statements for the rest of the EEG data, and the MRI data.

About

A template for downloading & using the healthy brain network data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published