Loading bin/msp430-etv +11 −1 Original line number Diff line number Diff line Loading @@ -106,6 +106,10 @@ OPTIONS Draw power/time plot --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. DEPENDENCIES Loading Loading @@ -141,7 +145,7 @@ def peak_search2(data, lower, upper, check_function): if __name__ == '__main__': try: optspec = ('help load= save= skip= threshold= threshold-peakcount= plot stat') optspec = ('help load= save= skip= threshold= threshold-peakcount= plot stat histogram=') raw_opts, args = getopt.getopt(sys.argv[1:], "", optspec.split(' ')) for option, parameter in raw_opts: Loading Loading @@ -309,4 +313,10 @@ if __name__ == '__main__': plt.xlabel('Time [s]') plt.ylabel('Power [W]') plt.grid(True) if 'load' in opt: plt.title(opt['load']) plt.show() if 'histogram' in opt: plt.hist((data[1:, 3] - data[:-1, 3]) * 1e-9, bins=int(opt['histogram'])) plt.show() Loading
bin/msp430-etv +11 −1 Original line number Diff line number Diff line Loading @@ -106,6 +106,10 @@ OPTIONS Draw power/time plot --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. DEPENDENCIES Loading Loading @@ -141,7 +145,7 @@ def peak_search2(data, lower, upper, check_function): if __name__ == '__main__': try: optspec = ('help load= save= skip= threshold= threshold-peakcount= plot stat') optspec = ('help load= save= skip= threshold= threshold-peakcount= plot stat histogram=') raw_opts, args = getopt.getopt(sys.argv[1:], "", optspec.split(' ')) for option, parameter in raw_opts: Loading Loading @@ -309,4 +313,10 @@ if __name__ == '__main__': plt.xlabel('Time [s]') plt.ylabel('Power [W]') plt.grid(True) if 'load' in opt: plt.title(opt['load']) plt.show() if 'histogram' in opt: plt.hist((data[1:, 3] - data[:-1, 3]) * 1e-9, bins=int(opt['histogram'])) plt.show()