(run, verbose=None)
return raw, event_id
Convert one p300 run from santa lucia file format.
Convert one p300 run from santa lucia file format.
Convert one p300 run from santa lucia file format .
def _convert_run_p300_sl(run, verbose=None):
    """Convert one p300 run from santa lucia file format."""
    montage = make_standard_montage("standard_1005")
    eeg_data = 1e-6 * run.X
    sfreq = 256
    ch_names = list(run.channels) + ["Target stim", "Flash stim"]
    ch_types = ["eeg"] * len(run.channels) + ["stim"] * 2

    flash_stim = run.y_stim
    flash_stim[flash_stim > 0] += 2
    eeg_data = np.c_[eeg_data, run.y, flash_stim]
    event_id = {ev: (ii + 1) for ii, ev in enumerate(run.classes)}
    event_id.update({ev: (ii + 3) for ii, ev in enumerate(run.classes_stim)})
    info = create_info(ch_names=ch_names, ch_types=ch_types, sfreq=sfreq)
    raw = RawArray(data=eeg_data.T, info=info, verbose=verbose)
    raw.set_montage(montage)
    return raw, event_id
def _convert_run_p300_sl ( run , verbose = None ) : montage = make_standard_montage ( "standard_1005" ) eeg_data = 1e-6 * run . X sfreq = 256 ch_names = list ( run . channels ) + [ "Target stim" , "Flash stim" ] ch_types = [ "eeg" ] * len ( run . channels ) + [ "stim" ] * 2 flash_stim = run . y_stim flash_stim [ flash_stim > 0 ] += 2 eeg_data = np . c_ [ eeg_data , run . y , flash_stim ] event_id = { ev : ( ii + 1 ) for ii , ev in enumerate ( run . classes ) } event_id . update ( { ev : ( ii + 3 ) for ii , ev in enumerate ( run . classes_stim ) } ) info = create_info ( ch_names = ch_names , ch_types = ch_types , sfreq = sfreq ) raw = RawArray ( data = eeg_data . T , info = info , verbose = verbose ) raw . set_montage ( montage ) return raw , event_id