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

    # fmt: off
    ch_names = [
        "Fz", "FC3", "FC1", "FCz", "FC2", "FC4", "C5", "C3", "C1", "Cz", "C2",
        "C4", "C6", "CP3", "CP1", "CPz", "CP2", "CP4", "P1", "Pz", "P2", "POz",
        "EOG1", "EOG2", "EOG3",
    ]
    # fmt: on
    ch_types = ["eeg"] * 22 + ["eog"] * 3

    sessions = {}
    for r in ["T", "E"]:
        url = "{u}001-2014/A{s:02d}{r}.mat".format(u=base_url, s=subject, r=r)
        filename = data_path(url, path, force_update, update_path)
        runs, ev = _convert_mi(filename[0], ch_names, ch_types)
        # FIXME: deal with run with no event (1:3) and name them
        sessions["session_%s" % r] = {"run_%d" % ii: run for ii, run in enumerate(runs)}
    return sessions
def _load_data_001_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 ) # fmt: off ch_names = [ "Fz" , "FC3" , "FC1" , "FCz" , "FC2" , "FC4" , "C5" , "C3" , "C1" , "Cz" , "C2" , "C4" , "C6" , "CP3" , "CP1" , "CPz" , "CP2" , "CP4" , "P1" , "Pz" , "P2" , "POz" , "EOG1" , "EOG2" , "EOG3" , ] # fmt: on ch_types = [ "eeg" ] * 22 + [ "eog" ] * 3 sessions = { } for r in [ "T" , "E" ] : url = "{u}001-2014/A{s:02d}{r}.mat" . format ( u = base_url , s = subject , r = r ) filename = data_path ( url , path , force_update , update_path ) runs , ev = _convert_mi ( filename [ 0 ] , ch_names , ch_types ) # FIXME: deal with run with no event (1:3) and name them sessions [ "session_%s" % r ] = { "run_%d" % ii : run for ii , run in enumerate ( runs ) } return sessions