AnaFiber.py 文件源码

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

项目:pystudio 作者: satorchi 项目源码 文件源码
def determine_TESMaxSig(self,doplot=False):
        max_sig=-1000;
        max_tes=-10
        #print 'attention remove first samples a cause de steps..otherwise may need https://github.com/thomasbkahn/step-detect.git'
        for tes in range(128):
            tfromLib2=self.timelines[tes]
            tfromLib=tfromLib2[self.minStep:] 
            if not tes in self.tes_blacklist:
                mean_gliss=pandas.rolling_mean(tfromLib,50)
                mean_gliss=mean_gliss[50:]
                delta_mean=numpy.fabs(mean_gliss.max()-mean_gliss.min())
                if delta_mean>max_sig:
                    max_sig=delta_mean
                    max_tes=tes
                #print delta_mean, max_sig
        print 'chosen tes=',max_tes
        self.maxTES=max_tes
        if doplot:
            data_maxtes=(self.timelines[max_tes])[self.minStep:]
            plt.figure()
            plt.plot(data_maxtes)
            plt.show()

        d,pic_array=self.tesDataObj[max_tes].compute_summedData(doplot)
        self.picArray=pic_array
        return self.maxTES, self.picArray
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号