欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

      標(biāo)題: dat數(shù)據(jù)跳頻及分析 python代碼 [打印本頁(yè)]

      作者: Agle    時(shí)間: 2020-12-4 16:31
      標(biāo)題: dat數(shù)據(jù)跳頻及分析 python代碼
      #!/usr/bin/env python2
      # -*- coding: utf-8 -*-
      import mdfreader
      import time
      import os
      import matplotlib.pyplot as plt
      import numpy as np

      class SpeedCheck(object):
          def __init__(self,dir):
              self.yop = mdfreader.mdf(dir,noDataLoading=True)

          def Check(self,SampleTime = 0.1):
              VKPH = self.yop.getChannelData("vfzg_w")         
              print("VKPT=%d"%len(VKPH))
              plt.plot(VKPH)
              plt.plot(DFC_HDRmax)
              plt.ylabel('VKPH')
              plt.plot(DFC_HDRmin)
              #fig, ax = plt.subplots()
              t = np.arange(0, (len(VKPH) - 1), 1)

              temp = DFC_HDRmax[0]
              for xy in zip(t, DFC_HDRmax):
                  print "DFC_HDRmax[%s] = %s" % xy
                  #for i in range(len(xy)):
                  if temp-round(xy[1]) != 0 and abs(temp-round(xy[1])) > 1:
                      print "DFC_HDRmax = (%s,%s)" % xy
                      for i in range(len(xy)):
                          k=xy[0]
                      print "k = %d" %k
                      temp = DFC_HDRmax[k]
                      plt.annotate("DFC_HDRmax =(%s ,%s)" % (k+1,DFC_HDRmax[k+1]), xy=(k+1,DFC_HDRmax[k+1]),xytext=(0, 100),textcoords='offset points')
                      plt.annotate("VKPH =(%d ,%d)" % (k,VKPH[k]), xy=(k, VKPH[k]), xytext=(0, 80), textcoords='offset points')
                      plt.annotate("DFC_HDRmin =(%d ,%d)" % (k, DFC_HDRmin[k]), xy=(k, DFC_HDRmin[k]), xytext=(0, 50),
                                   textcoords='offset points')
                      break
              plt.show()



      if __name__ == "__main__":
          dir = r"C:\Users\Administrator\Desktop\WarningUp.dat"
          filename = os.path.split(dir)[1]
          yop = mdfreader.mdf(dir)
          yop.resample(0.1)
          resampleFile = 'resample_{0}'.format(filename)
          yop.write(resampleFile)
          SpeedCheck(resampleFile).Check()
          print "數(shù)據(jù)后處理軟件"







      歡迎光臨 (http://www.raoushi.com/bbs/) Powered by Discuz! X3.1