aboutsummaryrefslogtreecommitdiffstats
path: root/notebooks
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2021-12-14 19:53:52 +0100
committerNao Pross <np@0hm.ch>2021-12-14 19:53:52 +0100
commit1a0dfb03aaa7f609e041122807617d8427847272 (patch)
treeefa0d1096f3fa11c26054120904364fb82d7a1ae /notebooks
parentAttempt to use UNIX sockets for better performance (diff)
parentImplement network_value to show BER (diff)
downloadFading-1a0dfb03aaa7f609e041122807617d8427847272.tar.gz
Fading-1a0dfb03aaa7f609e041122807617d8427847272.zip
Merge branch 'ber-gui'
Diffstat (limited to 'notebooks')
-rw-r--r--notebooks/BER .ipynb95
1 files changed, 89 insertions, 6 deletions
diff --git a/notebooks/BER .ipynb b/notebooks/BER .ipynb
index 57675f1..fa70396 100644
--- a/notebooks/BER .ipynb
+++ b/notebooks/BER .ipynb
@@ -134,7 +134,7 @@
},
{
"cell_type": "code",
- "execution_count": 12,
+ "execution_count": 8,
"id": "fc4fef77",
"metadata": {},
"outputs": [
@@ -144,7 +144,7 @@
"20"
]
},
- "execution_count": 12,
+ "execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
@@ -156,7 +156,7 @@
},
{
"cell_type": "code",
- "execution_count": 13,
+ "execution_count": 9,
"id": "74ae964c",
"metadata": {},
"outputs": [
@@ -166,7 +166,7 @@
"array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])"
]
},
- "execution_count": 13,
+ "execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
@@ -178,7 +178,7 @@
},
{
"cell_type": "code",
- "execution_count": 14,
+ "execution_count": 10,
"id": "5a1d95f1",
"metadata": {},
"outputs": [
@@ -205,9 +205,92 @@
]
},
{
+ "cell_type": "markdown",
+ "id": "6e96c7bf",
+ "metadata": {},
+ "source": [
+ "# Test meister Wert \n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "id": "90d18368",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Length: 10\n",
+ "Inp_vector:[31, 53, 18, 227, 155, 238, 132, 35, 65, 243]\n",
+ "BER 6 in Paket 31\n",
+ "BER 6 in Paket 53\n",
+ "BER 4 in Paket 18\n",
+ "BER 2 in Paket 227\n",
+ "BER 4 in Paket 155\n",
+ "BER 12 in Paket 238\n",
+ "BER 10 in Paket 132\n",
+ "BER 0 in Paket 35\n",
+ "BER 6 in Paket 65\n",
+ "BER 2 in Paket 243\n"
+ ]
+ }
+ ],
+ "source": [
+ "inp = ([31, 53,0x12, 0xe3, 0x9b, 0xee, 0x84, 0x23, 0x41, 0xf3])\n",
+ "#inp[1] = ([31, 53,0x12, 0xe5, 0x9b, 0xee, 0x84, 0x23, 0x41, 0xf3])\n",
+ "#inp[2] = ([31, 53,0x13, 0xe3, 0x9b, 0xee, 0x84, 0x23, 0x41, 0xf3])\n",
+ "\n",
+ "vgl = ([31, 53] + [0x12, 0xe3, 0x9b, 0xee, 0x84, 0x23, 0x41, 0xf3])\n",
+ "\n",
+ "\n",
+ "print(f\"Length: {len(inp)}\")\n",
+ "print(f\"Inp_vector:{inp}\")\n",
+ " \n",
+ "for i in inp:\n",
+ " i = np.array(i, dtype=np.uint8)\n",
+ " v = np.array(vgl, dtype=np.uint8) ^ i\n",
+ " ber = sum(np.unpackbits(v))\n",
+ "\n",
+ " trueber = ber - 32\n",
+ " if trueber < 0:\n",
+ " trueber = 0\n",
+ " print(f\"BER {trueber} in Paket {i}\")\n",
+ "\n",
+ " #print(f\"max BER {np.max(trueber)} in Paket {i}\")\n",
+ " \n",
+ " #self.send(self.encode(trueber))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "72ca6e60",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "3a891089",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "6489bfcc",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
"cell_type": "code",
"execution_count": null,
- "id": "038ceffa",
+ "id": "fda1e417",
"metadata": {},
"outputs": [],
"source": []