示例#1
0
def read_eeg_file(left_data_file,
                  right_data_file,
                  time_length,
                  time_window,
                  epoch_size=None,
                  training=True):
    return EEG(
        *(__read_eeg_file(left_data_file, right_data_file, time_length,
                          time_window, epoch_size)), training)
def read_eeg_files(path_files, time_length=None, time_window=None, epoch_size=None, training=True):
    left_data = None
    right_data = None
    for left_data_file, right_data_file in path_files:
        next_data = __read_eeg_file(left_data_file, right_data_file, time_length, time_window, epoch_size)

        if left_data is None:
            left_data, right_data = next_data
        else:
            next_left_data, next_right_data = next_data
            left_data = np.concatenate((left_data, next_left_data))
            right_data = np.concatenate((right_data, next_right_data))

    return EEG(left_data, right_data, training)
def read_eeg_file(left_data_file, right_data_file, time_length=None, time_window=None,
                  epoch_size=None, channels_indexes=None, training=True):
    return EEG(*(__read_eeg_file(left_data_file, right_data_file, time_length,
                                 time_window, epoch_size, channels_indexes)), training)