summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-05-20 08:38:34 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2020-05-20 08:38:34 +0200
commitb4436b06e7979d4b4a5a8363f0e8fc51d705333b (patch)
treecb38455f1a359c2c404c70c52e7eb54486bd901c
parent30d7cc1b5d75f98eaa0ea5ae97f4f42eef57ad72 (diff)
--histogram: Add duration and power plots
-rwxr-xr-xbin/msp430-etv25
1 files changed, 21 insertions, 4 deletions
diff --git a/bin/msp430-etv b/bin/msp430-etv
index 624f91f..1f9ecea 100755
--- a/bin/msp430-etv
+++ b/bin/msp430-etv
@@ -117,9 +117,12 @@ OPTIONS
--stat
Print mean voltage, current, and power as well as total energy consumption.
--histogram=<n>
- Draw histogram of reported energy values per measurement interval
- (i.e., the differences between each pair of consecutive total energy readings)
- using <n> buckets.
+ Draw histograms of reported energy values per measurement interval
+ (i.e., the differences between each pair of consecutive total energy readings),
+ measurement interval duration, and
+ mean power values per measurement interval
+ (calculated from energy difference and duration).
+ Each histogram uses <n> buckets.
DEPENDENCIES
@@ -385,5 +388,19 @@ if __name__ == "__main__":
plt.show()
if "histogram" in opt:
- plt.hist((data[1:, 3] - data[:-1, 3]) * 1e-9, bins=int(opt["histogram"]))
+ bin_count = int(opt["histogram"])
+
+ plt.xlabel("Reported Energy per Measurement Interval [J]")
+ plt.ylabel("Count")
+ plt.hist((data[1:, 3] - data[:-1, 3]) * 1e-9, bins=bin_count)
+ plt.show()
+
+ plt.xlabel("Measurement Interval Duration [s]")
+ plt.ylabel("Count")
+ plt.hist((data[1:, 0] - data[:-1, 0]) * 1e-6, bins=bin_count)
+ plt.show()
+
+ plt.xlabel("Mean Power per Measurement Interval [W]")
+ plt.ylabel("Count")
+ plt.hist(power_from_energy, bins=bin_count)
plt.show()