diff --git a/dev.ipynb b/dev.ipynb index ec33d55..ec18230 100644 --- a/dev.ipynb +++ b/dev.ipynb @@ -7,7 +7,14 @@ "outputs": [], "source": [ "%load_ext autoreload\n", - "%autoreload 2" + "%autoreload 2\n", + "\n", + "import time\n", + "import pandas as pd\n", + "from turbinedaq.daqtasks import AftAcsDaqThread, AcsDaqThread\n", + "from acspy import acsc\n", + "\n", + "hc = acsc.open_comm_simulator()" ] }, { @@ -16,10 +23,11 @@ "metadata": {}, "outputs": [], "source": [ - "from turbinedaq.daqtasks import AftAcsDaqThread\n", - "from acspy import acsc\n", - "\n", - "hc = acsc.open_comm_simulator()" + "thread = AftAcsDaqThread(acs_hc=hc, makeprg=True, sample_rate=1000, bufflen=500)\n", + "thread.start()\n", + "time.sleep(2)\n", + "thread.stop()\n", + "pd.DataFrame(thread.data).time.plot()" ] }, { @@ -28,7 +36,11 @@ "metadata": {}, "outputs": [], "source": [ - "thread = AftAcsDaqThread(acs_hc=hc, makeprg=True)" + "thread = AcsDaqThread(acs_hc=hc, makeprg=True, sample_rate=1000, bufflen=500)\n", + "thread.start()\n", + "time.sleep(5)\n", + "thread.stop()\n", + "pd.DataFrame(thread.data).time.plot()" ] }, { @@ -37,7 +49,7 @@ "metadata": {}, "outputs": [], "source": [ - "thread.start()" + "thread.dblen // 2" ] }, { @@ -46,7 +58,7 @@ "metadata": {}, "outputs": [], "source": [ - "thread.stop()" + "print(thread.prg)" ] }, { @@ -55,9 +67,25 @@ "metadata": {}, "outputs": [], "source": [ - "import pandas as pd\n", - "\n", - "pd.DataFrame(thread.data).time.plot()" + "thread.sr" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "thread.sleeptime" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "thread.dblen" ] }, {