⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 txkvcotest.py

📁 重复测试芯片VCO输出的程序
💻 PY
字号:
# Utilities for TX VCO calibration testing# $Id: txKvcoTest.py,v 1.1 2007/03/14 01:02:02 lettieri Exp $from util import *import epProcsep = epProcs.EpProcs()## Run TX KVCO n times, report stats#def runTxKvcoVarTest(chan,padr=0x7f,n=10):    ''' Run continuous tone N times at one channel and power,        and report back statistics about the calculated delta V        from tx kvco cal, and the cap settings from open loop cal        as a tuple in the form            (mean(dv), sigmaPct(dv), mean(caps), sigmaPct(caps))        where sigmaPct() is the std dev of the data as a percentage of        the average.    '''    dv = []    caps = []    for i in range(n):        ep.continuousTone(chan,padr)        dv.append(1000*ep.getTxDeltaV())        caps.append(ep.getTxCaps())    if ep.verbose:        print dv        print caps    avgDv = mean(dv)    normDv = 100*stddev(dv) / avgDv    avgCaps = mean(caps)    normCaps = 100*stddev(caps) / avgCaps    if ep.verbose:        print "Average delta V (mV) = %f" % avgDv        print "Normalized 1-sigma deltaV = %f%%" % normDv        print "Average caps = %f" % avgCaps        print "Normalized 1-sigma caps = %f%%" % normCaps    return (avgDv,normDv,avgCaps,normCaps)## Run TX KVCO n times for each channel, report stats to file#def runTxKvcoVarTestAllChan(n=10,fname='dvTest.txt',padr=0x7f):    '''Run runTxKvcoVarTest() N times at each channel, and send the        reported statistics to file.    '''    fp = open(fname,"w")    fp.write("Idx\tFreq\tdv sig\tdv err\tcap avg\tcap sig\n")    for i in range(971):        print "Running channel %d:%.1f" % (i,float(ep.getChanFreq(i)))        val = runTxKvcoVarTest(ep.getChanFreq(i),padr,n)        fp.write("%d\t%.1f\t%.2f\t%.4f\t%.2f\t%.4f\n" % ((i,float(ep.getChanFreq(i)))+val))    fp.close()

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -