Loading bin/msp430-etv +3 −2 Original line number Diff line number Diff line Loading @@ -89,7 +89,6 @@ def running_mean(x: np.ndarray, N: int) -> np.ndarray: # at the boundaries boundary_array = np.insert(x, 0, np.full((N // 2), x[0])) boundary_array = np.append(boundary_array, np.full((N // 2 + N % 2), x[-1])) print(boundary_array) cumsum = np.cumsum(boundary_array) return (cumsum[N:] - cumsum[:-N]) / N Loading Loading @@ -400,7 +399,9 @@ if __name__ == "__main__": plt.legend(handles=[energyhandle, meanhandle]) plt.ylabel("Voltage [V]") elif opt["plot"] == "I": print("Warning: The current reported by energytrace is aggressively smoothed and often inaccurate.") print( "Warning: The current reported by energytrace is aggressively smoothed and often inaccurate." ) # nA (energyhandle,) = plt.plot( data[1:, 0] * 1e-6, data[1:, 1] * 1e-9, "b-", label="I", markersize=1 Loading Loading
bin/msp430-etv +3 −2 Original line number Diff line number Diff line Loading @@ -89,7 +89,6 @@ def running_mean(x: np.ndarray, N: int) -> np.ndarray: # at the boundaries boundary_array = np.insert(x, 0, np.full((N // 2), x[0])) boundary_array = np.append(boundary_array, np.full((N // 2 + N % 2), x[-1])) print(boundary_array) cumsum = np.cumsum(boundary_array) return (cumsum[N:] - cumsum[:-N]) / N Loading Loading @@ -400,7 +399,9 @@ if __name__ == "__main__": plt.legend(handles=[energyhandle, meanhandle]) plt.ylabel("Voltage [V]") elif opt["plot"] == "I": print("Warning: The current reported by energytrace is aggressively smoothed and often inaccurate.") print( "Warning: The current reported by energytrace is aggressively smoothed and often inaccurate." ) # nA (energyhandle,) = plt.plot( data[1:, 0] * 1e-6, data[1:, 1] * 1e-9, "b-", label="I", markersize=1 Loading