Projektpraktikum/trackinglosses_photons.ipynb

367 lines
221 KiB
Plaintext
Raw Normal View History

2024-01-19 11:22:15 +01:00
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import uproot\t\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"from mpl_toolkits import mplot3d\n",
"import awkward as ak\n",
"from scipy.optimize import curve_fit\n",
"%matplotlib inline"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"file = uproot.open(\n",
" \"trackinglosses_B_photon_cuts.root\"\n",
")\n",
"\n",
"# selektiere nur elektronen von B->K*ee\n",
"allcolumns = []\n",
"for i in range(11):\n",
" allcolumns.append(file[\"Tree\"+str(i)].arrays())"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<pre>{oneCut_event_id: 1,\n",
" oneCut_lost: False,\n",
" oneCut_rad_length_frac: 0.148,\n",
" oneCut_energy: 1.28e+04,\n",
" noneCut_brem_photons_pe: 1,\n",
" oneCut_brem_photons_pe: [7.42e+03],\n",
" noneCut_brem_vtx_x: 1,\n",
" oneCut_brem_vtx_x: [-3.61],\n",
" noneCut_brem_vtx_z: 1,\n",
" oneCut_brem_vtx_z: [35.6],\n",
" oneCut_photon_length: 1}\n",
"------------------------------------------\n",
"type: {\n",
" oneCut_event_id: int64,\n",
" oneCut_lost: bool,\n",
" oneCut_rad_length_frac: float64,\n",
" oneCut_energy: float64,\n",
" noneCut_brem_photons_pe: int32,\n",
" oneCut_brem_photons_pe: var * float64,\n",
" noneCut_brem_vtx_x: int32,\n",
" oneCut_brem_vtx_x: var * float64,\n",
" noneCut_brem_vtx_z: int32,\n",
" oneCut_brem_vtx_z: var * float64,\n",
" oneCut_photon_length: int64\n",
"}</pre>"
],
"text/plain": [
"<Record {oneCut_event_id: 1, ...} type='{oneCut_event_id: int64, oneCut_los...'>"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"allcolumns[1][1]"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"def cutdict():\n",
" basedict = {\n",
"\t\t\"0\": {},\n",
"\t\t\"1\": {},\n",
"\t\t\"2\": {},\n",
"\t\t\"3\": {},\n",
"\t\t\"4\": {},\n",
"\t\t\"5\": {},\n",
"\t\t\"6\": {},\n",
"\t\t\"7\": {},\n",
"\t\t\"8\": {},\n",
"\t\t\"9\": {},\n",
"\t\t\"10\": {},\n",
"\t}\n",
" \n",
" basedict[\"0\"] = \"no\"\n",
" basedict[\"1\"] = \"one\"\n",
" basedict[\"2\"] = \"two\"\n",
" basedict[\"3\"] = \"three\"\n",
" basedict[\"4\"] = \"four\"\n",
" basedict[\"5\"] = \"five\"\n",
" basedict[\"6\"] = \"six\"\n",
" basedict[\"7\"] = \"seven\"\n",
" basedict[\"8\"] = \"eight\"\n",
" basedict[\"9\"] = \"nine\"\n",
" basedict[\"10\"] = \"ten\"\n",
" \n",
" return basedict\n",
"\n",
"Cuts = cutdict()"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"electrons = []\n",
"for jcut in range(11):\n",
"\tenergy_emissions = ak.ArrayBuilder()\n",
"\n",
"\tfor jelec in range(ak.num(allcolumns[jcut], axis=0)):\n",
"\t\tenergy_emissions.begin_record()\n",
"\t\tenergy_emissions.field(\"lost\").boolean(allcolumns[jcut][jelec, Cuts[str(jcut)]+\"Cut_\"+\"lost\"])\n",
"\t\tenergy_emissions.field(\"rad_length_frac\").real(allcolumns[jcut][jelec, Cuts[str(jcut)]+\"Cut_\"+\"rad_length_frac\"])\n",
"\t\tenergy_emissions.field(\"energy\").real(allcolumns[jcut][jelec, Cuts[str(jcut)]+\"Cut_\"+\"energy\"])\n",
"\n",
"\t\ttmp_velo = 0\n",
"\t\ttmp_richut = 0\n",
"\t\ttmp_neither = 0\n",
"\t\ttmp_velo_length = 0\n",
"\t\ttmp_richut_length = 0\n",
"\t\ttmp_neither_length = 0\n",
"\t\t\n",
"\t\tfor jphoton in range(ak.num(allcolumns[jcut][jelec][Cuts[str(jcut)]+\"Cut_\"+\"brem_photons_pe\"], axis=0)):\n",
"\t\t\tif allcolumns[jcut][jelec, Cuts[str(jcut)]+\"Cut_\"+\"brem_vtx_z\", jphoton] <= 770:\n",
"\t\t\t\ttmp_velo += allcolumns[jcut][jelec, Cuts[str(jcut)]+\"Cut_\"+\"brem_photons_pe\", jphoton]\n",
"\t\t\t\ttmp_velo_length += 1\n",
"\t\t\telif (allcolumns[jcut][jelec, Cuts[str(jcut)]+\"Cut_\"+\"brem_vtx_z\", jphoton] > 770) and (\n",
"\t\t\t\tallcolumns[jcut][jelec, Cuts[str(jcut)]+\"Cut_\"+\"brem_vtx_z\", jphoton] <= 2700\n",
"\t\t\t):\n",
"\t\t\t\ttmp_richut += allcolumns[jcut][jelec, Cuts[str(jcut)]+\"Cut_\"+\"brem_photons_pe\", jphoton]\n",
"\t\t\t\ttmp_richut_length += 1\n",
"\t\t\telse:\n",
"\t\t\t\ttmp_neither += allcolumns[jcut][jelec, Cuts[str(jcut)]+\"Cut_\"+\"brem_photons_pe\", jphoton]\n",
"\t\t\t\ttmp_neither_length += 1\n",
"\n",
"\t\tenergy_emissions.field(\"velo_length\").integer(tmp_velo_length)\n",
"\t\tenergy_emissions.field(\"velo\").real(tmp_velo)\n",
"\n",
"\t\tenergy_emissions.field(\"rich_length\").integer(tmp_richut_length)\n",
"\t\tenergy_emissions.field(\"rich\").real(tmp_richut)\n",
"\t\t\n",
"\t\tenergy_emissions.field(\"neither_length\").integer(tmp_neither_length)\n",
"\t\tenergy_emissions.field(\"downstream\").real(tmp_neither)\n",
"\t\t\n",
"\t\tenergy_emissions.field(\"photon_length\").integer(tmp_richut_length+tmp_velo_length)\n",
"\t\t\n",
"\t\tif (tmp_velo==0) and (tmp_richut==0):\n",
"\t\t\tenergy_emissions.field(\"quality\").integer(0)\n",
"\t\telse:\n",
"\t\t\tenergy_emissions.field(\"quality\").integer(1)\n",
"\n",
"\t\tenergy_emissions.end_record()\n",
"\n",
"\tenergy_emissions = ak.Array(energy_emissions)\n",
"\telectrons.append(energy_emissions)\n"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABdIAAAJQCAYAAACKKZb6AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAACcgElEQVR4nOz9b6gjd57ne35OOSuz3GXsOCf9YHKf9GRoKIp6YhPK9INmrl2UQzSDlymMpfRl2e6qpbFEcaDv3IZWTPYTp2HpM3Fo2KHhQIUOte2tXi44pdpmYIuBlsq0PUtDj4/ULlgul9tXyhmGi3tp+yhsXJXOLJdjH2RFWH9COvofEdL7BcI+Cv0ivvHTn4/yF4pf7AVBEAgAAAAAAAAAAMT6StIFAAAAAAAAAACQZgykAwAAAAAAAAAwBQPpAAAAAAAAAABMwUA6AAAAAAAAAABTMJAOAAAAAAAAAMAUDKQDAAAAAAAAADAFA+kAAAAAAAAAAEzBQDoAAAAAAAAAAFMwkA4AAAAAAAAAwBQMpAMAAKyB7/tqNBoqlUra399Xp9NJuqSt0Gq1VKlUtL+/r0ajkXQ5SJler6daraZCoZB0KRvR6XR0fHysfD6f+n3mvQsAALKOgXQAAIA1qNVq8jxPjUZDvu8nXc7aHR8fRwcN9vf3ValUVr7fjUZDnuepVqvtRJ+uU6PR0P7+vo6Pj5MuZSU6nY4KhYJyuZwqlYparVbSJa1dp9PRW2+9Jcdx1nagblWvE967AABgGzCQDgAAsAbValWe5yVdxtr5vq98Pq+PPvpI9Xpd9+7d08HBgWq1mmq12kq3VSwWVa/XV7rOWfm+v1UDgEdHR/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ain": [
"<Figure size 1500x600 with 9 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABdIAAAJQCAYAAACKKZb6AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAACb4ElEQVR4nOz9f6gjd37v+b/OuKd7nDHuOqf9x+39J9ulyzDMP/a31O0/wr3u2bH0DWGWO5iW2vvHJjNfgiWGA7mXQFTp/OM2fMm5dQhsCByY0mGIN7n/+EizYWGHC5HGxF4I7PWR4oEvy7JZqblcvjhL7KOy8Uy7O45r/+ipsuqopCOVflVJzwcI+6j0qXrXRz9e6k+pPrXj+74vAAAAAAAAAAAQ6yvrLgAAAAAAAAAAgDRjIB0AAAAAAAAAgAkYSAcAAAAAAAAAYAIG0gEAAAAAAAAAmICBdAAAAAAAAAAAJmAgHQAAAAAAAACACRhIBwAAAAAAAABgAgbSAQAAAAAAAACYgIF0AAAAAAAAAAAmYCAdAABgDM/z1Gw2VS6Xtbu7q263u+6SNkK73Va1WtXu7q6azea6ywFGdLtdHR4eKp/Pq1gsLm07/X5f9Xp9qdsAAADAYjCQDgAAMEa9Xpfrumo2m/I8b93lLN3h4WF40GB3d1fVanXh+91sNuW6rur1+lb0adrN+5yv4jWzat1uV2+99ZZs217awbNut6tisahcLqdqtap2u72U7QAAAGBxGEgHAAAYo1aryXXddZexdJ7nKZ/P66OPPlKj0dCDBw+0t7ener2uer2+0G2VSiU1Go2FrnNanudlfpB3UeZ9zlf5mlk1y7LkOI5KpdJSt9FqtVLx+cL7AgAAYDoMpAMAAEywt7e37hKWLvjlbbValSQZhqFer6dWq6Varbbm6hanXC6r3++vu4xUmPc534bXzCre+6ZpLn0bF+F9AQAAMB0G0gEAALZc8Avi8wOHhUJhHeUshW3bTJ8xZN7nfBteM9uA9wUAAMD0GEgHA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Bs7WNRXEJN1uV4ZhqFKpSHryC8xggOm1114bOwBYLpfDOcTnUa1WwzrGDZIFA1DnL9C3bMEAW1DjPBaxn3Gvn1X3n+u6sRe+DKarmPTr3kCan/NF1LaK937wHj04OJh7XYt+zydZXzCYfnBwMLbfq9Vq7C/Dk/ZtFt87AAAASTGQDgAA1mKaOXVd143cPzwQE/cr0nkG2oKBqo8++mimdu12W/1+X8fHx5GLCDqOE643n89H6u12u8rn87IsayHTHdRqtXA9wXaHBYNcw48LLOpXvnHrCfombrtJJN3P4edl+HkIBuTm6b9JJr0ez7+2JalYLEr68syGSdb5nF/Ufp7akr73Jxn3PAy/R8vlcmSZ53k6OTmRNP30Kot+z8+6vvOPr9fr4XPVbreVy+Ui/XjR+2IaWXzvAAAAJOYDAAAsiWEYviS/VCqNLLMsy5fkW5Y1ssxxHF9SuLxUKvmmafqO4/ilUilcJsnv9Xphu0Kh4EvyC4XCyDobjUbYptVqzVSraZrheoe312g0fMMwfNd1Y/f/fK3Dt0qlMvL4Scsu0uv1wjodxxm5f9w6h/ul0WjMvN2g3yRF+qHVavmGYcRudzAYhG2Gaw0Ez6NhGAvbz+F1Oo7jFwqFyOsg6XqTvMYrlUrs67BQKMS+H8ZZ13M+TfuktSV97yf9rAmeC0m+aZp+rVbza7Wab5pm2C543cR9bpw363vedd1w+WAwmHt9tVpt7OMveq/FvS+m+UzK4nsHAAAgCQbSAQDAwnU6nXCAZnggptfr+b1eb2RwqFQqRQbFfP/JgNrwAHan0/F9/8lASqlUigzgdTqdyIBYsL2gjeM4kQHfYGDO958M+I6r9Xw9lmX5hmH4hmH4pmnG1n2e67p+oVAI250fqDq/r8M1JBnkDAb
"text/plain": [
"<Figure size 1500x600 with 9 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABdIAAAJQCAYAAACKKZb6AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0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2u4iFt3P0edl9HkIB/yW6b9ppr0ez762JalUKkn6/MyGabLwnK+6rln75Lznc5JV/07Ou76zj280GtFz0el0VCgUYu9xi+7nqDy+tgEAADYiAAAAyBDDMAJJQblcHltmWVYgKbAsa2yZ67qBpGh5uVwOTNMMXNcNyuVytExS0O/3o3a2bQeSAtu2x9bZbDajNu12e65aTdOM1ju6vWazGRiGEXiel7j/Z2sdvVWr1bHHT1t2nn6/H9Xpuu7Y/ZPWOdovzWZz7u2G/SYp1g/tdjswDCNxu8PhMGozWmsofB4Nw1jZfo6u03XdwLbt2Otg0fUu8hqvVquJr0PbthN/HyZJ6zn3PC9qPxwOV1LXvH1y3vM5yby/k+ft67zrq9frEx9/3u9C0n7O8p6Rx9c2AADAujGQDgAAMqHb7UYDQKMDPf1+P+j3+2ODT+VyOTZAHQRPBtNHB7C73W4QBE8GasrlcmwAsNvtRgM4o9sL27iuGxvwDQflg+DJgO+kWs/WY1lWYBhGYBhGYJpmYt1neZ4X2LYdtUsa8Bvd19EaFhnkDAfbTNMMLMuaOMDY7XaDer0e6xfDMIJ6vT7XdsP2nucF1Wo1ME0zMAwjsCwr8QBDs9mMBuHCW71eD4bDYeJrY/S5X2Q/Q/1+Pzb4N+mx8/Tfoq/x8IBQ+HqoVquBbdtBvV6ftdsXrnmZ57zf74/9nlmWlTgAPE9d4WPn6ZNZn88ks/xOzrO
"text/plain": [
"<Figure size 1500x600 with 9 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"nbins = 6\n",
"quality_cut = electrons[jcut].quality !=-1\n",
"\n",
"### all split in velo and rich\n",
"\n",
"fig, axs = plt.subplots(3,3, figsize=(15, 6))\n",
"ax = axs.ravel()\n",
"for jcut,ax in enumerate(ax):\n",
" ax.hist(ak.to_numpy(electrons[jcut][quality_cut][\"velo_length\"]),bins=nbins,density=True,alpha=0.5,color=\"darkorange\",histtype=\"bar\",label=\"velo\",range=[0,nbins])\n",
" ax.hist(ak.to_numpy(electrons[jcut][quality_cut][\"rich_length\"]),bins=nbins,density=True,alpha=0.5,color=\"blue\",histtype=\"bar\",label=\"rich\",range=[0,nbins])\n",
" ax.set_xlim(0,nbins)\n",
" ax.set_ylim(0,1)\n",
" ax.set_title(\"Photon Cut: \"+str(np.round(jcut*0.05,2))+f\"$E_0$\")\n",
" ax.set_xlabel(\"number of photons\")\n",
" ax.set_ylabel(\"a.u.\")\n",
"plt.suptitle(\"number of photons in velo and rich\")\n",
"plt.legend()\n",
"plt.tight_layout()\n",
"plt.show()\n",
"\n",
"### found\n",
"\n",
"fig, axs = plt.subplots(3,3, figsize=(15, 6))\n",
"ax = axs.ravel()\n",
"for jcut,ax in enumerate(ax):\n",
" ax.hist(ak.to_numpy(electrons[jcut][~(electrons[jcut].lost) & quality_cut][\"velo_length\"]),bins=nbins,density=True,alpha=0.5,color=\"darkorange\",histtype=\"bar\",label=\"velo\",range=[0,nbins])\n",
" ax.hist(ak.to_numpy(electrons[jcut][~(electrons[jcut].lost) & quality_cut][\"rich_length\"]),bins=nbins,density=True,alpha=0.5,color=\"blue\",histtype=\"bar\",label=\"rich\",range=[0,nbins])\n",
" ax.set_xlim(0,nbins)\n",
" ax.set_ylim(0,1)\n",
" ax.set_title(\"Photon Cut: \"+str(np.round(jcut*0.05,2))+f\"$E_0$\")\n",
" ax.set_xlabel(\"number of photons\")\n",
" ax.set_ylabel(\"a.u.\")\n",
"plt.suptitle(\"number of photons of found electrons\")\n",
"plt.legend()\n",
"plt.tight_layout()\n",
"plt.show()\n",
"\n",
"### lost \n",
"\n",
"fig, axs = plt.subplots(3,3, figsize=(15, 6))\n",
"ax = axs.ravel()\n",
"for jcut,ax in enumerate(ax):\n",
" ax.hist(ak.to_numpy(electrons[jcut][(electrons[jcut].lost) & quality_cut][\"velo_length\"]),bins=nbins,density=True,alpha=0.5,color=\"darkorange\",histtype=\"bar\",label=\"velo\",range=[0,nbins])\n",
" ax.hist(ak.to_numpy(electrons[jcut][(electrons[jcut].lost) & quality_cut][\"rich_length\"]),bins=nbins,density=True,alpha=0.5,color=\"blue\",histtype=\"bar\",label=\"rich\",range=[0,nbins])\n",
" ax.set_xlim(0,nbins)\n",
" ax.set_ylim(0,1)\n",
" ax.set_title(\"Photon Cut: \"+str(np.round(jcut*0.05,2))+f\"$E_0$\")\n",
" ax.set_xlabel(\"number of photons\")\n",
" ax.set_ylabel(\"a.u.\")\n",
"plt.suptitle(\"number of photons of lost electrons\")\n",
"plt.legend()\n",
"plt.tight_layout()\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABdIAAAJQCAYAAACKKZb6AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAACeyElEQVR4nOz9b4wj54Hnef5SKqmstiBFZgl3rQVuuys48Bm+Fy0EqwSMb8altYIwZrwYQyuy6jA42AKMImHkixn42mRX3wEqvbjJiUQDO28ScDDha50xWEBJensXuL5BN2mh5cYYM1PJsBo4DBbbS1YPegH3wlYyJMguV/lP3IuaCJHJP8kkH5IRye8HIKqSEfHwiYd/fuQTEc+zFUVRJAAAAAAAAAAAMNYT664AAAAAAAAAAABpRkc6AAAAAAAAAABT0JEOAAAAAAAAAMAUdKQDAAAAAAAAADAFHekAAAAAAAAAAExBRzoAAAAAAAAAAFPQkQ4AAAAAAAAAwBR0pAMAAAAAAAAAMAUd6QAAAAAAAAAATEFHOgAAwJzCMFSz2VSpVNL29raCIFh3lS6EdrutSqWi7e1tNZvNdVcHM+r1eqrX6yoUCuuuSuYEQaD9/X3l83nabwzaBwAApAEd6QAAAHOq1+vyfV/NZlNhGK67Oku3v7+fHDTY3t5WpVIxvt/NZlO+76ter29Emy5Ts9nU9va29vf3l/o4QRCoUCgol8upUqmo3W4v9fEumiAI9M4776hWqy18MG4V79FVM9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AMdmDFPM8b6sDudDpRFD3uiCkWi0MdSp1OZ6i
"text/plain": [
"<Figure size 1500x600 with 9 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"quality_cut = electrons[jcut].quality != -1\n",
"### all split in lost and found\n",
"\n",
"fig, axs = plt.subplots(3,3, figsize=(15, 6))\n",
"ax = axs.ravel()\n",
"for jcut,ax in enumerate(ax):\n",
"\tax.hist(ak.to_numpy(electrons[jcut][(electrons[jcut].lost) & (quality_cut)][\"photon_length\"]),bins=10,density=True,alpha=0.5,color=\"darkorange\",histtype=\"bar\",label=\"lost\",range=[0,10])\n",
"\tax.hist(ak.to_numpy(electrons[jcut][(~electrons[jcut].lost) & (quality_cut)][\"photon_length\"]),bins=10,density=True,alpha=0.5,color=\"blue\",histtype=\"bar\",label=\"found\",range=[0,10])\n",
"\tax.set_xlim(0,10)\n",
"\t#ax.set_ylim(0,1)\n",
"\t#ax.set_yscale('log')\n",
"\tax.set_title(\"Photon Cut: \"+str(np.round(jcut*0.05,2))+f\"$E_0$\")\n",
"\tax.set_xlabel(\"number of photons\")\n",
"\tax.set_ylabel(\"a.u.\")\n",
"plt.suptitle(\"number of photons in lost and found\")\n",
"plt.legend()\n",
"plt.tight_layout()\n",
"plt.show()\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "tuner",
"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.12"
}
},
"nbformat": 4,
"nbformat_minor": 2
}