# HG changeset patch # User Daniel O'Connor # Date 1355963358 -37800 # Node ID 6bd941d96c035f59d58c68bfdac9a45e16c4c7ec # Parent c93d6d4cb04beca00fc146982c3f6b26824d7496 Commit final version that went to Norway diff -r c93d6d4cb04b -r 6bd941d96c03 agilent_r5071.py --- a/agilent_r5071.py Wed Sep 28 17:15:23 2011 +0930 +++ b/agilent_r5071.py Thu Dec 20 10:59:18 2012 +1030 @@ -1,8 +1,11 @@ # Docs are at http://ena.tm.agilent.com/e5071c/manuals/webhelp/eng/ +import numpy import scpi import pylab +fname = 'data' + # Connect inst = scpi.instURL('vxi://203.31.81.47') @@ -28,12 +31,22 @@ # We only want the real part (no imag for this measurement) dat = dat[::2] +# Plot +pylab.plot(freqs, dat) +pylab.show() + # Save for later -numpy.savez('GS_preamp_20110929', freqs, dat) +numpy.savez('data.npz', freqs, dat) # Load.. -f = numpy.load('GS_preamp_20110929.npz') +f = numpy.load(fname + '.npz') freqs = f['arr_0'] dat = f['arr_1'] -pylab.plot(freqs.dat) +f = file(fname + '.csv', 'wb') +f.write("Frequencies\n") +numpy.savetxt(f, [freqs], delimiter = ',') +f.write("Gain\n") +numpy.savetxt(f, [dat], delimiter = ',') +del f + diff -r c93d6d4cb04b -r 6bd941d96c03 sitesurvey.ini --- a/sitesurvey.ini Wed Sep 28 17:15:23 2011 +0930 +++ b/sitesurvey.ini Thu Dec 20 10:59:18 2012 +1030 @@ -1,51 +1,16 @@ [general] -sequence = fm foo bar -#url = rsib://analyzer -#type = RSSPA +sequence = exp1 url = vxi://129.241.72.183 type = AnSPA fname = Trondheim_%%(timestamp_dec)s_%%(tag)s_%%(fstart_mhz)sMHz_%%(fstop_mhz)sMHz.dat -ampcal = GS_preamp_20110919.csv - -[foo] -fstart = 20e6 -fstop = 30e6 -atten = 0 -reflev = -30 -resbw = 10e3 -vidbw = 30e3 -sweept = 1 -recurrence = 180 - -[bar] -fstart = 25e6 -fstop = 37e6 -atten = 0 -reflev = -30 -resbw = 10e3 -vidbw = 30e3 -sweept = 1 -recurrence = 60 +ampcal = GS_preamp_20110929.csv -[rs] -fstart = 1e6 -fstop = 10e6 -atten = 0 -reflev = -30 -resbw = 10e3 -vidbw = 30e3 +[exp1] +fstart = 10e6 +fstop = 20e6 +atten = 20 +reflev = 0 +resbw = 300e3 +vidbw = 900e3 sweept = 1 -sweeppts = 8001 -sweepcnt = 4 -detector = RMS recurrence = 600 - -[fm] -fstart = 95e6 -fstop = 110e6 -atten = 0 -reflev = -30 -resbw = 10e3 -vidbw = 30e3 -sweept = 1 -recurrence = 60