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.

981 lines
243 KiB

{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"# Decoding population activity"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"**Imports**"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"%matplotlib inline\n",
"from sym_model import Population, sigmoid\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",
"\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": 2,
"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": 3,
"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": 4,
"metadata": {},
"outputs": [],
"source": [
"population = Population.random(N)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"phi_deg, theta_deg = grid[:, 1] * 180 / np.pi, grid[:, 0] * 180 / np.pi"
]
},
{
"cell_type": "code",
"execution_count": 6,
"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": 7,
"metadata": {},
"outputs": [],
"source": [
"res = np.abs(population.response_func(grid[:, 1], grid[:, 0]).swapaxes(0, 1)) * 10"
]
},
{
"cell_type": "code",
"execution_count": 8,
"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": 9,
"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+Dj4cLwnmfeP+B92nN457UcfZN2BX4lPzmajk55D74vM4C+m30JPqx4KnGRQ/jvKv4naJ3mWip9Q/sDmeJkaMc+0lzzB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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": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"res.shape"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"res_reshaped = res.reshape((n_phi, n_theta, -1))"
]
},
{
"cell_type": "code",
"execution_count": 11,
"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": 11,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXgAAAD4CAYAAADmWv3KAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAXuUlEQVR4nO3de3BcZ3nH8e+zq9XdsmR77diWHedGAqaJE5SENAMzOEACpNCZMp1AQwe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bSCUn/wlWNdcB8OqAevAiUtmqOuDXtzWcsr22JkFTXQ29gwp4EalsVRvw+18bpH2agAdoa0zx2uDYIlckIhKtqgz40fEsh/uHaZ/yBWtBa2OtevAiUvGqMuAP9Q3hDhtO14NvSNE7OEY2q18YFJHKVZUBX5giedoefFMt41nn2IAueBKRylWlAT8IcPox+IYUAAfyHwQiIpWoSgN+iGTCWLu8ftr9rU21E68TEalUVRvwZ7TUU5Oc/vQnevC9CngRqVxVGfAHTjMHvqAulaQhlZwYyhERqURVGfCH+odYd5rhmYK2xpTG4EWkogULeDPbYGYPmtluM3vGzG4M1dZcZLPO4b5hzlh++h485ObCawxeRCpZyB78OPApd3898GbgBjN7Q8D2SvLqwChjGWddawk9+N4h3DUXXkQqU7CAd/dD7v54/vFxYDewPlR7pTrcl1sl8oyWmQO+tbGWwdGMliwQkYq1KGPwZrYJuBh4dJp928ys08w6u7u7g9dysC837LJ2liGatkbNhReRyhY84M2sGbgXuMnd+6fud/f
"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": 12,
"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": 13,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAEVCAYAAADJrK/3AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBI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L2vfYBMr7C8InKBrS/NpbVPa9Qq/RzrmTlRez1CXUkOLVqjTglpn6gPdAywoiKfTG/kp1pXkkO7P6C93yqtDI0G6fCPzpiowWr+0Dbq1JC2iXpfu5/f7eng9eP9nDZDswdYiXrC7v1WKl3MNuIjbGlpLs09wxhjEhWWilFaDs+bCBlu+I8XGB6bAGBdffGM960rsTpVWvtGdJiSShvRJOr60lwGRoOcHB6nJO/UDkflHmmZqHsGRxkem+DWy1bw9rNrZuxIBKtGDeEhemUJilApZwwExtl2rI+n7fk9GstmqVHb25p6hzVRu1xaJupwM8aGhpI5T2SpKcpBBFq0Q1GlgX994iDfffYoAMvL88jJ8s5434bSN4borZ/lV6dKvrRM1O1+K1HXFPnmvG9WhofqQp8O0VNpoalnmMayXO68cQO19q/FmYQT9evH+9lQX0xtcQ4enQLVldKyM7HdrlFXFc6dqAHqS3SInkoPHX7rlPB19cWU52fPet+cLC9Linzc9cwRLv7mU/zLEwcTFKWar7RM1G39ATK9QlmU7W51JTkc10St0kC7P0B1lBUUgLs+sIl/+tN11BT5OGifHKbcJy0TdYc/QGWBL+qfcXUlObT1jzCuY6lVCgtOhOgaGKU6iia/sLW1RfzJOXUsr8ibbDJU7jNnohaRehF5SkT2ishuEbktEYE
"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": 14,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEVCAYAAADuAi4fAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6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2zTzxcHU2OmSL6ESv1cjJ9Hx+i0sl5ngGR5NzSUjNpbi03OLtW/l50DHIhx6tfBnSKZCo0Ga4uehLRZr1lZcr9p7OYsexDPaezmJfUibH0/Mt3l4EWvk1oUdrXwa2b87ADgF0DvJGRBow6trRiV67JKUUsSfO8/WeM2yIS+NYWh4Awb4edG3pw5BOAXRq4U1YgBd+TVzxNtfiXZ2cyC0y1e5zC0s5l11IXEoOccm5HE3OYe6GRGb+moCXmzMDOzTnmm5B3Nyrpa7xaw2qpKycbYkZ/HDgHOsOniM5uwiA1k2b0LO1H/dEt6V9gBcBPu4EeLvT3NsNN2cnisvKKS41Pc5lF3IyPZ/j6XkcS8sj5vh5fjiQDECAtxvXdAvizsg2RIc2w8nJNpK+Tc4ZGx0drXRbprFSc4pYvTOJVTGnSEjNw8PViYHtm3N550Au7xxI+wCvOtVccgpL2JyQzoajqWyIS+VURgFNXJ25qWdL7uvblr5hzRqsZiQisUqp6AbZ+SXocm2clJxClm87ybJtJ0nNKaKJqzNXdA7kuu5BDOkUSKCPe532fyojny2J6WyKT+PHg8nkF5fR1r8Jd/RpzfB+IbRq2qSeXknVLlWudaLX/uRYWh4z1sfz5a7TlJYrokObcW90W27u1RIv94Y5AVRKsftUJqtiTvH1nrPkFpXSJciHqVd15KaeLXGu51qRTvSNx/7TWczfmMi3+85SUqa
"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": 15,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAATQAAAEVCAYAAABucRkMAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb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XWqyznjbaG+KDRbitv0yLqjv1az0a/ZKiu2yjFrWUNhHLkEAkIbLGOfc9CW7DY9dsc9DkYl7bCA/37R/4HEWbMUghZU8LXF1oK0XTiFI/pBwoygTeLHHNhGMI3B1RnDumC36PNqtk5mAh6h0pwNM6YnLVYCXg2V5uz4AdfdJlebLa5VG9ysB4u9+VVGNLau8knr6jDoeZLVoSKx1Z3Rhd5AKBSKQF46BmXLVllxqTfkQjFmI6vomZZcPF4NrUZBK80AIwFVwQWDd2mw5zyyHIJWWfpfKskPoNhVejuB3o0Gu1+jVRdXUdXY/YpeEeOSbG3Ihob2Rsl4reBLa5s8338U23cUhaPMHXnmsSZgRKNoBhNHONuMtsnw4zTKOU+ywuMer/FFgYrBOEM2ysluFjE8I8vwg5xmK6O6aKiuKPUVT7Fd8YaLezy9+RrPDK7x5vIaT+XXedSO2baWgRTkEu1Wa8t+aHjVCy+4Lb7aXuFL1SN86eAyX13s7ScWwFIImnHQu67kQygOAsWeww5bZFyjzsWcS+eQcUN2kFNYAc2wrSEbgxsKrmfxPUMocupCqTJFMz06IhZAvCCtYBqhbMBWKfVpXmj3Z+rOOsGtdfi6QOdlCCp4FVq1eAwNlhah1UCQgFchoLTqaVVpsQRii80Fgwvph+o8shSCZhvYfMFhq4AdOeyoQYYVjMYxbgnQusEcjDBA2XqycYH
"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",
" ax[i].imshow(res_reshaped[:, :, i], cmap='viridis', extent=[0, 180, 0, 360])"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.image.AxesImage at 0x7fefe9397f40>"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw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Jq9W+Q60JfVZWZXUTnJekw1K1iohWpqnaR3J6NNwH4BwDPQt0qJlqRQw43A/gayTI6QXvIzL5P8hdQt4qJVaSq+g067duunT+HPrtVyPjQJ8cSouBIiIIjIQqOhCg4EqLgSIiCIyEKjoQoOBKi4EiIgiMhCo6EKDgSouBIiIIjIQqOhCg4EqLgSIiCIyEKjoQoOBLSz33HyyR/RfL72WN1q5hg/exx7gVwwj1Wt4oJVrTpwB4A7wPwJTd9FzpdKpD9+09rumUy0orucT4P4BPoumVWsW4VMp6KXDv+fgBnzOzxyArU5mQ8Fbl2/A4AHyD5XgB1AFtJfh1ZtwozO/3nulWY2f0A7geArdy5Nr1SZcOtuscxs0+b2R4z2wfgbgA/NrMPQ90qJtogn+McBXCI5EkAh7LHMiH66qxuZj9Bp7GSulVMOH1yLCEKjoQoOBKi4EiIgiMhCo6EKDgSouBIiIIjIQqOhCg4EqLgSIiCIyEKjoQoOBKi4EiIgiMhCo6EKDgSouBIiIIjIYWuciD5OwDzAFoAmmZ2gOROAP8JYB+A3wH4kJldWJ/NlFHTzx7n78xsv5kdyB6rW8UEG+SlSt0qJljR4BiA/yX5OMkj2Zy6VUywoldy3mFmp0i+AcAjJJ8tuoIsaEcAoI7NgU2UUVRoj2Nmp7J/zwD4LoCDyLpVAMBq3SrM7ICZHahiam22WjZckf440yRnro4B/COA30LdKiZakZeqmwB8l+TV5b9hZj8keQzAQyQ/BuD3AD64fpspo2bV4JjZiwDe2mNe3SommD45lhAFR0I
"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": 20,
"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": 21,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"from sklearn.decomposition import PCA\n",
"import seaborn as sns"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
"text/plain": [
"<AxesSubplot:>"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAWYAAAEFCAYAAADQRk3iAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAA5EklEQVR4nO2deZxU1bHHv8W+7zuoCKKIC6iAu6A+I5L4FBP3uEWjxhgTE/NMor68aDQaE5cYlYfGqIlxRRQVt6e4b6AisgjihiOIrLINwszU++PeCe146k53z53pbqa+fO7n05y6dc/pZU7fPlW/U6KqOI7jOMVDk0IPwHEcx/k6PjE7juMUGT4xO47jFBk+MTuO4xQZPjE7juMUGT4xO47jFBk+MTuO4+SJiNwmIl+IyCzDLiLyFxFZICIzRWT3bK7rE7PjOE7+3A6MSbAfBgyKjzOBm7O5aOoTs4icIiLvx8cpaV/fcRynWFDVF4AVCaccAdypEa8BnUSkd23XbZbWAAFEpAvwW2A4oMCbIjJZVVem2Y/jOE6J0Bf4NOP/ZXHb4iSnvCdmERkB/A0YCTQF3gDuAZ5W1RXxOU8T3ebfnXStTcs+NHXhG//ym2B7xytfNK/XqlkL07ahYmPSUIoWSbDd1ONA03bOF1NN24TuYb/PEz4Vlyy2r2dxcM9dTdvMNZ+YtlVfrQu2V2mV6TOl4z6m7ah1003b9h36BttfmHCk6bPk4sdN23Zz5pg2i/YtWpu2j4/uH2zvetfcnPtJIulvZ2P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69QqnKa4aoOdV97/bTvAt2f3HYLtry+1fX7f25Y
"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",
2 years ago
"execution_count": 52,
"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>1.152136</td>\n",
2 years ago
" <td>6.882893</td>\n",
" <td>-1.545938</td>\n",
" <td>-0.027471</td>\n",
" <td>-1.348491</td>\n",
" <td>-0.067572</td>\n",
" <td>3.253269</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1.081195</td>\n",
" <td>6.691970</td>\n",
2 years ago
" <td>-1.446044</td>\n",
" <td>-0.080450</td>\n",
" <td>-1.327843</td>\n",
" <td>-0.204249</td>\n",
" <td>3.526015</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>0.996579</td>\n",
" <td>6.447147</td>\n",
2 years ago
" <td>-1.338009</td>\n",
" <td>-0.133996</td>\n",
" <td>-1.298363</td>\n",
" <td>-0.338896</td>\n",
" <td>3.770720</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>0.937118</td>\n",
2 years ago
" <td>6.268197</td>\n",
" <td>-1.259541</td>\n",
" <td>-0.170523</td>\n",
" <td>-1.273480</td>\n",
" <td>-0.424933</td>\n",
" <td>3.869237</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>0.938863</td>\n",
2 years ago
" <td>6.362412</td>\n",
" <td>-1.261052</td>\n",
" <td>-0.188472</td>\n",
" <td>-1.318064</td>\n",
" <td>-0.425958</td>\n",
" <td>3.715137</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
2 years ago
" PC1 PC2 PC3 PC4 PC5 PC6 PC7\n",
"0 1.152136 6.882893 -1.545938 -0.027471 -1.348491 -0.067572 3.253269\n",
"1 1.081195 6.691970 -1.446044 -0.080450 -1.327843 -0.204249 3.526015\n",
"2 0.996579 6.447147 -1.338009 -0.133996 -1.298363 -0.338896 3.770720\n",
"3 0.937118 6.268197 -1.259541 -0.170523 -1.273480 -0.424933 3.869237\n",
"4 0.938863 6.362412 -1.261052 -0.188472 -1.318064 -0.425958 3.715137"
]
},
2 years ago
"execution_count": 52,
"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",
2 years ago
"execution_count": 53,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAFAAAAAVCAYAAADRhGlyAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAEXElEQVRYCe2Y63EUMQyAlxsKOEIFhA4CVEDSAdABp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PkOPEImx13WjIswsBavM2O+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)"
]
},
2 years ago
"execution_count": 53,
"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": 25,
"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": 26,
"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": 27,
"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": 37,
"metadata": {},
"outputs": [],
"source": [
"step = 5"
]
},
{
"cell_type": "code",
2 years ago
"execution_count": 54,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAasAAAGwCAYAAAAXAEo1AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAABJMElEQVR4nO3deXiTVf7+8Xe67yk7LZQdRLayVcSFpUUEFxZ1xm0UHZwZR8bRQVRc5ufydazjNo7DuCvKjMqigoqyyiY6KmsDqIgCFqVQKNCNkrZpfn9EQkPTkpYkT5b7dV25JCcnyScVcvc8z3nOMdntdjsiIiIBLMLoAkRERE5FYSUiIgFPYSUiIgFPYSUiIgFPYSUiIgFPYSUiIgFPYSUiIgEvyugCTkdNTQ179+4lOTkZk8lkdDkiItJIdrud0tJS0tPTiYiof/wU1GG1d+9eMjIyjC5DRERO0549e2jfvn29jwd1WCUnJwOOD5mSkmJwNSIi4omtW7dyySWXcPjwYTIzM8nLy3N+n9cnqMPq+KG/lJQUhZWISJCIjIzEZrORlZXFO++8Q8eOHU95Kieow0pERILPkCFDWLVqFZ07d27wPFVtmg0oIiI+Z7FYWL9+vfP+gAEDSE1N9fj5GlmJiIhPWSwWsrOzqa6uZvXq1WRmZjb6NTSyEhERnzkeVEVFRfTo0YOOHTs26XUUViIi4hO1gyorK4ulS5c26tBfbQorERHxOm8GFSisRETEy7Zv3+7VoAJNsBARES/LyMigf//+lJSUeCWoQGElIiJelpCQwAcffEBlZaVXggp0GFBERLzAYrHw6KOPYrfbAUdgeSuoQCMrERE5TbUnUzRr1ow//vGPXn8PjaxERKTJTp71d/XVV/vkfTSy8pDdbuez74vYlH+Yrq2TuKBXG6IjlfUiEr68PT29IQorD9jtdv709iY+shQ42zLbm3nrd2eTGKsfoY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GFDCXlrsMVZeG0mXZiZ2HrZz3syj7Dxsp0uzSFauWKGgEkMcPHhQQVWLwkrEFEEHcwSzJsS7NM+6wkyHjh0NKkrCXcuWLbnrrrsUVL9QWIk060h+0kCuX1Dh0nz9hzby8/MNKkoE7rrrLtauXRv2QQUKKxEKCgoY+e9dvxz6i2DtZDNd2qSwc18xI0eOdMwSFPEDi8XCuHHjKCkpcbZpco+DwkrCXosWLejTL5MuXbqw8sstnPt8ASu/2kKXLl3o06cPLVq0MLpECQPHJ1N8+OGHTJ8+3ehyAo7JbrfbjS6iqUpKSjCbzRQXF5OSkmJ0ORLEKisr68z6KygooEWLFvrNVnwunGf9efo9rqnrIjgOtZw860+zAMUfwjmoGkOHAUVEDKKg8pzCSkTEADU1NVx99dUKKg8prEREDBAREcHcuXO55JJLFFQe0AQLERFfqjoG0XHOu1arldjYWAMLCiyefo9rZCUi4gs7lsO/h8Df2sCzA+DrD7BYLPTo0YMVK1YYXV3Q0chKRMTbin6A584G24ktZiz77WTPiaTo8BGGDx/OypUrMZlMBhYZGDR1XUTEKJY5JwWVjew3jlJUYScrK4sFCxYoqBpJhwFFRLytvqDq3kaTKZpIYSUi4m29LwNMrkGVHsHSd15XUDWRwkpExNvS+sH4Gfxrg8kRVO1jWPrGk6T2G2N0ZUFLYSUi4gsDfsNzqwu4b+otLN24m9RRfzG6oqCmsBIR8aL8/HxqamoAiI5P4pGn/k1qK60zeboUViIiXpKXl8fAgQO55ZZbnIEl3qGwEhHxgry8PHJycigqKmLjxo0cPXrU6JJCisJKROQ01Q6q44vSJiUlGV1WSFFYiYicBndBpenp3qewEhFpIgWV/yisRES
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"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",
2 years ago
"execution_count": 55,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
"text/plain": [
2 years ago
"<matplotlib.collections.PathCollection at 0x7fefdadbe350>"
]
},
2 years ago
"execution_count": 55,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAEICAYAAABPgw/pAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAxlElEQVR4nO2df/geVXXgPyfffAlffkhQUhfDr+iDUNBaIAItWwWq8qsusTy7Bd21uu1SWunW3ZY1tj5qa63p0m61j7aUutRaV6kWRVqoKRV53MUiJBXEgCAFgQQKAQkKifBNcvaPmTdMJjPv3Jl3znfmzns+z5Mn73feee+cuXPumXvPPfdcUVUcx3Gc+FnUtQCO4zhOO7hBdxzHGQhu0B3HcQaCG3THcZyB4AbdcRxnILhBdxzHGQhu0B2nBBH5XRF5XET+tWtZ2kZEjhARFZHFXcvitIcb9AEgIt8VkW0i8rSIPCoifyEi+3Ut1zisDIqIXC4id4vIThF52wTlHAr8OnCMqv6bknNeICIfFpEH07q/N/37oPT76J6LEzdu0IfDG1V1P+B44NXAe+r8WBKi0YcxL4LbgV8B/nnCSxwOPKGqj5Vcfy/gy8CxwJnAC4CfBJ4ATsycOtFzcZw6RNOAnTBUdRPw98ArRORAEfk7EdksIk+mnw8ZnSsiN4rIB0XkJmAr8FIRebuI3CUiPxCR+0TklzLnnyoiG0Xkf4jIYyLyiIisEpGzReQeEfmeiPxm5vxFIrJaRP5FRJ4Qkc+KyAvTr7+a/r8l7cH+RPqb/5xe/0kRWSsih2fKUxF5h4h8B/hOyf1/TFW/DPywqq5E5AAR+WRaPw+IyHtSmV8HXA+8JJXtEwU/fytwGPAmVb1TVXeq6mOq+gFVvW7ccymQY7WI/E3u2EdE5I/Tz29Ln8UPRO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VZc2fOjL2X2bq42UbOMlIheKyDoRWbd58+YWLl2fvlS80w0PbyneAa7seCiuV/UZ0kvQSq/q0oZBL9qerDDjl6perqorVXXlsmXdbDPYl4p3uuElS+dqHQ/F9ao+Q3oJWulVXdow6BvZfd/CQ0h2V+klfan42BjK0PiSM45ibnZmt2NzszNccsZkm+q4XtVnSC9BK72qSxsG/RrgrZJwMvCUqj7SQrkm9KXiY2JIQ+NVxy3nQz/7SpYvnUOA5Uvn+NDPvnLiiSvXq/oM6SVopVd1qcyHLiKfAU4l2SvxUZKNhmcBVPWyNGzxo8CZJGGLb1fVyqxbK1eu1K6Sc3k0Qj1OWXMDmwp6TcuXznHT6tM7kKifuF7VIx8ZAslLsAtDGBMisl5VVxZ+19UGF10adKceK1ZfWzgpIsD9a85ZaHGcAeEvwfqMM+idpc914uElS+cKe+gxDo2dfrHquOVuwFvEl/47lbh/2ImJoUzgN8F76E4lox6UD42dvtOXFZtd4QbdCcKHxk4MjIttnwb9dYPuOE4lsUxeDim2vQlu0J3OiMVITDsxuTGmfQLfJ0WdThjSYqWhE9MS/WmfwHeD7nRCTEZi2onJjdGXFZtd4S4XpxNiMhLTTmxujGmewPceutMJQ8rjMXSm3Y0RE27QB0YsiyrcSMTDtLsxYsJdLgMipmgEX6wUF9PsxogJN+gDIrZFFW4kHKdd3KB3SNtx2D7R6DjTjfvQO8IiDtsnGh1nunGD3hEWcdg+0eg40427XDrCwj3iE40OeEoFK2KoVzfoHWG1WMMnGuNoeFbEFOkUE7HUq7tcArCI7Xb3iA3TniPGUyrYEEu9eg+9Aqs3s7tHbIgpdNNiJOGRTjbEUq9u0CuwNBDuHmmfWBqeVUchtrwrsRBLvQ7O5dK2eyQWA+EkWIVutq1XVkN4d+XZEEu9Dsqge2y3Y9HwLPTKqqPgeVdsiKVeB+VysXCPXHLGUbsNjaGfb2YnwWJ
"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",
2 years ago
"execution_count": 56,
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
"text/plain": [
2 years ago
"<matplotlib.collections.PathCollection at 0x7fefd8911d20>"
]
},
2 years ago
"execution_count": 56,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAEICAYAAABPgw/pAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAhDklEQVR4nO3dfZRcdZ3n8fcnTQeaGIxIYKFJCDAYF4ZHI4FhVGYVQ3CEZlxXIqwPoyKrzI6HmQwgORpXGHCzenDOqBl0GVSeVWzjEI2MDuNZNJFgAjFiJDyYpMNAeIggtJB0vvvHvd1WV25V3e6up1v5vM7p01Xf+lXVt25Vf/vW7/7u76eIwMzMim9SqxMwM7P6cEE3M+sQLuhmZh3CBd3MrEO4oJuZdQgXdDOzDuGCbh1P0pWSnpL0H63OpRkkfVzSV1qdB4CkmZJ+J6mr1bnsCVzQ24ikxyQNpn8AT0j6Z0mvaHVe1UiaJSkk7VXnx71O0gZJuyS9bwKPMwP4G+DoiPhPFdrsJ+laSZvSbb8xvX5Aenuh3peI+PuI+OBEH2c87226rd5SksumiHhFRAxNNB+rzQW9/bw9Il4BnAS8Hlg0ljsrUZj3tUqxuB/4CPDzCT7FYcDTEfFkheefDPwQOAY4E9gP+BPgaeDkkqYTel+apd7/WK1YCvOHv6eJiAHge8AfS3qVpH+RtE3Ss+nlQ4fbSrpb0lWS7gFeBI6Q9H5JD0p6XtIjkj5c0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ZUQcD5wOfFbS5DrnamZmVeQZ5XIysDEiHgGQdCtwDvDLkjYBTJUk4BXAM8DOOudaOP1rBliyYgNbtw9yyLQeFs6bTd+Jva1Oy8w6VJ6C3gtsLrm+BZh
"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",
2 years ago
"execution_count": 57,
"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",
2 years ago
"execution_count": 58,
"metadata": {
"collapsed": false,
"pycharm": {
"is_executing": true,
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAQwAAAEGCAYAAACQF6v1AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAw10lEQVR4nO2dd3yUVfb/3yedEmpo0lWwANKiiIqLiAgIqwI2bLgqSlmToP7WtrvYXUsgNhS+dtHVFQsg6AKLbSlKR0AUESTAUhJaSCPJ+f3xTMpkJj2TyWTO+/Wal3PL8zxnDPOZe8+99xxRVQzDMMpDiL8NMAwjcDDBMAyj3JhgGIZRbkwwDMMoNyYYhmGUmzB/G1BRYmJitFOnTv42wzDqJLt27SIjI4Njx44dVNUWxdsDTjA6derEqlWr/G2GYdQpVJWEhASSkpKIi4sjKSlpp7d+NiUxjCCnuFhMmzatxL4mGIYR5EybNs1NLESkxL4BNyUxDKN6GTduHAAJCQmligXYCMMwghJVZdasWWRmZtKsWTOmTJlSpliACYZhBB35Povx48fz7rvvVuhaEwzDCCKK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w9AnPaptNaTy+HKEkQPcraprRCQaWC0ii1R1c7F+36rqCB/aYRhuZGVlsWHDBhOLSuDLEH17gb2u98dEZAtOzpHigmHUclJTU2mal4oc+R1t3ZNDWUKzZs38bVaFUVUyMjKoX78+CxYsIDIy0sSigtSI01NEOuHE9yyeyAigvyv/6kIR6VbC9ZbIyE+kpqZyds8zmTK
"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_2 = decoding.cohomological_parameterization(\n",
" pd.DataFrame(data_without_features)).to_numpy()"
]
},
{
"cell_type": "code",
2 years ago
"execution_count": 59,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
2 years ago
"<matplotlib.collections.PathCollection at 0x7fefd8815360>"
]
},
2 years ago
"execution_count": 59,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiMAAAGxCAYAAACwbLZkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAABHBElEQVR4nO3deVxU9f4/8NewDiiMArKJwuRNhXAJTINEM68oblnd0rxumZamdd26SYuIWZSVvzb3q3ZdbnpvmTeVVLqaUuLXBTQNs1QUF5ALJIMisszn9weXiWEWZnCYM8vr+XjweMhn3uecz5k5Oi8/55zPkQkhBIiIiIgk4iJ1B4iIiMi5MYwQERGRpBhGiIiISFIMI0RERCQphhEiIiKSFMMIERERSYphhIiIiCTFMEJERESSYhghIiIiSTGMUIv67LPPIJPJND9ubm4ICwvDM888g6tXr0rdvRZ17do1LFy4ECdOnLDaNn/55RfMmzcPsbGxaNOmDfz8/PDQQw/hiy++sPi2cnJy0L9/fygUCshkMnz44YdG61UqFd566y306tULvr6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Pz85GQkIAuXbrgo48+QkREBORyOY4cOYIZM2borMPPz09nHR4eHjrtHh4eAOpCCACUlJSgpqYGn3zyCT755BO9+1pcXGz0vbh+/ToAYN68eZg3b55J6zA0DG7Mnj178Pjjj2PQoEHYvHmz0es66pWUlOjdVn1AKykpMbsf9af
"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",
2 years ago
"execution_count": 60,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
2 years ago
"<matplotlib.collections.PathCollection at 0x7fefd887ce50>"
]
},
2 years ago
"execution_count": 60,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiMAAAGxCAYAAACwbLZkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAABGKklEQVR4nO3de3gU1f0/8PfmtgmBrOS6CZeQoggYARMEE4kUKIFwEWpVLl9EQKkg6BdjvSAKBG1T0fIFq4AiYlGEtBaoVATTchMJ5RYQCFiESBAS8kuQJAJJSHJ+f9Ddstn7ZnbP7s779Tx5HpidnXPOzJyZz54554xGCCFAREREJEmA7AwQERGRujEYISIiIqkYjBAREZFUDEaIiIhIKgYjREREJBWDESIiIpKKwQgRERFJxWCEiIiIpGIwQkRERFIxGCGf8+GHH0Kj0Rj/goKC0L59e0yePBnnz5+XnT23unDhAubPn4/Dhw97LM1///vf+M1vfoPU1FTccsstiIyMxL333otPP/1U8bQKCwvRv39/6HQ6aDQaLF682Ob61dXV+O1vf4vevXsjIiICWq0WnTp1wpQpU3Do0CHjev58zhjKduDAAdlZIXJZkOwMELlq1apV6Nq1K65du4Zdu3YhNzcX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Eyfw8ssvIykpydhkf/r0aYwfPx5JSUkICQnBkSNH8Nvf/hYnT57EBx98YLKNsrIyTJ48Gc8//zzat2+PP/7xj5gyZQrOnTuHTz/9FC+99BJ0Oh0WLFiA0aNH48yZM0hISAAAFBUVIT09HR07dsQf/vAH6PV6bN26FU8//TQqKiowb948pKSkYNWqVZg8eTJefvllDB8+HADQvn17AMD27dsxdOhQ9O3bF8uXL4dOp8O6deswZswYXL16FZMmTTLJ75QpUzB8+HB89NFHuHLlilkrgj3bt29HTEwMYmNjba737bffIj09HbGxsXjrrbcQFRWFjz/+GJMmTcLFixfx/PPPY/jw4SgoKEBaWhoefPBBPPvssza3+eWXXwIARo8e7VSem2t+zjQXHByMCRMmYPny5XjnnXcQERFh/Gzt2rWora3F5MmTAQALFy7E/Pnz8fLLL+O+++7D9evXcfLkSVy+fNnl/H322WfYvn07FixYgPDwcCxduhTjxo1DUFAQHnzwQZN1H3/8cQwfPhyffPIJzp07h+eeew4TJkzAtm3bjOucOnUKw4YNw6xZsxAeHo6TJ0/i9ddfx759+0zWGzZsGBobG7Fw4UJ07NgRFRUV2LNnj0lZfve73+Hll182no/19fV44403kJGRgX379qF79+4ul5tUSBD5mFWrVgkAYu/eveL69euipqZG/P3vfxcxMTGiTZs2oqyszOw7jY2N4vr162LBggUiKipKNDU1GT9LTEwUgYGB4ttvv7WZrmEbq1evFoGBgeLSpUvGz/r37y8AiAMHDhiXVVZWisDAQBEWFibOnz9vXH748GEBQLz11lvGZUOGDBHt27cXVVVVJmnOnDlThIaGGtPav3+/ACBWrVpllr+uXbuKu+66S1y/ft1k+YgRI0R8fLxobGw02X8TJ060WV5bVqxYIQCIJUuW2F137NixQqvVipKSEpPlWVlZolWrVuLy5cvGZQDEjBkz7G5z6NChAoCora11KL+unDMG33zzjQAg3nvvPZPlffr0Eampqcb/jxgxQvTq1cuh/DgCgAgLCzPJW0NDg+jatau49dZbzcr25JNPmnx/4cKFAoAoLS21uP2mpiZx/fp1sXPnTgFAHDlyR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cdH27ZtERgYiEceeQQzZsywuE5SUpLNbURHRwO4cUN84IEHLK5z++23m/zfkUDiZlu3bsXo0aP
"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
}