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

    # FIXME there is two type of speller, grid speller and geo-speller.
    # we load only grid speller data
    url = "{u}009-2014/A{s:02d}S.mat".format(u=base_url, s=subject)
    filename = data_path(url, path, force_update, update_path)[0]

    data = loadmat(filename, struct_as_record=False, squeeze_me=True)["data"]
    sess = []
    event_id = {}
    for run in data:
        raw, ev = _convert_run_p300_sl(run, verbose=verbose)
        sess.append(raw)
        event_id.update(ev)

    sessions = {}
    for i, sessi in enumerate(sess):
        sessions["session_" + str(i)] = {"run_0": sessi}

    return sessions
def _load_data_009_2014 ( subject , path = None , force_update = False , update_path = None , base_url = BNCI_URL , verbose = None , ) : if ( subject < 1 ) or ( subject > 10 ) : raise ValueError ( "Subject must be between 1 and 10. Got %d." % subject ) # FIXME there is two type of speller, grid speller and geo-speller. # we load only grid speller data url = "{u}009-2014/A{s:02d}S.mat" . format ( u = base_url , s = subject ) filename = data_path ( url , path , force_update , update_path ) [ 0 ] data = loadmat ( filename , struct_as_record = False , squeeze_me = True ) [ "data" ] sess = [ ] event_id = { } for run in data : raw , ev = _convert_run_p300_sl ( run , verbose = verbose ) sess . append ( raw ) event_id . update ( ev ) sessions = { } for i , sessi in enumerate ( sess ) : sessions [ "session_" + str ( i ) ] = { "run_0" : sessi } return sessions