(filename, ch_names, ch_types)
return runs, event_id
Processes (Graz) motor imagery data from MAT files, returns list of
    recording runs.
Processes (Graz) motor imagery data from MAT files, returns list of
    recording runs.
Processes ( Graz ) motor imagery data from MAT files returns list of recording runs .
def _convert_mi(filename, ch_names, ch_types):
    """
    Processes (Graz) motor imagery data from MAT files, returns list of
    recording runs.
    """
    runs = []
    event_id = {}
    data = loadmat(filename, struct_as_record=False, squeeze_me=True)

    if isinstance(data["data"], np.ndarray):
        run_array = data["data"]
    else:
        run_array = [data["data"]]

    for run in run_array:
        raw, evd = _convert_run(run, ch_names, ch_types, None)
        if raw is None:
            continue
        runs.append(raw)
        event_id.update(evd)
    # change labels to match rest
    standardize_keys(event_id)
    return runs, event_id
def _convert_mi ( filename , ch_names , ch_types ) : runs = [ ] event_id = { } data = loadmat ( filename , struct_as_record = False , squeeze_me = True ) if isinstance ( data [ "data" ] , np . ndarray ) : run_array = data [ "data" ] else : run_array = [ data [ "data" ] ] for run in run_array : raw , evd = _convert_run ( run , ch_names , ch_types , None ) if raw is None : continue runs . append ( raw ) event_id . update ( evd ) # change labels to match rest standardize_keys ( event_id ) return runs , event_id