File headed added.

This commit is contained in:
klaute 2016-09-29 14:44:29 +02:00
parent 31b88cb369
commit ef5a08ca42

View file

@ -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
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:
#print "recv: FREQ INFO"
@ -563,6 +568,7 @@ if __name__ == "__main__":
i = ((drive_str + 1) * 2.0) / 1000.0
##### calculate the results
if args.output_file != None or args.show_graph == True:
for m in meas_data:
@ -596,7 +602,7 @@ if __name__ == "__main__":
r = 50.0 * vswr
meas_r.append(r)
#####
##### generate the output CSV file
if args.output_file != None:
FILE = open(args.output_file, "w")
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]))
#####
##### show the graph
if args.show_graph == True:
f, axarr = plt.subplots(3, sharex=True)