Exemplo n.º 1
0
def load(subject, event_type):
    with open(op.join(path_data, '%s/behavior_%s.pkl') % (subject, event_type), 'rb') as f:
        events = pickle.load(f)
        # add explicit conditions
        events = complete_behavior(events)
    epochs = mne.read_epochs(op.join(path_data, '%s/epochs_%s.fif') % (subject, event_type))
    if event_type == 'Target':
        epochs.crop(0, .600)
    elif event_type == 'Cue':
        epochs.crop(0, .900)
    elif event_type == 'Probe':
        epochs.crop(0, .600)
    return epochs, events
def load(subject, event_type):
    fname = op.join(path_data, '%s/behavior_%s.hdf5') % (subject, event_type)
    events = read_hdf5(fname)
    # add explicit conditions
    events = complete_behavior(events)
    fname = op.join(path_data, '%s/epochs_%s.fif') % (subject, event_type)
    epochs = mne.read_epochs(fname)
    if event_type == 'Target':
        epochs.crop(0, .600)
    elif event_type == 'Cue':
        epochs.crop(0, .900)
    elif event_type == 'Probe':
        epochs.crop(0, .600)
    return epochs, events