gui.py 文件源码

python
阅读 35 收藏 0 点赞 0 评论 0

项目:spyking-circus 作者: spyking-circus 项目源码 文件源码
def update_waveforms(self):

        self.waveforms_ax.clear()

        for idx, p in enumerate(self.to_consider[list(self.inspect_templates)]):
            tmp   = self.templates[:, p]
            tmp   = tmp.toarray().reshape(self.N_e, self.N_t)
            elec  = numpy.argmin(numpy.min(tmp, 1))
            thr   = self.thresholds[elec]

            if self.ui.show_peaks.isChecked():
                indices = [self.inv_nodes[self.nodes[elec]]]
            else:
                indices = self.inv_nodes[self.edges[self.nodes[elec]]]

            for sidx in indices:
                xaxis = numpy.linspace(self.x_position[sidx], self.x_position[sidx] + (self.N_t/(self.sampling_rate*1e-3)), self.N_t)
                self.waveforms_ax.plot(xaxis, self.y_position[sidx] + tmp[sidx], c=colorConverter.to_rgba(self.inspect_colors_templates[idx]))
                #self.waveforms_ax.plot([0, xaxis[-1]], [-thr, -thr], c=colorConverter.to_rgba(self.inspect_colors_templates[idx]), linestyle='--')

        self.waveforms_ax.set_xlabel('Probe Space')
        self.waveforms_ax.set_ylabel('Probe Space')

        for fig in [self.ui.waveforms]:
            fig.draw_idle()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号