Example #1
0
            
if __name__ == '__main__':
    print JitterInjection.__doc__
    test = JitterInjection()
    frequencies = numpy.arange(90e6,3e9,50e6)
    (rmsJitters,backgroundJitter,transmittedPowers) = test.frequencySweep(frequencies,Power(.01,'W'))
    
    pyplot.plot(frequencies,rmsJitters*1e12,label='RMS Jitter')
#    pyplot.plot(frequencies,peakToPeakJitters,label='Peak to peak Jitter')
    pyplot.plot([frequencies[0],frequencies[-1]],[backgroundJitter*1e12,backgroundJitter*1e12],label='Background RMS jitter')
    
#    pyplot.title('Prana at 900 MHz with 20 dB attenuator (spectrum analyser)')
    pyplot.xlabel('Perturbation frequency (Hz)')
    pyplot.ylabel('Jitter (ps)')
    pyplot.legend()
    pyplot.show()
    
    pyplot.plot(frequencies,transmittedPowers)
    pyplot.xlabel('Frequency (Hz)')
    pyplot.ylabel('Transmitted power (W)')    
    pyplot.show()
    
    from utility.metaarray import MetaArray,axis
    resultArray = MetaArray((len(frequencies),2), info=[
                    axis('Frequency', values=frequencies, units='Hz',title='Time'), 
                    axis('Measurement', cols=[('j', 'ps', 'RMS jitter'),('P_trans', 'W', 'Transmitted power')])
                    ])

    resultArray['Measurement':'j'] = rmsJitters
    resultArray['Measurement':'P_trans'] = transmittedPowers
    resultArray.writeToExcel('Y:/emctestbench/results/jitter/jitterC1.xls')
Example #2
0
inputFrequencies = numpy.arange(16.0e6,27.0e6,.1e6)
experimentNames = ['No interference',
				'VCO VDD, 50 MHz (+5 dBm)',
				'VCO VDD, 25 MHz (+5 dBm)',
				'PH VDD, 50 MHz (+5 dBm)',
				'PH VDD, 25 MHz (+5 dBm)',
				'DIV VDD, 50 MHz (+5 dBm)',
				'DIV VDD, 25 MHz (+5 dBm)'
				]
experimentColumns = []
for experimentName in experimentNames:
	experimentColumns.append((experimentName,'phi',experimentName))

results = MetaArray((len(inputFrequencies),len(experimentNames)), info=[
			axis('f', values=inputFrequencies, units='Hz',title='Input frequency'), 
			axis('experiment', cols=experimentColumns),
		])

for experimentName in experimentNames:
	dump = raw_input('Press enter to start experiment "%s"' % experimentName)
	
	sweepResults = numpy.array([])
#		capture range chip 1 (type 5)
#		capture range chip 2 (type 6) 17.8 26.5
#		for inputFrequency in numpy.arange(16.5e6,24.9e6,.1e6):	  
	startTime = time.time()	  
	for inputFrequency in inputFrequencies:
		generator.setWaveform(inputFrequency, 2.5,2.5,'SQU')
		time.sleep(.4) # .3 should be safe
		phaseShift,frequency = experiment.measurePhaseAndFrequency()