(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)
        sessions = {}

        for file_path in sorted(file_path_list):

            session_name = "session_" + file_path.split(os.sep)[-2].replace("session", "")

            if session_name not in sessions.keys():
                sessions[session_name] = {}

            run_name = "run_" + str(len(sessions[session_name]) + 1)
            sessions[session_name][run_name] = self._get_single_run_data(file_path)

        return sessions
def _get_single_subject_data ( self , subject ) : file_path_list = self . data_path ( subject ) sessions = { } for file_path in sorted ( file_path_list ) : session_name = "session_" + file_path . split ( os . sep ) [ - 2 ] . replace ( "session" , "" ) if session_name not in sessions . keys ( ) : sessions [ session_name ] = { } run_name = "run_" + str ( len ( sessions [ session_name ] ) + 1 ) sessions [ session_name ] [ run_name ] = self . _get_single_run_data ( file_path ) return sessions