Created
June 5, 2023 20:07
-
-
Save valgur/217470899f9b74c5901769deb62f10be to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"id": "bc79bd07-3014-4eb0-b1b4-4ee4840353c9", | |
"metadata": { | |
"tags": [] | |
}, | |
"outputs": [], | |
"source": [ | |
"import numpy as np\n", | |
"import matplotlib.pyplot as plt\n", | |
"import pandas as pd\n", | |
"np.set_printoptions(suppress=True)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"id": "88889d09-5cea-4c88-8faa-dcdeac6548bf", | |
"metadata": { | |
"tags": [] | |
}, | |
"outputs": [], | |
"source": [ | |
"meas = np.array([\n", | |
" [ 14.71, 14.35, 14.70],\n", | |
" [ 12.30, 12.45, 12.75],\n", | |
" [ 10.40, 10.55, 10.80],\n", | |
" [ 8.50, 8.65, 8.85],\n", | |
" [ 6.40, 6.55, 6.75],\n", | |
" [ 4.50, 4.65, 4.85],\n", | |
" [ 2.80, 2.85, 2.95],\n", | |
" [ 0.80, 0.85, 0.95],\n", | |
" [ -1.00, -1.05, -1.00],\n", | |
" [ -2.90, -2.95, -2.95],\n", | |
" [ -4.90, -4.95, -4.95],\n", | |
" [ -6.70, -6.80, -6.90],\n", | |
" [ -8.55, -8.75, -8.85],\n", | |
" [-10.45, -10.65, -10.80],\n", | |
" [-12.45, -12.65, -12.80],\n", | |
" [-14.25, -14.45, -14.70]\n", | |
"])\n", | |
"d = np.array([0.75, 1, 2])\n", | |
"angles = np.array([15, 13, 11, 9, 7, 5, 3, 1, -1, -3, -5, -7, -9, -11, -13, -15])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"id": "e20aff64-955e-44dc-8127-1521bb7b02c9", | |
"metadata": { | |
"tags": [] | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<style type=\"text/css\">\n", | |
"#T_7b2c0_row0_col0 {\n", | |
" background-color: #acdfb7;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_7b2c0_row0_col1 {\n", | |
" background-color: #1979b5;\n", | |
" color: #f1f1f1;\n", | |
"}\n", | |
"#T_7b2c0_row0_col2, #T_7b2c0_row15_col2 {\n", | |
" background-color: #a7ddb5;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_7b2c0_row1_col0 {\n", | |
" background-color: #0868ac;\n", | |
" color: #f1f1f1;\n", | |
"}\n", | |
"#T_7b2c0_row1_col1, #T_7b2c0_row13_col0, #T_7b2c0_row14_col0, #T_7b2c0_row15_col1 {\n", | |
" background-color: #3c9fc8;\n", | |
" color: #f1f1f1;\n", | |
"}\n", | |
"#T_7b2c0_row1_col2, #T_7b2c0_row4_col2, #T_7b2c0_row12_col1 {\n", | |
" background-color: #bae4bd;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_7b2c0_row2_col0, #T_7b2c0_row4_col0 {\n", | |
" background-color: #2b8cbe;\n", | |
" color: #f1f1f1;\n", | |
"}\n", | |
"#T_7b2c0_row2_col1, #T_7b2c0_row12_col0 {\n", | |
" background-color: #65c0cb;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_7b2c0_row2_col2, #T_7b2c0_row7_col0, #T_7b2c0_row13_col2, #T_7b2c0_row14_col2 {\n", | |
" background-color: #ccebc6;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_7b2c0_row3_col0, #T_7b2c0_row5_col0 {\n", | |
" background-color: #4db2d3;\n", | |
" color: #f1f1f1;\n", | |
"}\n", | |
"#T_7b2c0_row3_col1, #T_7b2c0_row5_col1, #T_7b2c0_row13_col1, #T_7b2c0_row14_col1 {\n", | |
" background-color: #92d5bc;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_7b2c0_row3_col2, #T_7b2c0_row5_col2, #T_7b2c0_row7_col1, #T_7b2c0_row12_col2 {\n", | |
" background-color: #d6efd0;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_7b2c0_row4_col1 {\n", | |
" background-color: #64bfcc;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_7b2c0_row6_col0, #T_7b2c0_row11_col1 {\n", | |
" background-color: #ccebc5;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_7b2c0_row6_col1 {\n", | |
" background-color: #d7efd1;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_7b2c0_row6_col2, #T_7b2c0_row9_col1, #T_7b2c0_row9_col2, #T_7b2c0_row10_col1, #T_7b2c0_row10_col2 {\n", | |
" background-color: #ecf8e6;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_7b2c0_row7_col2, #T_7b2c0_row8_col1 {\n", | |
" background-color: #ebf7e5;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_7b2c0_row8_col0, #T_7b2c0_row8_col2 {\n", | |
" background-color: #f7fcf0;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_7b2c0_row9_col0 {\n", | |
" background-color: #e0f3db;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_7b2c0_row10_col0, #T_7b2c0_row11_col2 {\n", | |
" background-color: #e1f3dc;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_7b2c0_row11_col0 {\n", | |
" background-color: #a9ddb5;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_7b2c0_row15_col0 {\n", | |
" background-color: #085395;\n", | |
" color: #f1f1f1;\n", | |
"}\n", | |
"</style>\n", | |
"<table id=\"T_7b2c0\">\n", | |
" <thead>\n", | |
" <tr>\n", | |
" <th class=\"blank level0\" > </th>\n", | |
" <th id=\"T_7b2c0_level0_col0\" class=\"col_heading level0 col0\" >0.750000</th>\n", | |
" <th id=\"T_7b2c0_level0_col1\" class=\"col_heading level0 col1\" >1.000000</th>\n", | |
" <th id=\"T_7b2c0_level0_col2\" class=\"col_heading level0 col2\" >2.000000</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th id=\"T_7b2c0_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n", | |
" <td id=\"T_7b2c0_row0_col0\" class=\"data row0 col0\" >0.29</td>\n", | |
" <td id=\"T_7b2c0_row0_col1\" class=\"data row0 col1\" >0.65</td>\n", | |
" <td id=\"T_7b2c0_row0_col2\" class=\"data row0 col2\" >0.30</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_7b2c0_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n", | |
" <td id=\"T_7b2c0_row1_col0\" class=\"data row1 col0\" >0.70</td>\n", | |
" <td id=\"T_7b2c0_row1_col1\" class=\"data row1 col1\" >0.55</td>\n", | |
" <td id=\"T_7b2c0_row1_col2\" class=\"data row1 col2\" >0.25</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_7b2c0_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n", | |
" <td id=\"T_7b2c0_row2_col0\" class=\"data row2 col0\" >0.60</td>\n", | |
" <td id=\"T_7b2c0_row2_col1\" class=\"data row2 col1\" >0.45</td>\n", | |
" <td id=\"T_7b2c0_row2_col2\" class=\"data row2 col2\" >0.20</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_7b2c0_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n", | |
" <td id=\"T_7b2c0_row3_col0\" class=\"data row3 col0\" >0.50</td>\n", | |
" <td id=\"T_7b2c0_row3_col1\" class=\"data row3 col1\" >0.35</td>\n", | |
" <td id=\"T_7b2c0_row3_col2\" class=\"data row3 col2\" >0.15</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_7b2c0_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n", | |
" <td id=\"T_7b2c0_row4_col0\" class=\"data row4 col0\" >0.60</td>\n", | |
" <td id=\"T_7b2c0_row4_col1\" class=\"data row4 col1\" >0.45</td>\n", | |
" <td id=\"T_7b2c0_row4_col2\" class=\"data row4 col2\" >0.25</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_7b2c0_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n", | |
" <td id=\"T_7b2c0_row5_col0\" class=\"data row5 col0\" >0.50</td>\n", | |
" <td id=\"T_7b2c0_row5_col1\" class=\"data row5 col1\" >0.35</td>\n", | |
" <td id=\"T_7b2c0_row5_col2\" class=\"data row5 col2\" >0.15</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_7b2c0_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n", | |
" <td id=\"T_7b2c0_row6_col0\" class=\"data row6 col0\" >0.20</td>\n", | |
" <td id=\"T_7b2c0_row6_col1\" class=\"data row6 col1\" >0.15</td>\n", | |
" <td id=\"T_7b2c0_row6_col2\" class=\"data row6 col2\" >0.05</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_7b2c0_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n", | |
" <td id=\"T_7b2c0_row7_col0\" class=\"data row7 col0\" >0.20</td>\n", | |
" <td id=\"T_7b2c0_row7_col1\" class=\"data row7 col1\" >0.15</td>\n", | |
" <td id=\"T_7b2c0_row7_col2\" class=\"data row7 col2\" >0.05</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_7b2c0_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n", | |
" <td id=\"T_7b2c0_row8_col0\" class=\"data row8 col0\" >0.00</td>\n", | |
" <td id=\"T_7b2c0_row8_col1\" class=\"data row8 col1\" >0.05</td>\n", | |
" <td id=\"T_7b2c0_row8_col2\" class=\"data row8 col2\" >0.00</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_7b2c0_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n", | |
" <td id=\"T_7b2c0_row9_col0\" class=\"data row9 col0\" >0.10</td>\n", | |
" <td id=\"T_7b2c0_row9_col1\" class=\"data row9 col1\" >0.05</td>\n", | |
" <td id=\"T_7b2c0_row9_col2\" class=\"data row9 col2\" >0.05</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_7b2c0_level0_row10\" class=\"row_heading level0 row10\" >10</th>\n", | |
" <td id=\"T_7b2c0_row10_col0\" class=\"data row10 col0\" >0.10</td>\n", | |
" <td id=\"T_7b2c0_row10_col1\" class=\"data row10 col1\" >0.05</td>\n", | |
" <td id=\"T_7b2c0_row10_col2\" class=\"data row10 col2\" >0.05</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_7b2c0_level0_row11\" class=\"row_heading level0 row11\" >11</th>\n", | |
" <td id=\"T_7b2c0_row11_col0\" class=\"data row11 col0\" >0.30</td>\n", | |
" <td id=\"T_7b2c0_row11_col1\" class=\"data row11 col1\" >0.20</td>\n", | |
" <td id=\"T_7b2c0_row11_col2\" class=\"data row11 col2\" >0.10</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_7b2c0_level0_row12\" class=\"row_heading level0 row12\" >12</th>\n", | |
" <td id=\"T_7b2c0_row12_col0\" class=\"data row12 col0\" >0.45</td>\n", | |
" <td id=\"T_7b2c0_row12_col1\" class=\"data row12 col1\" >0.25</td>\n", | |
" <td id=\"T_7b2c0_row12_col2\" class=\"data row12 col2\" >0.15</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_7b2c0_level0_row13\" class=\"row_heading level0 row13\" >13</th>\n", | |
" <td id=\"T_7b2c0_row13_col0\" class=\"data row13 col0\" >0.55</td>\n", | |
" <td id=\"T_7b2c0_row13_col1\" class=\"data row13 col1\" >0.35</td>\n", | |
" <td id=\"T_7b2c0_row13_col2\" class=\"data row13 col2\" >0.20</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_7b2c0_level0_row14\" class=\"row_heading level0 row14\" >14</th>\n", | |
" <td id=\"T_7b2c0_row14_col0\" class=\"data row14 col0\" >0.55</td>\n", | |
" <td id=\"T_7b2c0_row14_col1\" class=\"data row14 col1\" >0.35</td>\n", | |
" <td id=\"T_7b2c0_row14_col2\" class=\"data row14 col2\" >0.20</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_7b2c0_level0_row15\" class=\"row_heading level0 row15\" >15</th>\n", | |
" <td id=\"T_7b2c0_row15_col0\" class=\"data row15 col0\" >0.75</td>\n", | |
" <td id=\"T_7b2c0_row15_col1\" class=\"data row15 col1\" >0.55</td>\n", | |
" <td id=\"T_7b2c0_row15_col2\" class=\"data row15 col2\" >0.30</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n" | |
], | |
"text/plain": [ | |
"<pandas.io.formats.style.Styler at 0x7f300408e340>" | |
] | |
}, | |
"execution_count": 3, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"err_no_offset = meas - angles[:, None]\n", | |
"pd.DataFrame(np.abs(err_no_offset), columns=d).style.background_gradient(cmap='GnBu', vmin=0, vmax=0.8).format('{:.2f}')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"id": "6846c8f4-02a7-40a9-88f5-149893d6ad5b", | |
"metadata": { | |
"tags": [] | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"array([[ 14.2 , 14.4 , 14.7 ],\n", | |
" [ 12.3 , 12.47, 12.74],\n", | |
" [ 10.4 , 10.55, 10.77],\n", | |
" [ 8.5 , 8.63, 8.81],\n", | |
" [ 6.61, 6.71, 6.85],\n", | |
" [ 4.72, 4.79, 4.9 ],\n", | |
" [ 2.83, 2.87, 2.94],\n", | |
" [ 0.94, 0.96, 0.98],\n", | |
" [ -0.94, -0.96, -0.98],\n", | |
" [ -2.83, -2.87, -2.94],\n", | |
" [ -4.72, -4.79, -4.9 ],\n", | |
" [ -6.61, -6.71, -6.85],\n", | |
" [ -8.5 , -8.63, -8.81],\n", | |
" [-10.4 , -10.55, -10.77],\n", | |
" [-12.3 , -12.47, -12.74],\n", | |
" [-14.2 , -14.4 , -14.7 ]])" | |
] | |
}, | |
"execution_count": 4, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"f = 41.910e-3\n", | |
"expected_with_offset = np.rad2deg(np.arctan(((d - f) / d * np.tan(np.deg2rad(angles[None].T)))))\n", | |
"np.round(expected_with_offset, 2)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"id": "f11cea34-09d6-45b0-b326-219668a1f7f0", | |
"metadata": { | |
"tags": [] | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<style type=\"text/css\">\n", | |
"#T_334c0_row0_col0 {\n", | |
" background-color: #49add0;\n", | |
" color: #f1f1f1;\n", | |
"}\n", | |
"#T_334c0_row0_col1 {\n", | |
" background-color: #ecf8e6;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row0_col2, #T_334c0_row2_col0, #T_334c0_row2_col1, #T_334c0_row15_col2 {\n", | |
" background-color: #f7fcf0;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row1_col0, #T_334c0_row3_col0 {\n", | |
" background-color: #f6fcef;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row1_col1, #T_334c0_row6_col1 {\n", | |
" background-color: #f2faeb;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row1_col2, #T_334c0_row6_col2, #T_334c0_row9_col2 {\n", | |
" background-color: #f4fbed;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row2_col2, #T_334c0_row13_col2 {\n", | |
" background-color: #f1faeb;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row3_col1, #T_334c0_row8_col2 {\n", | |
" background-color: #f3faec;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row3_col2, #T_334c0_row12_col2 {\n", | |
" background-color: #eff9e9;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row4_col0 {\n", | |
" background-color: #c8eac3;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row4_col1, #T_334c0_row10_col1 {\n", | |
" background-color: #d5eece;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row4_col2 {\n", | |
" background-color: #dff3da;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row5_col0 {\n", | |
" background-color: #c4e8c1;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row5_col1 {\n", | |
" background-color: #d8f0d2;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row5_col2, #T_334c0_row11_col2, #T_334c0_row12_col0 {\n", | |
" background-color: #edf8e7;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row6_col0 {\n", | |
" background-color: #f0f9e9;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row7_col0 {\n", | |
" background-color: #d7efd1;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row7_col1 {\n", | |
" background-color: #dff2da;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row7_col2 {\n", | |
" background-color: #f1f9ea;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row8_col0, #T_334c0_row10_col2, #T_334c0_row13_col0, #T_334c0_row15_col0, #T_334c0_row15_col1 {\n", | |
" background-color: #ebf7e5;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row8_col1, #T_334c0_row11_col1 {\n", | |
" background-color: #e2f4dd;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row9_col0 {\n", | |
" background-color: #e8f6e2;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row9_col1 {\n", | |
" background-color: #e6f5e0;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row10_col0, #T_334c0_row14_col1 {\n", | |
" background-color: #d1edca;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row11_col0 {\n", | |
" background-color: #e3f4de;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row12_col1 {\n", | |
" background-color: #dcf1d7;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row13_col1 {\n", | |
" background-color: #e0f3db;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row14_col0 {\n", | |
" background-color: #d5efcf;\n", | |
" color: #000000;\n", | |
"}\n", | |
"#T_334c0_row14_col2 {\n", | |
" background-color: #e9f6e3;\n", | |
" color: #000000;\n", | |
"}\n", | |
"</style>\n", | |
"<table id=\"T_334c0\">\n", | |
" <thead>\n", | |
" <tr>\n", | |
" <th class=\"blank level0\" > </th>\n", | |
" <th id=\"T_334c0_level0_col0\" class=\"col_heading level0 col0\" >0.750000</th>\n", | |
" <th id=\"T_334c0_level0_col1\" class=\"col_heading level0 col1\" >1.000000</th>\n", | |
" <th id=\"T_334c0_level0_col2\" class=\"col_heading level0 col2\" >2.000000</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th id=\"T_334c0_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n", | |
" <td id=\"T_334c0_row0_col0\" class=\"data row0 col0\" >0.51</td>\n", | |
" <td id=\"T_334c0_row0_col1\" class=\"data row0 col1\" >0.05</td>\n", | |
" <td id=\"T_334c0_row0_col2\" class=\"data row0 col2\" >0.00</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_334c0_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n", | |
" <td id=\"T_334c0_row1_col0\" class=\"data row1 col0\" >0.00</td>\n", | |
" <td id=\"T_334c0_row1_col1\" class=\"data row1 col1\" >0.02</td>\n", | |
" <td id=\"T_334c0_row1_col2\" class=\"data row1 col2\" >0.01</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_334c0_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n", | |
" <td id=\"T_334c0_row2_col0\" class=\"data row2 col0\" >0.00</td>\n", | |
" <td id=\"T_334c0_row2_col1\" class=\"data row2 col1\" >0.00</td>\n", | |
" <td id=\"T_334c0_row2_col2\" class=\"data row2 col2\" >0.03</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_334c0_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n", | |
" <td id=\"T_334c0_row3_col0\" class=\"data row3 col0\" >0.00</td>\n", | |
" <td id=\"T_334c0_row3_col1\" class=\"data row3 col1\" >0.02</td>\n", | |
" <td id=\"T_334c0_row3_col2\" class=\"data row3 col2\" >0.04</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_334c0_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n", | |
" <td id=\"T_334c0_row4_col0\" class=\"data row4 col0\" >0.21</td>\n", | |
" <td id=\"T_334c0_row4_col1\" class=\"data row4 col1\" >0.16</td>\n", | |
" <td id=\"T_334c0_row4_col2\" class=\"data row4 col2\" >0.10</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_334c0_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n", | |
" <td id=\"T_334c0_row5_col0\" class=\"data row5 col0\" >0.22</td>\n", | |
" <td id=\"T_334c0_row5_col1\" class=\"data row5 col1\" >0.14</td>\n", | |
" <td id=\"T_334c0_row5_col2\" class=\"data row5 col2\" >0.05</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_334c0_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n", | |
" <td id=\"T_334c0_row6_col0\" class=\"data row6 col0\" >0.03</td>\n", | |
" <td id=\"T_334c0_row6_col1\" class=\"data row6 col1\" >0.02</td>\n", | |
" <td id=\"T_334c0_row6_col2\" class=\"data row6 col2\" >0.01</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_334c0_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n", | |
" <td id=\"T_334c0_row7_col0\" class=\"data row7 col0\" >0.14</td>\n", | |
" <td id=\"T_334c0_row7_col1\" class=\"data row7 col1\" >0.11</td>\n", | |
" <td id=\"T_334c0_row7_col2\" class=\"data row7 col2\" >0.03</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_334c0_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n", | |
" <td id=\"T_334c0_row8_col0\" class=\"data row8 col0\" >0.06</td>\n", | |
" <td id=\"T_334c0_row8_col1\" class=\"data row8 col1\" >0.09</td>\n", | |
" <td id=\"T_334c0_row8_col2\" class=\"data row8 col2\" >0.02</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_334c0_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n", | |
" <td id=\"T_334c0_row9_col0\" class=\"data row9 col0\" >0.07</td>\n", | |
" <td id=\"T_334c0_row9_col1\" class=\"data row9 col1\" >0.08</td>\n", | |
" <td id=\"T_334c0_row9_col2\" class=\"data row9 col2\" >0.01</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_334c0_level0_row10\" class=\"row_heading level0 row10\" >10</th>\n", | |
" <td id=\"T_334c0_row10_col0\" class=\"data row10 col0\" >0.18</td>\n", | |
" <td id=\"T_334c0_row10_col1\" class=\"data row10 col1\" >0.16</td>\n", | |
" <td id=\"T_334c0_row10_col2\" class=\"data row10 col2\" >0.05</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_334c0_level0_row11\" class=\"row_heading level0 row11\" >11</th>\n", | |
" <td id=\"T_334c0_row11_col0\" class=\"data row11 col0\" >0.09</td>\n", | |
" <td id=\"T_334c0_row11_col1\" class=\"data row11 col1\" >0.09</td>\n", | |
" <td id=\"T_334c0_row11_col2\" class=\"data row11 col2\" >0.05</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_334c0_level0_row12\" class=\"row_heading level0 row12\" >12</th>\n", | |
" <td id=\"T_334c0_row12_col0\" class=\"data row12 col0\" >0.05</td>\n", | |
" <td id=\"T_334c0_row12_col1\" class=\"data row12 col1\" >0.12</td>\n", | |
" <td id=\"T_334c0_row12_col2\" class=\"data row12 col2\" >0.04</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_334c0_level0_row13\" class=\"row_heading level0 row13\" >13</th>\n", | |
" <td id=\"T_334c0_row13_col0\" class=\"data row13 col0\" >0.05</td>\n", | |
" <td id=\"T_334c0_row13_col1\" class=\"data row13 col1\" >0.10</td>\n", | |
" <td id=\"T_334c0_row13_col2\" class=\"data row13 col2\" >0.03</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_334c0_level0_row14\" class=\"row_heading level0 row14\" >14</th>\n", | |
" <td id=\"T_334c0_row14_col0\" class=\"data row14 col0\" >0.15</td>\n", | |
" <td id=\"T_334c0_row14_col1\" class=\"data row14 col1\" >0.18</td>\n", | |
" <td id=\"T_334c0_row14_col2\" class=\"data row14 col2\" >0.06</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th id=\"T_334c0_level0_row15\" class=\"row_heading level0 row15\" >15</th>\n", | |
" <td id=\"T_334c0_row15_col0\" class=\"data row15 col0\" >0.05</td>\n", | |
" <td id=\"T_334c0_row15_col1\" class=\"data row15 col1\" >0.05</td>\n", | |
" <td id=\"T_334c0_row15_col2\" class=\"data row15 col2\" >0.00</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n" | |
], | |
"text/plain": [ | |
"<pandas.io.formats.style.Styler at 0x7f2fc0e51550>" | |
] | |
}, | |
"execution_count": 5, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"err_with_offset = meas - expected_with_offset\n", | |
"pd.DataFrame(np.abs(err_with_offset), columns=d).style.background_gradient(cmap='GnBu', vmin=0, vmax=0.8).format('{:.2f}')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"id": "2a60a802-7c3f-4697-86ee-4bcf60c75754", | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3 (ipykernel)", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.8.10" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 5 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment