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
评论列表
文章目录