コード例 #1
0
ファイル: datastore.py プロジェクト: flcunha/mozaik
 def add_null_recording(self, segments, stimulus):
     """
     Add recordings due to the null stimuli presented between the standard stimuli.
     """
     # we get recordings as seg
     for s in segments:
         s.null = True
         s.annotations['stimulus'] = str(stimulus)
         self.block.segments.append(MozaikSegment(s, null=True))
コード例 #2
0
    def add_recording(self, segments, stimulus):
        """
        Add a recording into the datastore.
        """

        # we get recordings as seg
        for s in segments:
            s.annotations['stimulus'] = str(stimulus)
            self.block.segments.append(MozaikSegment(s))
        self.stimulus_dict[str(stimulus)] = True
コード例 #3
0
    def load(self):
        #load the data
        iom = NeoHdf5IO(filename=self.parameters.root_directory +
                        '/datastore.hdf5')
        self.block = iom.get('/block_0')

        # re-wrap segments
        new = []
        for s in self.block.segments:
            new.append(MozaikSegment(s))

        self.block.segments = new

        #now just construct the stimulus dictionary
        for s in self.block.segments:
            self.stimulus_dict[s.stimulus] = True

        f = open(self.parameters.root_directory + '/datastore.analysis.pickle',
                 'rb')
        self.analysis_results = cPickle.load(f)