aboutsummaryrefslogtreecommitdiffstats
path: root/receive_tcp.ipynb
diff options
context:
space:
mode:
authorandreas128 <Andreas>2017-03-11 14:33:16 +0000
committerandreas128 <Andreas>2017-03-11 14:33:16 +0000
commit1200ad3e9bb166d2f2599f47e0503b37eb70c20f (patch)
tree1590f0f612e6c37d3e194725221ee56d025024dd /receive_tcp.ipynb
parent2476ba7e03035caa1db7ad8a0dc6718501680c44 (diff)
downloadODR-StaticPrecorrection-1200ad3e9bb166d2f2599f47e0503b37eb70c20f.tar.gz
ODR-StaticPrecorrection-1200ad3e9bb166d2f2599f47e0503b37eb70c20f.tar.bz2
ODR-StaticPrecorrection-1200ad3e9bb166d2f2599f47e0503b37eb70c20f.zip
Add live analysis with fewer underruns
Diffstat (limited to 'receive_tcp.ipynb')
-rw-r--r--receive_tcp.ipynb181
1 files changed, 181 insertions, 0 deletions
diff --git a/receive_tcp.ipynb b/receive_tcp.ipynb
new file mode 100644
index 0000000..f6df54a
--- /dev/null
+++ b/receive_tcp.ipynb
@@ -0,0 +1,181 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "deletable": true,
+ "editable": true
+ },
+ "outputs": [],
+ "source": [
+ "%matplotlib inline\n",
+ "import numpy as np\n",
+ "import time\n",
+ "import scipy\n",
+ "from scipy import signal\n",
+ "import matplotlib.pyplot as plt\n",
+ "import matplotlib.colors as mpcol\n",
+ "import src.dab_util as du\n",
+ "import src.signal_gen as sg\n",
+ "import src.tcp_sync as ts\n",
+ "reload(sg)\n",
+ "reload(du)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "deletable": true,
+ "editable": true
+ },
+ "outputs": [],
+ "source": [
+ "import src.SendDictTcp as sdt"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "deletable": true,
+ "editable": true
+ },
+ "outputs": [],
+ "source": [
+ "t1 = ts.UhdSyncMsg(port=47009, packet_size=4*16384, packet_type=\"f\"*16384)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "deletable": true,
+ "editable": true
+ },
+ "outputs": [],
+ "source": [
+ "sender = sdt.SendDictTcp('127.0.0.1', 1111)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "deletable": true,
+ "editable": true
+ },
+ "outputs": [],
+ "source": [
+ "sender.send({\"txgain\":60})"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "deletable": true,
+ "editable": true
+ },
+ "outputs": [],
+ "source": [
+ "sender.send({\"a1\":1})"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "deletable": true,
+ "editable": true
+ },
+ "outputs": [],
+ "source": [
+ "a = t1.has_msg()\n",
+ "a = np.fft.fftshift(np.sum(np.array(t1.get_msgs(10)), axis=0))\n",
+ "plt.plot(a)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "deletable": true,
+ "editable": true
+ },
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "deletable": true,
+ "editable": true
+ },
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "deletable": true,
+ "editable": true
+ },
+ "outputs": [],
+ "source": [
+ "#top.stop()\n",
+ "#top.wait()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "deletable": true,
+ "editable": true
+ },
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "deletable": true,
+ "editable": true
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 1
+}