summaryrefslogtreecommitdiff
path: root/bin/gradient
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2019-05-22 16:49:17 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2019-05-22 16:49:17 +0200
commit6b1a22278f7e8a649c8162de98e352e3f10943ad (patch)
tree7a04ba05604179bd02c23d8373e9f3c7350a72e1 /bin/gradient
parentcca4593f4348ca061cf0a88d26a76336d1d1dfa7 (diff)
fix gradient
Diffstat (limited to 'bin/gradient')
-rwxr-xr-xbin/gradient6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/gradient b/bin/gradient
index d2f43ef..e54f10f 100755
--- a/bin/gradient
+++ b/bin/gradient
@@ -15,12 +15,12 @@ mimfile = sys.argv[3]
mim = MIMOSA(voltage, shunt)
-charges, triggers = mim.load_data(mimfile)
-charges = charges[2000000:3000000]
+charges, triggers = mim.load_file(mimfile)
+#charges = charges[2000000:3000000]
currents = running_mean(mim.charge_to_current_nocal(charges), 10) * 1e-6
xr = np.arange(len(currents)) * 1e-5
-threshold = 3e-5
+threshold = 1e-5
grad = np.gradient(currents, 2)
tp = np.abs(grad) > threshold
plt.plot( xr, currents, "r-")