summaryrefslogtreecommitdiffstats
path: root/mictoled/pdmgen/plot.py
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2024-12-16 16:53:54 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2024-12-16 16:53:54 +0100
commit8daccb896619f054c49a65a76b73e92fcce330e9 (patch)
tree407c96c7fdd2571b1623e8c32ee99b05fe7d779c /mictoled/pdmgen/plot.py
parent959edc17ff8f4b71a258c3c66d25bd904fb98bf0 (diff)
downloadiceFUN-8daccb896619f054c49a65a76b73e92fcce330e9.tar.gz
iceFUN-8daccb896619f054c49a65a76b73e92fcce330e9.tar.bz2
iceFUN-8daccb896619f054c49a65a76b73e92fcce330e9.zip
mictoled: improve sim test data
Diffstat (limited to 'mictoled/pdmgen/plot.py')
-rw-r--r--mictoled/pdmgen/plot.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/mictoled/pdmgen/plot.py b/mictoled/pdmgen/plot.py
new file mode 100644
index 0000000..daa238c
--- /dev/null
+++ b/mictoled/pdmgen/plot.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+import sys
+import numpy as np
+import matplotlib.pyplot as pp
+
+pdm = np.fromfile("pdm.npy", np.int8)
+
+pdm_decim = np.sum(pdm.reshape(-1, 64), axis=1)
+
+fig = pp.figure()
+fig.suptitle("PDM decimated")
+ax1 = fig.add_subplot(1, 1, 1)
+ax1.plot(pdm_decim)
+
+pp.show()
+