summaryrefslogtreecommitdiff
path: root/barcode3.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'barcode3.ipynb')
-rwxr-xr-xbarcode3.ipynb16
1 files changed, 15 insertions, 1 deletions
diff --git a/barcode3.ipynb b/barcode3.ipynb
index e0e5e77..6694a31 100755
--- a/barcode3.ipynb
+++ b/barcode3.ipynb
@@ -53,6 +53,12 @@
"\n",
"downsampling = 500\n",
"data = scipy.signal.decimate(data, downsampling, ftype='fir')\n",
+ "off = 6000#wf = rigol.Wfm.from_file('barcode_test_varspeed.wfm', 'DS1054Z')\n",
+ "wf = rigol.Wfm.from_file('barcode_test8.wfm', 'DS1054Z')\n",
+ "data = wf.channels[0].volts\n",
+ "\n",
+ "downsampling = 500\n",
+ "data = scipy.signal.decimate(data, downsampling, ftype='fir')\n",
"off = 6000\n",
"data = data[off:off+16384]\n",
"td = wf.channels[0].seconds_per_point * downsampling\n",
@@ -61,6 +67,14 @@
"fig, ax = plt.subplots(figsize=(28, 6))\n",
"ax.plot(times, data)\n",
"ax.set_xlim([times[0], times[-1]])\n",
+ "len(data)\n",
+ "data = data[off:off+16384]\n",
+ "td = wf.channels[0].seconds_per_point * downsampling\n",
+ "times = np.linspace(0, len(data)*td, len(data))\n",
+ "\n",
+ "fig, ax = plt.subplots(figsize=(28, 6))\n",
+ "ax.plot(times, data)\n",
+ "ax.set_xlim([times[0], times[-1]])\n",
"len(data)"
]
},
@@ -729,7 +743,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.10.5"
+ "version": "3.12.3"
}
},
"nbformat": 4,