mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-10-31 10:48:02 +00:00 
			
		
		
		
	csv-convert: Tweak output column order.
To better fit into customer's visualization tool. Signed-off-by: Ben Greear <greearb@candelatech.com>
This commit is contained in:
		| @@ -46,7 +46,7 @@ class CSVParcer(): | ||||
|                 cni += 1 | ||||
|  | ||||
|             # Write out out header for the new file. | ||||
|             fpo.write("Step Index,Attenuation [dB],Position [Deg],Traffic Pair 1 Throughput [Mbps]\n") | ||||
|             fpo.write("Step Index,Position [Deg],Attenuation [dB],Traffic Pair 1 Throughput [Mbps]\n") | ||||
|  | ||||
|             # Read rest of the input lines, processing one at a time.  Covert the columns as | ||||
|             # needed, and write out new data to the output file. | ||||
| @@ -65,11 +65,11 @@ class CSVParcer(): | ||||
|                 if (mbps_array[1] == "bps"): | ||||
|                     mbps_val /= 1000000 | ||||
|  | ||||
|                 attenv = int(x[i_atten]) | ||||
|                 attenv = float(x[i_atten]) | ||||
|                 if ddb: | ||||
|                     attenv /= 10 | ||||
|                      | ||||
|                 fpo.write("%s,%s,%s,%s\n" % (step_i, attenv, x[i_rotation], mbps_val)) | ||||
|                 fpo.write("%s,%s,%s,%s\n" % (step_i, x[i_rotation], attenv, mbps_val)) | ||||
|                 line = fp.readline() | ||||
|                 step_i += 1 | ||||
|  | ||||
| @@ -104,6 +104,8 @@ csv_convert.py: | ||||
|     if args.outfile: | ||||
|         csv_outfile_name = args.outfile | ||||
|  | ||||
|     print("infile: %s  outfile: %s  convert-ddb: %s"%(csv_infile_name, csv_outfile_name, args.ddb)) | ||||
|  | ||||
|     CSVParcer(csv_infile_name, csv_outfile_name, args.ddb) | ||||
|  | ||||
| if __name__ == "__main__": | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Ben Greear
					Ben Greear