Topology in neuroscience
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

994 lines
238 KiB

{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"# Decoding population activity\n",
"\n",
"_In this notebook we sample population activity using the analytical model, then analyze the topology and successfully decode orientation using cohomological parametrization_"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"**Imports**"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"%matplotlib inline\n",
"\n",
"import sys\n",
"import seaborn as sns\n",
"import umap\n",
"import numpy as np\n",
"import pandas as pd\n",
"from matplotlib import pyplot as plt\n",
"sys.path.insert(0, './model')\n",
"sys.path.insert(0, './numerical')\n",
"\n",
"from sym_model import Population, sigmoid\n",
"from model import decoding\n",
"from model import persistence\n",
"from utils import get_orientation_phase_grid"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"## Getting the data\n",
"\n",
"**Sampling the activity using the model**"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"limit = 500\n",
"# n_theta, n_phi = 18, 24\n",
"n_theta, n_phi = 36, 72\n",
"# n_theta, n_phi = 9, 12\n",
"step_phi, step_theta = 360 // n_phi, 180 // n_theta\n",
"N = 40 # number of cells"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[0. 0.] [3.05432619 6.19591884] (2592, 2)\n"
]
}
],
"source": [
"grid = get_orientation_phase_grid(step_phi, step_theta)\n",
"grid = grid.reshape((-1, 2))\n",
"print(grid[0], grid[-1], grid.shape)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"population = Population.random(N)"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"phi_deg, theta_deg = grid[:, 1] * 180 / np.pi, grid[:, 0] * 180 / np.pi"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"# res = population.sample_responses(limit, custom_grid=grid, use_sigmoid=False)\n",
"# res, phi_deg, theta_deg = res[:, :, 0], res[:, 0, 1], res[:, 0, 2]"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
"res = np.abs(population.response_func(grid[:, 1], grid[:, 0]).swapaxes(0, 1)) * 10"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"phi_reorder = sorted(list(range(len(phi_deg[:limit]))), key=lambda x: phi_deg[x])\n",
"theta_reorder = sorted(list(range(len(theta_deg[:limit]))), key=lambda x: theta_deg[x])"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAFoAAAAVCAYAAADGpvm7AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAFAUlEQVRYCe2Z4XUUNxCAz/dSwIVUwLkDCBVgdwBOBeAOyE/7Xx50AOkg0AFQAcEd4A5irgPn+2SNLO3qzB4+Hkde5j3tjEYjzWhmdqS9m11eXs7qdnJysqz7/9Otf6b4o+fD+ayC09PTZ3TvVazJJHNH8+AtaMvJi/x3BJfZl2VHe0ZIYOAR6AH498TID/o6Kni/Ql/Yh3+WRRKi/xliQQu+tHCfsdUVefWk/7Lq34F+0pGZpLdaZ6sk9pg4x+Dj4cLwnmfe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7gxYHoJ7WtlATo+LqqDXW9Yea7vgdRyXroqXpnyBqoz86nNcGCfxtwXVsB1k8JBX5ES1+HYGWOaA+LYEukIOzxk56Z85oJ/jjSALx0NWmY151mY8jqnLjyGUUdOvoMRy4yIjah7iajNtGrOVlecvQDlsxNgLVMKPfiWybo0A/w47cZ7XYPK5qHn0lavhegG8i2HcePSjrUm0DJqkb6B+hgu2VpVOe/p+nYZMDegvfn2RAjVF7772ncLXR7jphluwS+4ekNTo7GQA+1ct/dJUun2IL9vs69O+yU6d9EBpvMZn2aLgyR0Srz0BoeePJ/BHjKhuJg3hV79WWpEuUfFq3LUfBE3TWjd8V5k+zAf964/JmifMD8C7QsJSruRSwGAAAAAElFTkSuQmCC",
"text/latex": [
"$\\displaystyle \\left( 2592, \\ 40\\right)$"
],
"text/plain": [
"(2592, 40)"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"res.shape"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"res_reshaped = res.reshape((n_phi, n_theta, -1))"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/usr/lib/python3.10/site-packages/seaborn/distributions.py:2619: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms).\n",
" warnings.warn(msg, FutureWarning)\n"
]
},
{
"data": {
"text/plain": [
"<AxesSubplot:ylabel='Density'>"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXgAAAD4CAYAAADmWv3KAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTA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aqrhSP8I6YymzRGR8laxAd95bACAdS31k5avbKol7RpJIyLlr4IDfhAzOKO5btLyVfkfWtUPLyJlrqIDfnVTLdVVk/8TrFhWDcARzSwpImWuggN+gLaWupOW11Qlqa9O0jMwWoKqRESiU8EBP0jblP73vJb6ao4N6JniIlLeKjLgR9MZDvYOTnsFD9Bcn9IVvIiUvYoM+EO9Q2T85BE0eS311fQMjpB96qCISHmqyIDflxsiOdMV/GjaOXpC3TQiUr4qMuA7jw0CzNgHX7idiEg5qtiATxisaa6ddn1zfQqA/Qp4ESljlRnw3QOsOa2OVHL6w5+4gh9YzLJERCJVmQHfM8ja5un73wFqU0lqUwn29+gKXkTKV0UG/KHeoVN2z+S11FerD15EylqwgDezdWb2sJntMrOdZnZTqLbmwt051DvE6tNmDvjm+mr1wYtIWQt5BT8G/L27vxV4F/BpM7sgYHtFOXpihJF0hjVNswV8is5jAxoLLyJlK1jAu/tBd38697kf2AWsDdVesQ71Zh/msWaGPnjIdtGcGEnTO6g7WkWkPC1KH7yZbQAuAZ6YZt0WM+sws46urq7gtRzMB/xsXTR12aGS6ocXkXIVPODNrBG4B7jZ3fumrnf3re7e7u7tra2
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"sns.distplot(res.ravel())"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"## Plotting joint tunings"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"phase_linspace = np.linspace(0, 360, n_phi)\n",
"orientation_linspace = np.linspace(0, 180, n_theta)"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAEVCAYAAADJrK/3AA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6XZMGQ4ZLvPEt91yAAt1265A3L37KsmHtfquWsf3yKdJ+H399+MYtLc1IRqlIR6ewf4WhrP+9eP/8Nr99++TJWV+bzwuFWfrOzgZ6hwBsaJSpyWqiTrLV3mPquQa5ZU876BYXcsK7qDcsvWT6Pr15/Jifb+/nJC7UcaOrVQq1c6WBTLzf+8GUGRqxujQ12/3RYQVY67zlnPplpXn6zs4GGrkEt1DHSQp1k4Zb0e86Zz2VnlL1pudcj3Hz+QroGRvjJC7U02Osr5Ta76rroGw7w4QtrqCrIZENN0aTrVRb4AWjoGmRlRV4yQzxtaKFOssZuq/BW5GdOu15+ZhpZ6V4aunR4k3Knxm4rNz93zRlk+LxTrldVYOW6NjpipycTk6zRLryVMxRqEaEi3z9W2JVym8buQUpy0qct0mCNZkrzCvXa6IiZFuoka+geJCvdS17mzAczlQWZ2gpRrtXQNTTjkSGAxyNU5Gsux0MLdZI1dA1SWZCJiMy4bkW+n4ZubYUod2rqHqI83x/RuhX5fi3UcdBCnWSN3UNURJjclQWZtPYOMxwIOhyVUtFr6B6kMsJcrirIHOvTVtHTQp1kDV1DM/ZPh4XXa+4edjIkpaLWNxygdyhARUGEuVyQSVPPkE44FiMt1Ek0HAjS1jdMZYTJXREe1qQnFJXLNI2NXor86DAYMrT0aqMjFlqok6jJPvQLF+CZhE/U6MgP5TbhYaORnEyEN46lVtGbsVCLSLWIPCMi+0Vkr4jcnozATkcNEQ7NC3s9ubVvzwma27FrjLJFHR5LXa+FOiaRXPASAO4wxmwXkVxgm4g
"text/plain": [
"<Figure size 432x288 with 6 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"fig, ax = plt.subplots(3, 2)\n",
"ax = ax.flatten()\n",
"# set title\n",
"fig.suptitle('Marginal Tunings - By Phase')\n",
"for i in range(6):\n",
" ax[i].plot(phase_linspace, res_reshaped.mean(1)[:, i])"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"collapsed": false,
"pycharm": {
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e3a41Ncm12rVNGvqySL6Uw5r4M9TxcKGOuws+Hi74ebrRPNibYB93RMTaEjU2wJW8Qo6kZlHH3YVWoT7WllMplFKkZOZz/EIWaVfyySssJregmJzCYlycBH8vNwK83AjwcqVRgBehvrrda8zDbgz9iQvZvLvxcJn7/DxdaRlShzb1fejZPIheLYLw83S1sEKNpSkoMhB38hKbj6aReCaToylXOJuRB8Cwro15Y0hHKys0j1k/H2N94jmOp2WRXVBsdr1Abzci6vsS0cCX6LAA+rQMwsvNbh5pjQWxm1bRp2UwR14bQFZeEVn5RVzJKyI9u4CjqVc4nJrF0ZQsvtx1lqXbTuEk0KmxPze1DuHuzg1pHOhlbfmaauJKXiHrE8+xcX8qvx+7QHaB0dttFepD16aBtAz1oVWoDxENfK0t1Wzyi4rx93Ll/pjGNA3yplmwN/X9PPB0c8HT1RlPV2eKDAYu5xRyKaeASzmFJF3IZv/ZTPafy2Th1iTm/HocNxcnejSryy1tQ+jfrh4hvh7WvjRNNZGdX8T6xHN8mXCGj4ZFEeDtVqn6NpkzNiYmRlVlLLOw2EDC6cv8ejiNXw+nsedMBgC9mgfxQJfG9IsIxcPVubrlamoYpRSxJy+xaudp1u05R25hMY0CPLmhVTB9WwXTs3ldfDzM78GJSJxSKqYGJZdJVdt1RRQUGYg9mc4PB1L54UAKSRdzcHES+rULZUS3MHo2r6uHeOwQpRTbjqfzWVwyG/aeI6egmKZB3kwf2pkOjfz+Uv5a7dqhDP3VJF/K4bO4ZD6NTebM5VwCvFyZ0KcZo3uEVcowaKxDsUGxPvEcM346ysHzV/B2c+a
"text/plain": [
"<Figure size 432x288 with 6 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"fig, ax = plt.subplots(3, 2)\n",
"ax = ax.flatten()\n",
"# set title\n",
"fig.suptitle('Marginal Tunings - By Orientation')\n",
"for i in range(6):\n",
" ax[i].plot(orientation_linspace, res_reshaped.mean(0)[:, i])"
]
},
{
"cell_type": "code",
"execution_count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kmQ7rVBeIUV4ZXkkKcK7x1GjRCmvRDlGsdpbVe9e6mmdZWl4CpIkCS4K8IrSFCi5OP66+3TsZqjXWB4IPcPRhUDhGzjHNnabEubxdYacBa1FpxB+1cvuC7ZNLr8nRa0X96liJeqgmdTZCTrQrjmmDKOgoboJztVCCerKWsRkYSwzA/1T8eYIyJjk8GG6GcUCeUIaSUKMmuOue6AvVP22+PleP31TVzE20eYOV7/7qfPdcheZCWSHFEVCXk9JGcVH5eO6SMSFdOlCEi6gASFziM+pBxg06IxIk2Tot4+EvIesRapHDKZJIesKnAOKpeiIGvQKjlorOwyAuqd0SY7Rysg5KgoO6QwREQqwGd3dKFvgO4evPCvSno4iubfrKuRr4KopDaMSBLdkA/3Ji+T+Bqf1k0A04IEsI1iPNhWsS2YTrGLiG0jdu4xXcQcNdB2yKKFo2NomlS2EWRvhkwm6N6UOKnRqSPMKmJlCDNDrAQ/NUQHoRZCnewZJqAWYpWXDtRpsrMFNQp/+3rX71YIr1pDeHJvuaN3xtHTMkUxWZjXt2NOwMeIhLi6z/skxt6n/Z2gIaT8UNScG0rFDKJrbV72T0m78sQkP03VLnNGwz6RNCwli7LaVSGGUWSwoafnbSU6OH5rnyfLO3V1KbGPhJbia0Jal5AiIRMsEhQTFNMlu9s2C3ATkhh3Lolw5xERxKeHqoiHrkuRkMjSjn3VczpJgltXaGVRZ4i1Ra0h1qnqGasU/agVYo56oiNXR5M91abfqGYpvncaFzFPNxiTcgbGZJ8d/e7kppKW0ST99QaNgnqBmKPY/DKtIBHsQrLwCqYD2+RXB2rSQxAFNQF
"text/plain": [
"<Figure size 432x288 with 9 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"fig, ax = plt.subplots(3, 3)\n",
"ax = ax.flatten()\n",
"# set title\n",
"fig.suptitle('Joint Tunings')\n",
"for i in range(9):\n",
" # 100 is for scaling\n",
" ax[i].imshow(res_reshaped[:, :, i], cmap='viridis', extent=[0, 100, 0, 100])"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.image.AxesImage at 0x7f6a949178e0>"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAI4AAAD7CAYAAAC8Eqx6AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAONUlEQVR4nO3dXYxcZRkH8P9/Zvazn7v0I01bKSQENSYUrQWDMSqWVDRAopg20aAh6Y0aiEZB7rwg6RXBK5NG0CYgWAtEQghaEaImiC0F5WOB1obStZVSdmGXbvdjdh4v5rDvu9uZ7plnds/Ozvx/Cdl33jkz5+z2z5l55pzzDM0MIrXKLfQGyOKk4IiLgiMuCo64KDjiouCIS13BIbmd5Bskj5K8c642ShofvZ/jkMwDeBPANgD9AA4C2Glmr83d5kmjKtTx2K0AjprZMQAg+TCAGwFUDU47O6wTS+pYpWRtGINnzGz1zPl6grMewInodj+Aqy70gE4swVW8to5VStb+bPuPV5qvJzisMHfe6x7JXQB2AUAnuutYnTSSet4c9wPYGN3eAODkzIXMbI+ZbTGzLW3oqGN10kjqCc5BAJeRvIRkO4AdAB6fm82SRud+qTKzIskfAPgjgDyA+83s1TnbMmlo9bzHgZk9CeDJOdoWWUT0ybG4KDjiouCIi4IjLgqOuCg44qLgiIuCIy4KjrgoOOKi4IiLgiMuCo64KDjiouCIi4IjLgqOuCg44qLgiIuCIy4KjrjMGhyS95M8TfKVaK6X5AGSR5KfPfO7mdJo0uxxfgNg+4y5OwE8bWaXAXg6uS0tZNbgmNlfAQzMmL4RwN5kvBfATXO7WdLovO9x1prZKQBIfq6Zu02SxaCuKznTULeK5uTd47xDch0AJD9PV1tQ3Sqakzc4jwO4JRnfAuAPc7M5slikKccfAvAcgMtJ9pO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gFwA8nrUd7bLif5AJJuFWZ26kLdKsxsD4A9ANBx6YYG+f5Cqdesexwz+5mZbTCzTQB2APiLmX0b6lbR0ur5HGc3gG0kjwDYltyWFlHTsSozexbl6snVraLwAbHmT0lFUFcPwMq9/uaqByDT9AA8d4GqKr4vF1d94bniaqs90x6A+WgcbXSVHoDHUZk+ORYXBUdcFBxxUXDERcERl0zPACyMFNF78Mz5dzTY91WVou+rQprvq5qhNB5VaBY+Lee56ABale+rykVnAOYa4fuqqtAeR1wUHHFRcMRFwREXBUdcsr0EeHwC1n/K99ioYqp6bkZcMU17aJVHlKadhlj5sdWWqfacwLRvBbbo2JgxOosx/t6o+LHRMvFxrmmLVKt6cin2AykqpjS0xxEXBUdcFBxxUXDERcERl0yrKiuVUDo3OttC2WzMeeudp/Popx1vi4+ZVVk+RdUzL1vK2vYh2uOIi4IjLgqOuKS9dvwtAMMAJgEUzWwLyV4AvwOwCcBbAL5lZoPVnkOaSy17nC+Z2WYz25LcVreKFlZPVVVztwoA047jSAXzVd3Nut7a/l3S7nEMwJ9IvkByVzKnbhUtLO0e5xozO0lyDYADJF9Pu4IkaLsAoBPdsywti0WqPY6ZnUx+ngbwGICtSLpVAMBs3SrMbIuZbWlDR6VFZBFK0x9nCcllH40BXAfgFahbRUtL81K1FsBjyclDBQC/NbOnSB4EsI/krQDeBnDz/G2mNJpZg2NmxwBcUWG+5m4V0jz0ybG4KDjiouCIi4IjLgqOuCg44qLgiIuCIy4KjrgoOOKi4IiLgiMuCo64KDjiouCIi4IjLgqOuCg44qLgiIuCIy4KjrikCg7JlST3k3ydZB/Jz5HsJXmA5JHkZ898b6w0jrR7nF8AeMrMPo7ypTJ9ULeKlpbmSs7lAL4A4D4AMLNxM3sf5W4Ve5PF9gK4aX42URpRmj3OpQDeBfB
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plt.imshow(res_reshaped[:, :, 0], cmap='viridis')"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"## PCA"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"res_df = pd.DataFrame(res, columns=['x' + str(i) for i in range(N)])"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"from sklearn.decomposition import PCA\n",
"import seaborn as sns"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
"text/plain": [
"<AxesSubplot:>"
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAWYAAAEFCAYAAADQRk3iAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAnAklEQVR4nO3de7hdVXnv8e8vNxJECJd4gcRyr9UjWJukVCsgPAjoOaXwaMELEoRGpBQPPu3Rtp7aovaAnEdtvZATMVUsFVq5mNZoSr00eAQMiqVADhBRSAwVUaKGBCF7v+ePOTdZbNace665x1prrrV+nzzzedaac445x157Z+y5xxjvOxQRmJlZc8zodwXMzOzp3DCbmTWMG2Yzs4Zxw2xm1jBumM3MGsYNs5lZw7hhNjOrSdIqSQ9LurPguCT9jaSNku6Q9LIq13XDbGZW36eBk0qOnwwclm/LgcurXDR5wyzpLEn35dtZqa9vZtYUEbEO+GnJKacAV0bmFmC+pOdPdd1ZqSoIIGkf4L3AYiCAb0taHRGPpryPmdmAOADY1PJ+c77vobJCtRtmSUuATwFLgZnAt4CrgRsj4qf5OTeSPeZ/ruxaTz5yf2Fc+PiW+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lSfD/xrwunzXWcAXSs5/KiTbjbKZ9cwADP6VNsytYdfAJcASScdJugn4R+B4SZslnZgXeRfwTkkbyfqcP9XFupuZdS7Gq299MtXgX1HY9VcLzr+fbAZHMqmTbPcs8X7JbIg6MzZqJ94vWf27MNTcifdtmA3J4J+Z2dAY+OlyZmZDZwCemFOHZF8l6R5Jd0paledkNjNrjhEMyb4KeCHwErLeyHNrXt/MrDsGYFZGspBsgIh
"text/plain": [
"<Figure size 432x288 with 2 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"sns.heatmap(res_df.corr())"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"Let's take 6 components"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>PC1</th>\n",
" <th>PC2</th>\n",
" <th>PC3</th>\n",
" <th>PC4</th>\n",
2 years ago
" <th>PC5</th>\n",
" <th>PC6</th>\n",
" <th>PC7</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>-4.559656</td>\n",
" <td>6.088501e-15</td>\n",
" <td>5.236211</td>\n",
" <td>1.127316e-13</td>\n",
" <td>-3.530877</td>\n",
" <td>-4.189611e-13</td>\n",
" <td>2.688094</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>-4.542878</td>\n",
" <td>-5.230832e-02</td>\n",
" <td>5.215859</td>\n",
" <td>-8.860678e-02</td>\n",
" <td>-3.517901</td>\n",
" <td>1.007660e-01</td>\n",
" <td>2.677216</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>-4.492672</td>\n",
" <td>-1.042152e-01</td>\n",
" <td>5.154961</td>\n",
" <td>-1.765388e-01</td>\n",
" <td>-3.479075</td>\n",
" <td>2.007685e-01</td>\n",
" <td>2.644661</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>-4.409430</td>\n",
" <td>-1.552890e-01</td>\n",
" <td>5.053951</td>\n",
" <td>-2.631118e-01</td>\n",
" <td>-3.414666</td>\n",
" <td>2.992772e-01</td>\n",
" <td>2.590699</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>-4.293779</td>\n",
" <td>-2.051631e-01</td>\n",
" <td>4.913619</td>\n",
" <td>-3.476756e-01</td>\n",
" <td>-3.325180</td>\n",
" <td>3.955234e-01</td>\n",
" <td>2.515725</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" PC1 PC2 PC3 PC4 PC5 PC6 \\\n",
"0 -4.559656 6.088501e-15 5.236211 1.127316e-13 -3.530877 -4.189611e-13 \n",
"1 -4.542878 -5.230832e-02 5.215859 -8.860678e-02 -3.517901 1.007660e-01 \n",
"2 -4.492672 -1.042152e-01 5.154961 -1.765388e-01 -3.479075 2.007685e-01 \n",
"3 -4.409430 -1.552890e-01 5.053951 -2.631118e-01 -3.414666 2.992772e-01 \n",
"4 -4.293779 -2.051631e-01 4.913619 -3.476756e-01 -3.325180 3.955234e-01 \n",
"\n",
" PC7 \n",
"0 2.688094 \n",
"1 2.677216 \n",
"2 2.644661 \n",
"3 2.590699 \n",
"4 2.515725 "
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
2 years ago
"N_COMP = 7\n",
"pca = PCA(n_components=N_COMP)\n",
"pca.fit(res_df)\n",
"data_pca = pca.transform(res_df)\n",
"data_pca = pd.DataFrame(data_pca, columns=[f'PC{i+1}' for i in range(N_COMP)])\n",
"data_pca.head()"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAFAAAAAVCAYAAADRhGlyAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAEXElEQVRYCe2Y63EUMQyAlxsKOEIFhA4CVEDSAdABpAMYfiX/GOgAqIBHB0AFQDpIOgCug/B9Psv49ryXveTCYwbNeCXLsiTLsry73enpaVe3g4OD7br/n/4Vn1ZsJl0Fh4eHj+nuVKzRJHOX5sGb0rZHK/lDgvpIe6S/Z7ignDEqcMUMExi4B7oDfpIY+UHfAATvNvR3+/CPskhC9H9A6EDww5lbjM16si+r/hb0w4bMKLuVnnOT2Hbt71YomCFzzXGwAbT/yn4KIB0X+wl8S2YAfRfxErxX8Z5Dq2QP/seKfwxtMNR1QntPe4ZMCR60Y19p6nwB7sBm7ieagXaevNF2lb8oYM816Uey39O3S9+EcT0JoF3DXfDsauapoM6KzO7k70dHzCSVPYJ0x9KuyAeO4N+fk4PP14xsIZeCpxS0875Aaj82ah27qrkw4EPYLrrguZEduAQvD+pr8nGSGQ8QSimZ+4GM/jFjZk4NZt556ptHpbXLHvvdys6m7da+t+jPLSa85/i0kEDKwTNWxmw64TG0KGUN1Aky5RjKrKAf2GpokdRY5lhD+/AtM6yxwsbsztWtfuJbP8M6eGbYsxUzTYQHHmFTt9SyegJKho6k9UIjcWGkafQ92gbqOs30twYmGbCFF1aqk+IalBfiyKxldz51c0/81I8dcFyeLeXGbG/Cw133AhgFKDV4GugrN3BvGX+RDTv+FdrjGOBOpyAFI+O0IdCRpb3htFlDdpdkN8Aw+2yrwJhtG0Cdbh2rocleHu8NVC1A31t5FjxoU9xdqi+nh44zVoIKbWBiXqs+OkVo2p0Pbe6JP27wLrh5KitLxiwFcAsiFlCNL5MoNRjWxKEj1p9kQHz5TFkH1s4N2n3oxzR32bEo4s0AIreuXVSeG7w0mn70NCoztQaOAhZhffMVpHXdf8hjC++RleJp0Mw3iAs3G7w4LkuOr7IbOjeMV12qtamUeBM4pmJZYC0RNItQ6U1wyTzoklmMWUdbOjTSIZsuEukB8Bh/RM7gFqB/lt0iuwkCe67BE7Hgx4BuZb8bQHfdSU1AqYtb+sSD5+Kidr5C7mZDgbWu1BIDQvtB03iCTCu3cCnBH2O31jFXeLGniSDEuua99tPkOPEImx13WjIswsBavM2O+jJQ3EIbF4mfZrZyNKHjo7tkLXPU13dO/fvI60cC6LF2O2TdDDfFL5qhEpI1n4liY2dnSvLpicyRAXxDcxEtsLa5GOtfH+oFe7H41h5BdncM1A14xRloX3F853sKDmedV7I0GxllV1nm+n6ZCjrYr6NiL+taB7km58eltmqup2Y//QvkP9cxbedf/veH//do09+xBuxs0461Nckh9hYsx29V2P/iMev0RbJvnaVZr9ObQwoghv04rm/VdZT9cVmPLk7E9/Sl+oMtS5qxSj9fIgM1arGPGmb/XwL/JseFdtl+G6NyWssfaa3m6Pqq8bucuezFblQ/cfHNws/Y8sL/EyOzkvSpYIAbAAAAAElFTkSuQmCC",
"text/latex": [
2 years ago
"$\\displaystyle \\left( 2592, \\ 7\\right)$"
],
"text/plain": [
2 years ago
"(2592, 7)"
]
},
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"data_pca.shape"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"## UMAP decoding"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"# reducer = umap.UMAP()\n",
"# embedding = reducer.fit_transform(data_pca.to_numpy())"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"# %matplotlib notebook\n",
"# plt.scatter(\n",
"# embedding[:, 0],\n",
"# embedding[:, 1])\n",
"# plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"# embedding.shape"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"## Cohomological decoding"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [],
"source": [
"step = 5"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAQwAAAEGCAYAAACQF6v1AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAz9klEQVR4nO2deXhURfa/35M9gbAlbLIFFFEWZZNFUVERAXFUZEBREHVEYfxNEkS/isO4i6MCiSvLuDKI4o4I4jKgoogi+6KICBJAAgECARKynN8ft5P0lqST9E0n6XqfJ499q+reOlc6n1SdqjpHVBWDwWDwhZBAG2AwGGoORjAMBoPPGMEwGAw+YwTDYDD4jBEMg8HgM2GBNqC8xMfHa0JCQqDNMBhqJbt37+bkyZMcO3bsoKo2dq+vcYKRkJDA6tWrA22GwVCrUFWSk5NJTU0lMTGR1NTUXd7amSmJwRDkuIvFjBkzSmxrBMNgCHJmzJjhIhYiUmLbGjclMRgM/mXs2LEAJCcnlyoWYEYYBkNQoqrMmTOH7OxsGjVqxMSJE8sUCzCCYTAEHYU+i3HjxvHf//63XPcawTAYgghnB2dSUhK33XZbue43gmEwBAnuYjF9+nSfpiHOBJXT8+UVvzPj821EhoXw+LWdGdS5eaBNMhiqjLS0NObOnVthsQAQu+Jhi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LLABOHoYvHqy4DYW06A6xpxVf12kM/3sMvk2FVwfDnp+KQtU1a9aMtWvXBpVYgBlhGAo5/x/W8Pykwxm
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Decoding... done\n"
]
}
],
"source": [
"param_1 = decoding.cohomological_parameterization(data_pca[::step]).to_numpy()"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.collections.PathCollection at 0x7f6a9170e170>"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAEICAYAAABPgw/pAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAA4oUlEQVR4nO2de7RmRXXgf7tvX6B5SKt0HLzQ0LoQIjEKtEBixghRG3ApreShMTFmkiFONBPz6EmbOD7yGDtDMpEsTQhxiDFGMYoiCSStibCcwSHSHUBFaEUQ6cZII7QPuoXbt2v++M7XnPvd86iqr/Y5VefWb61efe/3nXvOrqpd++zatatKjDFkMplMJn1W9C1AJpPJZMKQDXomk8kMhGzQM5lMZiBkg57JZDIDIRv0TCaTGQjZoGcymcxAyAY9k6lBRH5fRB4UkX/vW5bQiMiJImJEZGXfsmTCkQ36ABCRr4rIPhH5roh8Q0T+SkSO7FuuJrQMiohcLiI7ROSAiLx2ivscD/wG8ExjzH+oueYJIvJOEflaUfd3Fb8fU3yfXLtk0iYb9OHwUmPMkcDpwHOBN7v8sYxIRh8aXgS3Ab8M/NuUjzgB+KYx5oGa5x8C/AtwKnAe8ATgh4FvAmeWLp2qXTIZF5LpwBk7jDG7gH8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KMr2XSJqcPdkdb/401Nz8bdAXy5FU1+SU3HTl9sBts+m+sL1cZbWfePevXrzfbtm3r5dnaPG/Lpyrf3nOrV3Hj5nN7kKh/JjsJjDpAqsvhM8PFtv/25aCIyHZjzPqq77KHrkCs8bU+yfuDZ1LBtv/GmJufDboCscbX+sT3JdfmBeUwTiY0KfffnOW
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"%matplotlib inline\n",
"plt.title(\"Parameter 1 of CP vs. phase\")\n",
"plt.scatter(phi_deg[::step], param_1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Orientation is decoded:"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.collections.PathCollection at 0x7f6a917a49d0>"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAEICAYAAABPgw/pAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAlf0lEQVR4nO3df5xddX3n8ddnhglMMDJEIkuGhIQsxiULEpoSaKrFVhoSFxjBChHWH7VQttqti52aSLaEFRtsVop9rJqiS/1BAA2GaZBopKXUXWxSwGEMESIBNcmEQvgximQqk8mnf5xzh3PvnHPvmZlzf5w77+fjkUfu/Zxz7/3MuXc+873f8z3fr7k7IiKSfy31TkBERLKhgi4i0iRU0EVEmoQKuohIk1BBFxFpEiroIiJNQgVdmp6Z3WBmz5vZv9Y7l1ows0+Y2ZfqnQeAmc02s1+aWWu9c5kMVNAbiJn91MwGw1+AZ83sb83sdfXOqxwzm2NmbmZHZPy8t5jZLjM7bGYfmMDzzAI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1ojnTJSsq6CJV1L10Pm2tJRcWtRrdS+eP3E87wZfWJpVKVNBFqq10rtyS+91L59PeVrzgRXtba1HR7+ntp/uuvqJ+9u67+lTUpYgKukgVrdu6i6HDxRV86LAX9Y93Lexk7cWn0dnRjgGdHe2svfi0olEu19+zs+jiJYChYef6e3ZWNX/JFw1bFKmitP3jlcayx00vUC4uk5MKukgVzexopz+mqFdjAQyNZRd1uYhUUZr+8TTa2+J/VQtxjWUXUAtdpKrSzvVSqXVdPE6GUfFyY9nVSp88VNBFqizNXC+Vpgc4OHQ49rGFuMayC6jLRaTusrhS9JiEFZCS4tKcVNBF6ix
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plt.title(\"Parameter 1 of CP vs. orientation\")\n",
"plt.scatter(theta_deg[::step], param_1)"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"data_without_features = decoding.remove_feature(data_pca[::step].to_numpy(), pd.DataFrame(param_1))"
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {
"collapsed": false,
"pycharm": {
"is_executing": true,
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAQMAAAEGCAYAAABhHPB4AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAoHElEQVR4nO3deXxU1f3/8dcnISEkhDURgkkIYQmiUNCg4opsEgTqQlXcitVSAal8wa/bT1qtC9W6ValW3BeqgiiiiF8Rgk5YDYisChZZoihhCRCSQJbz++NOyEzWSTIzd2byeT4eeXTu3DtzP1jy5txzzz1HjDEopVSY3QUopQKDhoFSCtAwUEo5aRgopQANA6WUUzO7C3AVFxdnUlJS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J2jJoKg5sd9/e/4M9dVTicDjo2bMns2bNAtAgsJHPwkBEokRkjYh8KyKbReRBX51LeaDH8Erbl9pThwvXPoJRo0bZXU6T58vLhOPAIGNMvohEAFkissgYs8qH51Q16X8LRLWGnGxIOhvOuNLWcrSzMPD4LAyMNdNqvnMzwvkTOLOvNkW9x1g/NsvNzeWyyy7TIAgwPu0zEJFwEVkP7AMWG2NWV3PMeBHJFpHs3NxcX5ajAkR8fDwvvfSSBkGA8ctU6SLSBvgQmGyM2VTTcTpVemhzOBwcP36cIUOG2F1Kk1XbVOl+ubVojMkTkWXAcKDGMFChq7yPoEePHmRnZxMWpjeyAo3HYSAi5wEprp8xxrxZy/HxQLEzCFoAQ4DHGl6qClaunYULFy7UIAhQHoWBiLwFdAXWA6XOtw1QYxgACcA
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Decoding... "
]
}
],
"source": [
"param_2 = decoding.cohomological_parameterization(\n",
" pd.DataFrame(data_without_features)).to_numpy()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.collections.PathCollection at 0x7f9a93ba2d70>"
]
},
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiMAAAGxCAYAAACwbLZkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAABBmUlEQVR4nO3de1yUdf7//+eAHFVGUTmlIrWlGGaJaVBoh9XEQ1ltaW6aWe3qaq1abdrJQ7Zsdvh1VKtNW8tvuZX6SSWTNlNb7WN5Wk07imIKkZiAB87v3x9+mGVggBkCLhge99uN2815z+s91/uauWSeXIf3ZTPGGAEAAFjEx+oBAACAlo0wAgAALEUYAQAAliKMAAAASxFGAACApQgjAADAUoQRAABgKcIIAACwFGEEAABYijCCBvXGG2/IZrM5flq1aqXOnTvrjjvu0JEjR6weXoM6evSoZs+erV27djXaMr/99lvdf//9io+PV7t27RQaGqrLL79c7733Xr0va+fOnRo4cKDsdrtsNpuee+65Guvz8vL0xBNPqG/fvgoJCVFAQIC6deumCRMmaMeOHY66lrrNdOvWTePHj2/QZWzZskWzZ8/WiRMn6vwaqampmj17tsvnGmMd4J1aWT0AtAxLlixRjx49dObMGW3atEkpKSnauHGj9uzZo9atW1s9vAZx9OhRzZkzR926ddPFF1/cKMtcv3691q5dq7Fjx+rSSy9VSUmJli9frptvvllz5szRY489Vm/LmjBhgk6dOqV33nlH7du3V7du3aqt/eGHHzR48GBlZ2dr4sSJmjNnjtq0aaODBw/qn//8p+Lj43XixAnZ7XZHn5a2zaxcuVIhISENuowtW7Zozpw5Gj9+vNq1a1en10hNTdXLL7/sMpA0xjrAOxFG0Cji4uLUt29fSdJVV12l0tJSPf7441q1apV+//vf/6rXPnPmjIKCgupjmM3CmTNnFBgYKJvNVuW50aNHa/LkyU7PJScn69ixY3ryySf14IMPKiAgoF7GsXfvXt19991KTk6usa60tFQ33HCDjh07pq1btyouLs7x3MCBA3X77bfrww8/lJ+fn1O/htxmmpLy7feSSy6xeii/mjesA6zBYRpY4rLLLpMkHTp0SJI0Z84c9e/fX6GhoQoJCVGfPn30+uuvq/J9HLt166bhw4drxYoVuuSSSxQYGKg5c+ZIkl5++WUNGDBAYWFhat26tXr16qX58+eruLjY6TWuvPJKxcXFaevWrUpMTFRQUJC6deumJUuWSJLWrl2rPn36KDg4WL169dK6deuqjP+7777TmDFjFBYWpoCAAMXGxurll192PP/pp5/q0ksvlSTdcccdjkMOFf+a/PLLL3XdddcpNDRUgYGBuuSSS/TPf/7TaTnlhyzWr1+vCRMmqFOnTgoODlZhYaHL97Vjx44uQ0q/fv10+vRpHT9+3GW/ivbu3avrr79e7du3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mAPXToUE2dOlWtW7fW119/rSeffFLbtm3TJ598Ikl69NFHderUKb333nvaunWrY9nlr1XZzz//rMTERBUVFenxxx9Xt27dtGbNGt1///364YcftGDBAqf6l19+WT169HCcf/Too49q6NChSk9PdzqEBy9kgAa0ZMkSI8l8/vnnpri42OTn55s1a9aYTp06mbZt25qsrKwqfUpLS01xcbGZO3eu6dChgykrK3M8Fx0dbXx9fc0333xT43LLX2Pp0qXG19fXHD9+3PHcwIEDjSTz5ZdfOtpycnKMr6+vCQoKMkeOHHG079q1y0gyL7zwgqPt2muvNZ07dza5ublOy5wyZYoJDAx0LOuLL74wksySJUuqjK9Hjx7mkksuMcXFxU7tw4cPN5GRkaa0tNTp/Rs3blyN61uT1157zUgyzz//fK21o0ePNgEBASYjI8OpPTk52QQHB5sTJ0442iSZyZMn1/qaQ4YMMZJMQUGBW+OtyzZT7j//+Y+RZF599VWn9n79+pn4+HjH4+HDh5uLL77YrfHUZt26dUaSmT9/vlP78uXLq4ylpu03Ojra3H777Y7HKSkpxsfHx3zxxRdOde+9956RZFJTUx1tkkx4eLjJy8tztGVlZRkfHx+TkpLiaHvqqaeMJJOenl7jOpWVlZni4mKzceNGI8ns3r3b8dzkyZNNdV8dlddhxowZRpL53//9X6e6SZMmGZvN5ngf0tPTjSTTq1cvU1JS4qjbtm2bkWTefvvtGseL5o/DNGgUl112mfz8/NS2bVsNHz5cERER+vDDDxUeHi5J+uSTT/Tb3/5Wdrtdvr6+8vPz02OPPaacnBxlZ2c7vdZFF12kCy64oMoydu7cqeuuu04dOnRwvMa4ceNUWlqqb7/91qk2MjJS8fHxjsehoaEKCwvTxRdf7NgDIkmxsbGS/ntooKCgQP/61790ww03KDg4WCUlJY6foUOHqqCgoNbdyt9//72+/vprx3kPlV8jMzNT33zzjVOfm266qcbXrM6HH36oyZMn63e/+53uueeeWus/+eQTXXPNNerSpYtT+/jx43X69Gmnv4YbWm3bjCu9evVSfHy845CbJO3fv1/btm3ThAkTHG39+vXT7t279ac//UkfffSR8vLy6jzO8r0Glfdm3XzzzWrdurX+9a9/ObVXt/1WtmbNGsXFxeniiy922kauvfZap8Mr5a666iq1bdvW8Tg8PFxhYWHVHtaq7MCBAxozZowiIiIc/38GDhwo6ex7WBeffPKJevbsqX79+jm1jx8/XsYYx3tXbtiwYfL19XU8vuiiiyRVf2gO3oPDNGgUS5cuVWxsrFq1aqXw8HCn3brbtm3T4MGDdeWVV+q1115T586d5e/vr1WrVumJJ57QmTNnnF7L1S7hjIwMJSUlqXv37nr++efVrVs3BQYGatu2bZo8eXKV1wgNDa3yGv7+/lXa/f39JZ0NIZKUk5OjkpISvfjii3rxxRddruuxY8dqfC9
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.title(\"Parameter 2 of CP vs. orientation\")\n",
"plt.scatter(theta_deg[::step], param_2)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.collections.PathCollection at 0x7f9a93b5f790>"
]
},
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiMAAAGxCAYAAACwbLZkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAABARElEQVR4nO3deXxU1cH/8W8I2QhkJIEsbCGlLtDIFkQTRSqUJQJKrRX1UUTUFgr6INZWxMqiLZVaH7AKaN2KUqEuUKmIphVwAR62oCBoVaKhkJiHUJLIEiA5vz/4ZcokM0lmMsmZ5fN+veb1Infucs7ce+Z+OffeMxHGGCMAAABLWtkuAAAACG+EEQAAYBVhBAAAWEUYAQAAVhFGAACAVYQRAABgFWEEAABYRRgBAABWEUYAAIBVhBEEnRdeeEERERHOV+vWrdWlSxfdeuutOnDggO3iNauDBw9q9uzZ2rlzZ4tt85///Kd+/vOfKysrS+ecc44SExN16aWX6tVXX/X7tvLz8zV48GA5HA5FRERowYIF9c5fXl6uX//61xowYIASEhIUExOj7t27a+LEidqxY4dzvlA+Zmrqtm3bNttFAXzW2nYBAF89//zzuuCCC3T8+HG99957mjdvnjZs2KBdu3YpPj7edvGaxcGDBzVnzhx1795dffv2bZFtvvPOO3rzzTd1880366KLLtLp06e1YsUK/fjHP9acOXP04IMP+m1bEydO1NGjR7V8+XK1b99e3bt39zjvl19+qeHDh6ukpESTJk3SnDlz1LZtW3311Vf6y1/+oqysLB05ckQOh8O5TDgeM0AwIIwgaGVmZmrAgAGSpCuuuEJVVVV66KGHtGrVKv3Xf/1Xk9Z9/PhxxcXF+aOYQeH48eOKjY1VREREnfeuv/56TZkyxeW93NxcHTp0SI888oh++ctfKiYmxi/l2L17t+644w7l5ubWO19VVZV++MMf6tChQ9q0aZMyMzOd7w0ePFi33HKL3nrrLUVFRbks15zHDADfcZkGIeOSSy6RJH399deSpDlz5ujiiy9WYmKiEhIS1L9/fz377LOq/duQ3bt31+jRo/X666+rX79+io2N1Zw5cyRJTz75pC6//HIlJycrPj5eF154oebPn69Tp065rOP73/++MjMztWnTJuXk5CguLk7du3fX888/L0l688031b9/f7Vp00YXXnih1q5dW6f8n3/+uW688UYlJycrJiZGPXv21JNPPul8f/369broooskSbfeeqvzksPs2bOd82zbtk1XXXWVEhMTFRsbq379+ukvf/mLy3ZquvXfeecdTZw4UR07dlSbNm1UWVnp9nPt0KGD25AycOBAHTt2TIcPH3a73Nl2796tq6++Wu3bt1dsbKz69u2rP/3pT3XKdPr0aS1evNhZN09WrVqlXbt2acaMGS5B5Gy5ublq06ZNveWqfczUdurUKSUnJ+vmm2+u896RI0cUFxen6dOnS5Kqq6v18MMP6/zzz1dcXJzOOecc9e7dWwsXLqy3DJ5ERERo6tSpeuqpp3TeeecpJiZGvXr10vLly93OX1FRocmTJ6tDhw5KSkrSNddco4MHD7rMs2LFCg0fPlxpaWmKi4tTz549dd999+no0aMu8+3bt0/XX3+9OnXqpJiYGKWkpGjo0KF1Lg+uWLFC2dnZio+PV9u2bTVixAjl5+f7VF+EN3pGEDK++OILSVLHjh0lSV999ZV++tOfqlu3bpKkzZs3684779SBAwfqXFrYsWOH9u7dqwceeEAZGRnOLvsvv/xSN954ozIyMhQdHa2PPvpIv/71r/Xpp5/queeec1lHcXGxbr31Vv3iF79Qly5d9Ic//EETJ07U/v379eqrr+r++++Xw+HQ3LlzNXbsWO3bt0+dOnWSJO3Zs0c5OTnq1q2bfv/73ys1NVVvv/227rrrLh06dEizZs1S//799fzzz+vWW2/VAw88oFGjRkmSunTpIklat26dRo4cqYsvvlhLliyRw+HQ8uXLNW7cOB07dkwTJkxwKe/EiRM1atQovfjiizp69GidXoSGrFu3Th07dlRycnK983322WfKyclRcnKyHn/8cSUlJemll17ShAkT9M033+gXv/iFRo0apU2bNik7O1vXXnut7rnnnnrX+c4770iSxo4d61WZa6t9zNQWFRWlm266SUuWLNGTTz6phIQE53svv/yyTpw4oVtvvVWSNH/+fM2ePVsPPPCALr/8cp06dUqffvqpjhw54nP53njjDa1bt05z585VfHy8Fi1apBtuuEGtW7fWtdde6zLv7bffrlGjRunPf/6z9u/fr3vvvVc33XST3n33Xec8n3/+ua688kpNmzZN8fHx+vTTT/XII49oy5YtLvNdeeWVqqqq0vz589WtWzcdOnRIGzdudKnLb37zGz3wwAPO4/HkyZP63e9+p0GDBmnLli3q1auXz/VGGDJAkHn++eeNJLN582Zz6tQpU1FRYf72t7+Zjh07mnbt2pni4uI6y1RVVZlTp06ZuXPnmqSkJFNdXe18Lz093URGRprPPvus3u3WrGPp0qUmMjLSHD582Pne4MGDjSSzbds257TS0lITGRlp4uLizIEDB5zTd+7caSSZxx9/3DltxIgRpkuXLqasrMxlm1OnTjWxsbHObW3dutVIMs8//3yd8l1wwQWmX79+5tSpUy7TR48ebdLS0kxVVZXL5zd+/Ph661ufP/7xj0aSWbhwYYPzXn/99SYmJsYU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U1FSP02p/bklJSS5/19xUXHOcfvvttxo0aJD+93//Vw8//LDWr1+vrVu36vXXX3eZLyIiQv/4xz80YsQIzZ8/X/3791fHjh111113qaKiQtJ/jreLLrqozvG2YsWKBo9XoDbuGUHQ6tmzp/PJiNqWL1+uqKgo/e1vf1NsbKxz+qpVq9zO7+6kumrVKh09elSvv/660tPTndP9PcZH+/b
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.title(\"Parameter 2 of CP vs. phase\")\n",
"plt.scatter(phi_deg[::step], param_2)"
]
2 years ago
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.10.5 64-bit",
"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.10.5"
},
"vscode": {
"interpreter": {
"hash": "e7370f93d1d0cde622a1f8e1c04877d8463912d04d973331ad4851f04de6915a"
}
}
},
"nbformat": 4,
"nbformat_minor": 0
}