Browse Source

File headed added.

klaute 2 years ago
parent
commit
ef5a08ca42
1 changed files with 9 additions and 3 deletions
  1. 9
    3
      tools/meas.py

+ 9
- 3
tools/meas.py View File

@@ -1,3 +1,8 @@
1
+# 
2
+# Author: klaute -Kai Lauterbach - @kailauterbach - me@klaute.de
3
+# Date: 09/2016
4
+# License: GPLv3
5
+# 
1 6
 
2 7
 ###############################################################################
3 8
 
@@ -496,7 +501,7 @@ if __name__ == "__main__":
496 501
           pass
497 502
 
498 503
         elif e[1] == MSG_TYPE_ANSWER_NOK:
499
-          print "recv: NOT OK"
504
+          print "recv: NOT OK on %d" % (dataSend)
500 505
 
501 506
         elif e[1] == MSG_TYPE_MEAS_FREQ_INFO:
502 507
           #print "recv: FREQ INFO"
@@ -563,6 +568,7 @@ if __name__ == "__main__":
563 568
 
564 569
           i = ((drive_str + 1) * 2.0) / 1000.0
565 570
 
571
+          ##### calculate the results
566 572
           if args.output_file != None or args.show_graph == True:
567 573
             for m in meas_data:
568 574
 
@@ -596,7 +602,7 @@ if __name__ == "__main__":
596 602
               r = 50.0 * vswr
597 603
               meas_r.append(r)
598 604
 
599
-          #####
605
+          ##### generate the output CSV file
600 606
           if args.output_file != None:
601 607
             FILE = open(args.output_file, "w")
602 608
             FILE.write("freqency;ratio;impedance;watt;drive;a0;a1\n")
@@ -609,7 +615,7 @@ if __name__ == "__main__":
609 615
 
610 616
           print "First minimum VSWR %0.6f found at freqency %s" % (min_vswr[0], user_friendly_freq(min_vswr[1]))
611 617
 
612
-          #####
618
+          ##### show the graph
613 619
           if args.show_graph == True:
614 620
 
615 621
             f, axarr = plt.subplots(3, sharex=True)