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))
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
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)