(self, subject)
return out
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"""
        files = self.data_path(subject)

        out = {}
        for sess_ind, runlist in enumerate(files):
            sess_key = "session_{}".format(sess_ind)
            out[sess_key] = {}
            for run_ind, fname in enumerate(runlist):
                run_key = "run_{}".format(run_ind)
                raw = read_raw_cnt(fname, preload=True, eog=["VEOU", "VEOL"])
                stim = raw.annotations.description.astype(np.dtype("<10U"))
                stim[stim == "1"] = "left_hand"
                stim[stim == "2"] = "right_hand"
                stim[stim == "3"] = "feet"
                raw.annotations.description = stim
                out[sess_key][run_key] = raw
                out[sess_key][run_key].set_montage(make_standard_montage("standard_1005"))
        return out
def _get_single_subject_data ( self , subject ) : files = self . data_path ( subject ) out = { } for sess_ind , runlist in enumerate ( files ) : sess_key = "session_{}" . format ( sess_ind ) out [ sess_key ] = { } for run_ind , fname in enumerate ( runlist ) : run_key = "run_{}" . format ( run_ind ) raw = read_raw_cnt ( fname , preload = True , eog = [ "VEOU" , "VEOL" ] ) stim = raw . annotations . description . astype ( np . dtype ( "<10U" ) ) stim [ stim == "1" ] = "left_hand" stim [ stim == "2" ] = "right_hand" stim [ stim == "3" ] = "feet" raw . annotations . description = stim out [ sess_key ] [ run_key ] = raw out [ sess_key ] [ run_key ] . set_montage ( make_standard_montage ( "standard_1005" ) ) return out