From 5c962c64d446406960ac7c30303f1681dac2693a Mon Sep 17 00:00:00 2001 From: occheung Date: Fri, 21 Jan 2022 09:34:46 +0800 Subject: [PATCH] 5432: ditch import statement in python Obviously, the import statements cannot be put right before the methods in the same indentation. It was there because there wasn't a better way to put these code. Now, it is replaced with an worded instruction that imports are needed. --- 5432.tex | 4 +++- examples/zotino.py | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/5432.tex b/5432.tex index 5a786a8..9be0954 100644 --- a/5432.tex +++ b/5432.tex @@ -276,7 +276,9 @@ Voltages of all 4 channels are updated simultaneously with the use of \texttt{se A triangular waveform at 10 Hz, 16 V peak-to-peak. Timing accuracy of the RTIO system can be demonstrated by the precision of the frequency. -\inputcolorboxminted{firstline=30,lastline=52}{examples/zotino.py} +Import \texttt{scipy.signal} and \texttt{numpy} modules to run this example. + +\inputcolorboxminted{firstline=30,lastline=49}{examples/zotino.py} \section{Ordering Information} To order, please visit \url{https://m-labs.hk} and select the 5432 Zotino in the ARTIQ Sinara crate configuration tool. The card may also be ordered separately by writing to \url{mailto:sales@m-labs.hk}. diff --git a/examples/zotino.py b/examples/zotino.py index 3033a83..670b7bc 100644 --- a/examples/zotino.py +++ b/examples/zotino.py @@ -27,9 +27,6 @@ class TriangularWave(EnvExperiment): self.setattr_device("core") self.zotino = self.get_device("zotino0") - from scipy import signal - import numpy - def prepare(self): self.period = 0.1*s self.sample = 128