File headed added.
This commit is contained in:
parent
31b88cb369
commit
ef5a08ca42
1 changed files with 9 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
#
|
||||||
|
# Author: klaute -Kai Lauterbach - @kailauterbach - me@klaute.de
|
||||||
|
# Date: 09/2016
|
||||||
|
# License: GPLv3
|
||||||
|
#
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
@ -496,7 +501,7 @@ if __name__ == "__main__":
|
||||||
pass
|
pass
|
||||||
|
|
||||||
elif e[1] == MSG_TYPE_ANSWER_NOK:
|
elif e[1] == MSG_TYPE_ANSWER_NOK:
|
||||||
print "recv: NOT OK"
|
print "recv: NOT OK on %d" % (dataSend)
|
||||||
|
|
||||||
elif e[1] == MSG_TYPE_MEAS_FREQ_INFO:
|
elif e[1] == MSG_TYPE_MEAS_FREQ_INFO:
|
||||||
#print "recv: FREQ INFO"
|
#print "recv: FREQ INFO"
|
||||||
|
@ -563,6 +568,7 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
i = ((drive_str + 1) * 2.0) / 1000.0
|
i = ((drive_str + 1) * 2.0) / 1000.0
|
||||||
|
|
||||||
|
##### calculate the results
|
||||||
if args.output_file != None or args.show_graph == True:
|
if args.output_file != None or args.show_graph == True:
|
||||||
for m in meas_data:
|
for m in meas_data:
|
||||||
|
|
||||||
|
@ -596,7 +602,7 @@ if __name__ == "__main__":
|
||||||
r = 50.0 * vswr
|
r = 50.0 * vswr
|
||||||
meas_r.append(r)
|
meas_r.append(r)
|
||||||
|
|
||||||
#####
|
##### generate the output CSV file
|
||||||
if args.output_file != None:
|
if args.output_file != None:
|
||||||
FILE = open(args.output_file, "w")
|
FILE = open(args.output_file, "w")
|
||||||
FILE.write("freqency;ratio;impedance;watt;drive;a0;a1\n")
|
FILE.write("freqency;ratio;impedance;watt;drive;a0;a1\n")
|
||||||
|
@ -609,7 +615,7 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
print "First minimum VSWR %0.6f found at freqency %s" % (min_vswr[0], user_friendly_freq(min_vswr[1]))
|
print "First minimum VSWR %0.6f found at freqency %s" % (min_vswr[0], user_friendly_freq(min_vswr[1]))
|
||||||
|
|
||||||
#####
|
##### show the graph
|
||||||
if args.show_graph == True:
|
if args.show_graph == True:
|
||||||
|
|
||||||
f, axarr = plt.subplots(3, sharex=True)
|
f, axarr = plt.subplots(3, sharex=True)
|
||||||
|
|
Loading…
Reference in a new issue