diff options
author | Daniel Friesel <derf@finalrewind.org> | 2017-04-11 15:57:11 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2017-04-11 15:57:11 +0200 |
commit | d06012ecb45be9e65a265260d37b1c052320f536 (patch) | |
tree | 5b9e16ed71dd26307c1faa2639bec5ff52f3ea36 /bin/mimplot | |
parent | f8e54de2258d24e107a5df08bdd20c7234312652 (diff) |
lut support
Diffstat (limited to 'bin/mimplot')
-rwxr-xr-x | bin/mimplot | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/bin/mimplot b/bin/mimplot new file mode 100755 index 0000000..1768da8 --- /dev/null +++ b/bin/mimplot @@ -0,0 +1,27 @@ +#!/usr/bin/env python3 + +import csv +import numpy as np +import os +import struct +import sys +import tarfile +import matplotlib.pyplot as plt +from dfatool import running_mean, MIMOSA + +voltage = float(sys.argv[1]) +shunt = float(sys.argv[2]) +mimfile = sys.argv[3] + +mim = MIMOSA(voltage, shunt) + +charges, triggers = mim.load_data(mimfile) +charges = charges[:3000000] + +currents = running_mean(mim.charge_to_current_nocal(charges), 10) * 1e-6 +xr = np.arange(len(currents)) * 1e-5 +plt.plot( xr, currents, "r-") +plt.xlabel('Zeit [s]') +plt.ylabel('Strom [A]') +plt.grid(True) +plt.show() |