(self, subject)
return sessions
return data for a single subject
return data for a single subject
return data for a single subject
def _get_single_subject_data(self, subject):
        """return data for a single subject"""
        file_path_list = self.data_path(subject)

        data = loadmat(file_path_list[0])
        x = data["x"]
        fs = data["fs"]
        ch_names = ["ch" + str(i) for i in range(8)] + ["stim"]
        ch_types = ["eeg" for i in range(8)] + ["stim"]
        info = mne.create_info(ch_names, fs, ch_types)
        raw = mne.io.RawArray(x, info)

        sessions = {}
        sessions["session_1"] = {}
        sessions["session_1"]["run_1"] = raw
        return sessions
def _get_single_subject_data ( self , subject ) : file_path_list = self . data_path ( subject ) data = loadmat ( file_path_list [ 0 ] ) x = data [ "x" ] fs = data [ "fs" ] ch_names = [ "ch" + str ( i ) for i in range ( 8 ) ] + [ "stim" ] ch_types = [ "eeg" for i in range ( 8 ) ] + [ "stim" ] info = mne . create_info ( ch_names , fs , ch_types ) raw = mne . io . RawArray ( x , info ) sessions = { } sessions [ "session_1" ] = { } sessions [ "session_1" ] [ "run_1" ] = raw return sessions