def saveAllSpkTrains(event): arch = [] if typ == 2: for j in range(len(self.bitmasks)): print 'Mask '+str(j+1)+' of '+str(len(self.bitmasks)) if self.t == 0: train,spikes,self.fil = roip.spikeDet(self.tc_data,self.bitmasks[j]) self.t = 1 else: train,spikes = roip.spikeDetL(self.tc_data,self.bitmasks[j],self.fil) arch.append([train,spikes]) elif typ == 3: for roi in self.prinROI: if self.t == 0: train,spikes,self.fil = roip.spikeDet(self.tc_data,self.bitmasks[roi[0]][roi[1]]) else: train,spikes = roip.spikeDetL(self.tc_data,bitmasks[roi[0]][roi[1]],self.fil) self.t = 1 arch.append([roi,train,spikes]) print 'What would you like to name this dataset?' name = raw_input('> ') np.save(name,arch)
def saveSingleSpkTrain(event): click = plt.ginput(1,300) if typ == 2: j = match_point(click,self.bitmasks) if self.t == 0: train,spikes,self.fil = roip.spikeDet(self.tc_data,self.bitmasks[j]) self.t = 1 elif self.t == 1: train,spikes = roip.spikeDetL(self.tc_data,self.bitmasks[j],self.fil) arch = [train,spikes] print 'What would you like to name the data from this ROI?' name = raw_input('> ') np.save(name,arch)
def showSpikes(event): click = plt.ginput(1,300) if typ == 2: j = match_point(click,self.bitmasks) if self.t == 0: train,spikes,self.fil = roip.spikeDet(self.tc_data,self.bitmasks[j]) self.t = 1 elif self.t == 1: train,spikes = roip.spikeDetL(self.tc_data,self.bitmasks[j],self.fil) else: print 'Something is wrong.' #self.plo = plt.figure(2) self.ax_plot.plot(train) self.ax_plot.plot(spikes,np.ones(np.size(spikes))*35000,'r.') print 'Spiketimes for ROI '+str(j)+': ',spikes if typ == 3: print 'Not currently supported.'