(
    subject,
    path=None,
    force_update=False,
    update_path=None,
    base_url=BNCI_URL,
    verbose=None,
)
return sessions
Load data for 004-2014 dataset.
Load data for 004-2014 dataset.
Load data for 004 - 2014 dataset .
def _load_data_004_2014(
    subject,
    path=None,
    force_update=False,
    update_path=None,
    base_url=BNCI_URL,
    verbose=None,
):
    """Load data for 004-2014 dataset."""
    if (subject < 1) or (subject > 9):
        raise ValueError("Subject must be between 1 and 9. Got %d." % subject)

    ch_names = ["C3", "Cz", "C4", "EOG1", "EOG2", "EOG3"]
    ch_types = ["eeg"] * 3 + ["eog"] * 3

    sessions = []
    for r in ["T", "E"]:
        url = "{u}004-2014/B{s:02d}{r}.mat".format(u=base_url, s=subject, r=r)
        filename = data_path(url, path, force_update, update_path)[0]
        raws, _ = _convert_mi(filename, ch_names, ch_types)
        sessions.extend(raws)

    sessions = {"session_%d" % ii: {"run_0": run} for ii, run in enumerate(sessions)}
    return sessions
def _load_data_004_2014 ( subject , path = None , force_update = False , update_path = None , base_url = BNCI_URL , verbose = None , ) : if ( subject < 1 ) or ( subject > 9 ) : raise ValueError ( "Subject must be between 1 and 9. Got %d." % subject ) ch_names = [ "C3" , "Cz" , "C4" , "EOG1" , "EOG2" , "EOG3" ] ch_types = [ "eeg" ] * 3 + [ "eog" ] * 3 sessions = [ ] for r in [ "T" , "E" ] : url = "{u}004-2014/B{s:02d}{r}.mat" . format ( u = base_url , s = subject , r = r ) filename = data_path ( url , path , force_update , update_path ) [ 0 ] raws , _ = _convert_mi ( filename , ch_names , ch_types ) sessions . extend ( raws ) sessions = { "session_%d" % ii : { "run_0" : run } for ii , run in enumerate ( sessions ) } return sessions