Lugovtsov/cosmic-rays/Obrabotka.ipynb

484 lines
93 KiB
Plaintext
Raw Normal View History

{
"cells": [
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"id": "kaayLGB4AyPP"
},
"outputs": [],
"source": [
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"df = pd.read_csv('/content/Untitled_angle_09_12.dat',delimiter = '\\t')\n",
"df.columns=['Count','Time']\n",
"ns = 0.064\n",
"df['Time'] = df.index * ns\n",
"df['Speed'] = 0.46/df['Time']*10**9\n",
"correct_df = df[(df['Time']>1.6) & (df['Time']<15)]"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 206
},
"id": "QTTbLpFSBWIG",
"outputId": "09b8c4f2-764e-40e7-f1cc-fce0589a6d15"
},
"outputs": [
{
"data": {
"text/html": [
"\n",
" <div id=\"df-8adb9e0c-ac81-43d8-84bb-060e6a6df807\" class=\"colab-df-container\">\n",
" <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>Count</th>\n",
" <th>Time</th>\n",
" <th>Speed</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>26</th>\n",
" <td>31</td>\n",
" <td>1.664</td>\n",
" <td>2.764423e+08</td>\n",
" </tr>\n",
" <tr>\n",
" <th>27</th>\n",
" <td>31</td>\n",
" <td>1.728</td>\n",
" <td>2.662037e+08</td>\n",
" </tr>\n",
" <tr>\n",
" <th>28</th>\n",
" <td>23</td>\n",
" <td>1.792</td>\n",
" <td>2.566964e+08</td>\n",
" </tr>\n",
" <tr>\n",
" <th>29</th>\n",
" <td>26</td>\n",
" <td>1.856</td>\n",
" <td>2.478448e+08</td>\n",
" </tr>\n",
" <tr>\n",
" <th>30</th>\n",
" <td>22</td>\n",
" <td>1.920</td>\n",
" <td>2.395833e+08</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>\n",
" <div class=\"colab-df-buttons\">\n",
"\n",
" <div class=\"colab-df-container\">\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-8adb9e0c-ac81-43d8-84bb-060e6a6df807')\"\n",
" title=\"Convert this dataframe to an interactive table.\"\n",
" style=\"display:none;\">\n",
"\n",
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
" </svg>\n",
" </button>\n",
"\n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" gap: 12px;\n",
" }\n",
"\n",
" .colab-df-convert {\n",
" background-color: #E8F0FE;\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: #1967D2;\n",
" height: 32px;\n",
" padding: 0 0 0 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-convert:hover {\n",
" background-color: #E2EBFA;\n",
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: #174EA6;\n",
" }\n",
"\n",
" .colab-df-buttons div {\n",
" margin-bottom: 4px;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert {\n",
" background-color: #3B4455;\n",
" fill: #D2E3FC;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert:hover {\n",
" background-color: #434B5C;\n",
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
" fill: #FFFFFF;\n",
" }\n",
" </style>\n",
"\n",
" <script>\n",
" const buttonEl =\n",
" document.querySelector('#df-8adb9e0c-ac81-43d8-84bb-060e6a6df807 button.colab-df-convert');\n",
" buttonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
"\n",
" async function convertToInteractive(key) {\n",
" const element = document.querySelector('#df-8adb9e0c-ac81-43d8-84bb-060e6a6df807');\n",
" const dataTable =\n",
" await google.colab.kernel.invokeFunction('convertToInteractive',\n",
" [key], {});\n",
" if (!dataTable) return;\n",
"\n",
" const docLinkHtml = 'Like what you see? Visit the ' +\n",
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
" + ' to learn more about interactive tables.';\n",
" element.innerHTML = '';\n",
" dataTable['output_type'] = 'display_data';\n",
" await google.colab.output.renderOutput(dataTable, element);\n",
" const docLink = document.createElement('div');\n",
" docLink.innerHTML = docLinkHtml;\n",
" element.appendChild(docLink);\n",
" }\n",
" </script>\n",
" </div>\n",
"\n",
"\n",
"<div id=\"df-0afaef0d-7249-44f0-8914-0d49d8966d79\">\n",
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-0afaef0d-7249-44f0-8914-0d49d8966d79')\"\n",
" title=\"Suggest charts\"\n",
" style=\"display:none;\">\n",
"\n",
"<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
" width=\"24px\">\n",
" <g>\n",
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
" </g>\n",
"</svg>\n",
" </button>\n",
"\n",
"<style>\n",
" .colab-df-quickchart {\n",
" --bg-color: #E8F0FE;\n",
" --fill-color: #1967D2;\n",
" --hover-bg-color: #E2EBFA;\n",
" --hover-fill-color: #174EA6;\n",
" --disabled-fill-color: #AAA;\n",
" --disabled-bg-color: #DDD;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-quickchart {\n",
" --bg-color: #3B4455;\n",
" --fill-color: #D2E3FC;\n",
" --hover-bg-color: #434B5C;\n",
" --hover-fill-color: #FFFFFF;\n",
" --disabled-bg-color: #3B4455;\n",
" --disabled-fill-color: #666;\n",
" }\n",
"\n",
" .colab-df-quickchart {\n",
" background-color: var(--bg-color);\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: var(--fill-color);\n",
" height: 32px;\n",
" padding: 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-quickchart:hover {\n",
" background-color: var(--hover-bg-color);\n",
" box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: var(--button-hover-fill-color);\n",
" }\n",
"\n",
" .colab-df-quickchart-complete:disabled,\n",
" .colab-df-quickchart-complete:disabled:hover {\n",
" background-color: var(--disabled-bg-color);\n",
" fill: var(--disabled-fill-color);\n",
" box-shadow: none;\n",
" }\n",
"\n",
" .colab-df-spinner {\n",
" border: 2px solid var(--fill-color);\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" animation:\n",
" spin 1s steps(1) infinite;\n",
" }\n",
"\n",
" @keyframes spin {\n",
" 0% {\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" border-left-color: var(--fill-color);\n",
" }\n",
" 20% {\n",
" border-color: transparent;\n",
" border-left-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" }\n",
" 30% {\n",
" border-color: transparent;\n",
" border-left-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" border-right-color: var(--fill-color);\n",
" }\n",
" 40% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" }\n",
" 60% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" }\n",
" 80% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" border-bottom-color: var(--fill-color);\n",
" }\n",
" 90% {\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" }\n",
" }\n",
"</style>\n",
"\n",
" <script>\n",
" async function quickchart(key) {\n",
" const quickchartButtonEl =\n",
" document.querySelector('#' + key + ' button');\n",
" quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n",
" quickchartButtonEl.classList.add('colab-df-spinner');\n",
" try {\n",
" const charts = await google.colab.kernel.invokeFunction(\n",
" 'suggestCharts', [key], {});\n",
" } catch (error) {\n",
" console.error('Error during call to suggestCharts:', error);\n",
" }\n",
" quickchartButtonEl.classList.remove('colab-df-spinner');\n",
" quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
" }\n",
" (() => {\n",
" let quickchartButtonEl =\n",
" document.querySelector('#df-0afaef0d-7249-44f0-8914-0d49d8966d79 button');\n",
" quickchartButtonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
" })();\n",
" </script>\n",
"</div>\n",
" </div>\n",
" </div>\n"
],
"text/plain": [
" Count Time Speed\n",
"26 31 1.664 2.764423e+08\n",
"27 31 1.728 2.662037e+08\n",
"28 23 1.792 2.566964e+08\n",
"29 26 1.856 2.478448e+08\n",
"30 22 1.920 2.395833e+08"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"correct_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 466
},
"id": "5yKqwV9SxLHP",
"outputId": "735be114-40dd-449f-8f4a-b48be1d2a5b5"
},
"outputs": [
{
"data": {
"text/plain": [
"Text(0.5, 0, 'Time, ns')"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_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nNHpwL5oYAABa8fQdmdNPP10/+tGPNGTIEEWjUT399NP6yle+ojfffFNDhw6VJN1yyy36z//8z+Z9unTp4lW5AADAZzxtZKZMmRL35x/84AcqKyvTpk2bmhuZLl26KBKJZDxmQ0ODGhoamv9cW1trT7EAAMB3fPNl38bGRi1btkx1dXUaPXp08/2//vWv1bt3bw0bNkxz587VsWPHUo6zcOFChcPh5ltxcbHTpQMAAI+EotGop7+055133tHo0aNVX1+vbt26aenSpfryl78sSXriiSc0YMAA9evXT2+//bbuvvtuXXjhhXr22WeTjpfoHZni4mLV1NSooKDA8eMBAADW1dbWKhwOp3399ryROX78uPbu3auamhr97//+r37xi19o48aNKikpabPtiy++qLFjx2rnzp0aPHhwRuNnuhAAAMA/Mn399vyjpc6dO+vMM8/UqFGjtHDhQp133nl6+OGHE2570UUXSZJ27tzpZokAAMCnPG9kWmtqaor7aKiliooKSVJREYFwAADA46uW5s6dq8mTJ6t///46cuSIli5dqg0bNmjNmjXatWtX8/dlevXqpbffflu33367Lr30Uo0YMcLLsgEAgE942sgcOHBAN910kyorKxUOhzVixAitWbNG48eP1759+/SnP/1JP/vZz1RXV6fi4mJ97Wtf0z333ONlyQAAwEc8/7Kv0/iyLwAAwROYL/sCAACYRSMDAAACi0YGAAAEFo0MAAAILBoZAAAQWDQyAAAgsGhkAABAYNHIAACAwKKRAQAAgUUjAwAAAotGBgAABBaNDAAACCwaGQAAEFg0MgAAILBoZAAAQGDRyAAAgMCikQEAAIFFIwMAAAKLRgYAAAQWjQwAAAgsGhkAABBYNDIAACCwaGQAAEBg0cgAAIDAopEBAACB1cnrAoKosSmqzbsP6cCRevXumiuFpE+ONqhv9zxdOKinOnYIeV0iAADtAo2MQau3VWrByu2qrKlP+HhROE/zp5Ro0rAilysDAKD94aMlA1Zvq9TMZ7YmbWIkqaqmXjOf2arV2ypdrAwAgPaJRiZDjU1RLVi5XdE028UeX7Byuxqb0m0NAACsoJHJ0Obdh1K+E9NSVFJlTb027z7kbFEAALRzND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oHwAAZvkuR8ZufsqRIaAOAIDMBC5HJts1NkW1YOX2hF+8jd23YOV2fg8SAAAG0Mi4hIA6AADsRyPjEgLqAACwH42MSwioAwDAfjQyLokF1CW7Viikk1cvEVAHAEDmaGRcQkAdAAD2o5FxUSygLhKO//goEs7j0msAAEzw/HctZbvWKb7jSyKWAurcSgUGACAIaGQcZHeKr9upwAAA+B0fLTkkluLbOjumqqZeM5/ZqtXbKj0dDwCAbEAj4wC7U3xJBQYAIDEaGQfYneJLKjAAAInRyDjA7hRfUoEBAEiMRsYBdqf4kgoMAEBiNDIOsDvFl1RgAAASo5FxgN0pvqQCAwCQWCgajWb1pS61tbUKh8OqqalRQUGBq3ObzX1JFnqXarxYyF5Vzac6VHdcPbvlKlKQOjAvNo+RfQAAcEOmr980Mg4zmsSbrvlJNN7a7VVt9km0b7p50u0DAIBbaGRO8bqRMSIWetf6CYm1PYl+H1OyfVrv33JfM/sAAOCmTF+/+Y6MT5gJvUu1T2uxfc3sAwCAX9HI+ISZ0Lt0+yTa18w+AAD4Fb800ifMhN4ZDcAzE5hHyB4AwM9oZHzCTOid0QA8M4F5hOwBAPyMj5Z8wkzoXWyfdFrua2YfAAD8ikbGJ8yE3sX2ySTxJbavmX0AAPArGhmbNTZFVb7roJ6r+Ejluw42X/WT7P6WxpdEVDruLIXzc+Luj4Tz9Ng3LlA4v3Ob/ScNK1LZ1JFJ32UpCue1uYz
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.scatter(correct_df['Time'], correct_df['Count'])\n",
"plt.ylabel('Count')\n",
"plt.xlabel('Time, ns')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "SCrC88HHpDFt"
},
"outputs": [],
"source": [
"n = 15\n",
"df_avg = pd.Series(correct_df['Count']).rolling(window=n).mean().iloc[n-1:].values"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 447
},
"id": "11Dml6iApz8n",
"outputId": "394a6c70-bd3c-4c44-ae3f-2fa0fef081ff"
},
"outputs": [
{
"data": {
"text/plain": [
"[<matplotlib.lines.Line2D at 0x7ae94ba16f20>]"
]
},
"execution_count": 95,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAh8AAAGdCAYAAACyzRGfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAABFNElEQVR4nO3dd3xV9eH/8dcdyc1OyE5IAgkj7L1BREGUKkjFPWu1juK2ftW2rrZKtb/WVmtBra1VRK1VHNRR9lD2RjYEAtkh42aQec/vj4RoJEACyT03N+/n43EfNfeee+87t8h9+zmf8/lYDMMwEBEREXETq9kBREREpGNR+RARERG3UvkQERERt1L5EBEREbdS+RARERG3UvkQERERt1L5EBEREbdS+RARERG3spsd4IdcLheZmZkEBwdjsVjMjiMiIiLNYBgGJSUlxMfHY7WefmzD48pHZmYmiYmJZscQERGRs3DkyBESEhJOe4zHlY/g4GCgLnxISIjJaURERKQ5nE4niYmJDd/jp+Nx5ePEqZaQkBCVDxERkXamOVMmNOFURERE3ErlQ0RERNxK5UNERETcSuVDRERE3ErlQ0RERNxK5UNERETcSuVDRERE3ErlQ0RERNxK5UNERETcSuVDRERE3ErlQ0RERNxK5UNERETcSuUDMAyD/2w8ylffZpsdRURExOt53K627lZeVcMj/9nGf7dlYbda2PzkRQT7+ZgdS0RExGt1uPJRUlHNx1sy2ZxeCAZszyhmX24pADUug28znYxKiTA5pYiIiPfqMOXjSEE5s5cf4JPNGZRV1TZ6LCLQl+gQP3ZlOdl+tFjlQ0REpA11mPJRUlHDvLXpAHSLCmTawM4E+NrwsVmY0j+O/2w8yq4sJ9syik1OKiIi4t1aVD5mzZrFRx99xO7du/H392fMmDE8//zzpKam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52E4qHiec1yMKgE2Hi9yYSERExHwqHyYZkhQGwKb0QgxDe8GIiEjHofJhkgEJYditFnJLKsks1k64IiLScah8mMTf10bv+p1wNx0uNDmNiIiI+6h8mOj7p15EREQ6CpUPEw3p0gmATelF5gYRERFxI5UPEw1JqisfOzOLqaiuNTmNiIiIe6h8mCihkz+RQQ6qaw12ZBSbHUdERMQtVD5MZLFYNO9DREQ6HJUPkw2uP/Wy4ZDKh4iIdAwqHyYblRIOwJqDx6ipdZmcRkREpO2pfJhsQEIYIX52nBU1bNO8DxER6QBUPkxms1oY2z0SgFX78k1OIyIi0vZUPjzAiU3mVu7LMzmJiIhI21P58ADn9agb+dicXkRJRbXJaURERNqWyocHSAwPoGtEADUugzUHC8yOIyIi0qZUPjzEiVMvq3TqRUREvJzKh4cYV3/qZaUmnYqIiJdT+fAQo7tFYLXAwfwy8koqzY4jIiLSZlQ+PESInw+J4QEA7MstMTmNiIhI21H58CA9ooMAOJBbanISERGRtqPy4UG6RwcDsE/lQ0REvJjKhwfpXj/ysS9H5UNERLyXyocHOXHaZX+eyoeIiHgvlQ8P0q2+fOSVVFJUXmVyGhERkbah8uFBghx2Oof5A7Bf8z5ERMRLqXx4mBOjHyofIiLirVQ+PMyJeR/7ckvJKDrOlL+s5OZ/rOOrb7OpqXWZnE5EROTc2c0OII19v3z8ZdFedmU52ZUFK/bm0a9zCB/cOQZ/X5vJKUVERM6eRj48zInLbbekF/LRpgwArhmWSJDDzo4MJ6v2a+8XERFp31Q+PMyJ8uGsqKHGZTCueyTPXzmAHw/uDMBK7XorIiLtnMqHhwkL8CUq2NHw870Xdge+2/V2lXa9FRGRdk7lwwOdmPcxIjmckSkRQN2utzarhYP5ZRwtLDcznoiIyDlR+fBAVw9
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.plot(np.array(correct_df['Time'])[7:-7],df_avg)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"id": "y6b3kv0kBtHV"
},
"outputs": [],
"source": [
"L=0.46\n",
"me = 9.11 * 10**-31\n",
"c = 299792458\n",
"m_mu = 1.883531627 * 10**-28\n",
"def gamma(u):\n",
" return 1/np.sqrt(1-(u/c)**2)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 449
},
"id": "Eg95ViryBwzG",
"outputId": "62f8ee4c-7e67-4ec0-8626-90bf84ad290d"
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjIAAAGwCAYAAACzXI8XAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAABdx0lEQVR4nO3deXxTZfY/8M/N3r20hS5Q9n3HslhhZJFFdBgXZlQUKIvrgI7ijMpPHEUdGec7bqOIy0ABFXBwG3UUBlBAR9YCssi+L13Y2nRN0uT+/kjubdKmbZImuUn6eb9eeUmTNDkXKjmc5zznEURRFEFEREQUhlRKB0BERETkKyYyREREFLaYyBAREVHYYiJDREREYYuJDBEREYUtJjJEREQUtpjIEBERUdjSKB1AoNlsNly4cAFxcXEQBEHpcIiIiMgDoiiitLQUGRkZUKnqr7tEfCJz4cIFZGZmKh0GERER+eDs2bNo06ZNvY9HfCITFxcHwP4bER8fr3A0RERE5Amj0YjMzEz5c7w+EZ/ISMtJ8fHxTGSIiIjCTGNtIWz2JSIiorDFRIaIiIjCFhMZIiIiCltMZIiIiChsMZEhIiKisMVEhoiIiMIWExkiIiIKW0xkiIiIKGwxkSEiIqKwxUSGiIiIwhYTGSIiIgpbTGSIiIgobDGRIUVVmq1Kh0BERGGMiQwpZvmWU+j93Fp8f6hI6VCIiChMMZEhxew4dRVWm4gdp64oHQoREYUpJjKkmJJKCwDgSrlZ4UiIiChcMZEhxRgdicxlJjJEROQjJjKkGCmRucpEh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fHw8Hn74YWRnZ3P
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.plot((gamma(correct_df['Speed']))*me*c**2/1.6*10**13, correct_df['Count'])\n",
"plt.ylabel('Count')\n",
"plt.xlabel('E, MeV')\n",
"plt.show()"
]
}
],
"metadata": {
"colab": {
"provenance": []
},
"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.10.12"
}
},
"nbformat": 4,
"nbformat_minor": 4
}