From ef5a08ca42229c3ab254fce672623a08956522a9 Mon Sep 17 00:00:00 2001 From: klaute Date: Thu, 29 Sep 2016 14:44:29 +0200 Subject: [PATCH] File headed added. --- tools/meas.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/meas.py b/tools/meas.py index fea3936..434b17d 100644 --- a/tools/meas.py +++ b/tools/meas.py @@ -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)