Lugovtsov/vaki-autoelectron-emission/plots.ipynb

742 lines
795 KiB
Plaintext
Raw Normal View History

2023-09-15 23:46:38 +03:00
{
"cells": [
{
"cell_type": "code",
2023-10-07 19:38:12 +03:00
"execution_count": 9,
2023-09-15 23:46:38 +03:00
"id": "3e9c91d2-a8a3-4cf4-a3bd-682f4979776a",
"metadata": {},
"outputs": [],
"source": [
"# %load /home/glebi/git/experiment-automation/processing_tools.py\n",
"import numpy as np\n",
"from scipy.optimize import curve_fit\n",
"import pandas as pd\n",
"\n",
"import matplotlib.pyplot as plt\n",
"import matplotlib\n",
"import scienceplots\n",
"\n",
"plt.style.use(['science', 'russian-font'])\n",
2023-09-29 12:46:12 +03:00
"plt.style.use([\"bright\"])\n",
2023-09-15 23:46:38 +03:00
"\n",
"matplotlib.rcParams.update({\n",
" 'figure.figsize': [6, 4],\n",
" 'savefig.facecolor': 'white',\n",
2023-09-29 13:25:15 +03:00
" 'figure.dpi': 200.0,\n",
2023-09-15 23:46:38 +03:00
" 'font.size': 12.0,\n",
2023-09-29 13:25:15 +03:00
"})\n",
"\n",
"def line_func(x, arg1, arg2):\n",
" return x * arg1 + arg2"
2023-09-15 23:46:38 +03:00
]
},
{
"cell_type": "code",
2023-10-07 19:38:12 +03:00
"execution_count": 10,
2023-09-15 23:46:38 +03:00
"id": "5e765906-9269-4ba2-81ba-fb2fd3d798f1",
"metadata": {},
"outputs": [
{
"data": {
2023-09-29 13:41:43 +03:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABBgAAALUCAYAAAChG4GcAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAB7CAAAewgFu0HU+AACiPElEQVR4nOzdeXxU5aH/8e8kBBJUMhBEx7qQCUsHVybBLra2moyi2LiQgNXYRU2mdrm3v7Ykprc1SXtvMeBd21uZoN7aRm9hBlGRimSCtrV2STLgUlKQDKitoy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nwOhYEhQJSUlsddVVVWqrq42LwwAAAAAoF/RaFTrnn9Ul8+5VKeePNPsOHHxeDyqqakZ0hgKhgRVX18vh8MhScxeAAAAAIBx7HDnO0qfNEXLLrjW7Chxc7vdKiwslHR8BkPPL7n7Q8GQoBwOh5xOp9kxAAAAAACDyEyfpg1f+Jmi0ajZUeI2nKX4bPIIAAAAAMAoebfzPQX+9oKi0agsFovZcUYVBQMAAAAAAKPkidatWlZ/m9589y2zo4w6CgYAAAAAAEbJ+hce1aX2T+j0U2aZHWXUUTAAAAAAADAK/rL/ZT0f+rNuvPAGs6OMCQoGAAAAAABGwS+f36hTT8rSZTmfMjvKmKBgAAAAAABgFJwx7XSVXnyL0lInxgMcJ8ZPCQAAAADAGCv72BfMjjCmmMEAAAAAAIDB1j//qN54Z7/ZMcYUBQMAAAAAAAZqO7BPlVv+WU2vbTc7ypiiYAAAAAAAwEDrnn9U0zMydcW8y8yOMqYoGAAAAAAAMEjn0Q+08aUndP25SzR
2023-09-15 23:46:38 +03:00
"text/plain": [
2023-09-29 13:25:15 +03:00
"<Figure size 1200x800 with 1 Axes>"
2023-09-15 23:46:38 +03:00
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"df = pd.read_csv(\"VAH.csv\")\n",
"cols = df.columns\n",
"\n",
2023-09-29 13:41:43 +03:00
"plt.plot(df[cols[0]] * 1e-3, df[cols[1]]*1e-1, marker=\".\", lw=.5, color=\"C2\", ls=\"--\")\n",
2023-09-15 23:46:38 +03:00
"plt.xlabel(\"Напряжение, кВ\")\n",
"plt.ylabel(\"Сила тока, мкА\")\n",
"\n",
2023-09-29 12:46:12 +03:00
"plt.savefig(\"hand-VAH.png\")\n",
2023-09-15 23:46:38 +03:00
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "d084ce30-37aa-440c-ab41-591ab094d21f",
"metadata": {},
"source": [
"сопротивление нашей цепи"
]
},
{
"cell_type": "code",
2023-10-07 19:38:12 +03:00
"execution_count": 11,
2023-09-15 23:46:38 +03:00
"id": "5b0cd085-4398-4b10-b6cc-3147d4e616f8",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"13991140.642303433"
]
},
2023-10-07 19:38:12 +03:00
"execution_count": 11,
2023-09-15 23:46:38 +03:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"1263.4 / (903e-7)"
]
},
{
"cell_type": "markdown",
"id": "cd1ec375-3bdd-4bcb-88a0-fa6dcf173ec4",
"metadata": {},
"source": [
"максимальное напряжение на резисторе, который снимает ток"
]
},
{
"cell_type": "code",
2023-10-07 19:38:12 +03:00
"execution_count": 12,
2023-09-15 23:46:38 +03:00
"id": "cfe69bd0-e5c9-45af-826b-22e759bc6eca",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"8.32"
]
},
2023-10-07 19:38:12 +03:00
"execution_count": 12,
2023-09-15 23:46:38 +03:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"1600e-7 * 52e3"
]
},
{
"cell_type": "markdown",
"id": "6a53d766-e438-4378-b7b0-db3c46578f2c",
"metadata": {},
"source": [
"аналитическая функция вах"
]
},
{
"cell_type": "code",
2023-10-07 19:38:12 +03:00
"execution_count": 13,
2023-09-15 23:46:38 +03:00
"id": "8a4273c4-db67-40b9-b887-926d8e6866e1",
"metadata": {},
"outputs": [],
"source": [
"# def vah_func(u):\n",
"# return S_e * (1.537e10 / )"
]
},
2023-09-29 13:25:15 +03:00
{
"cell_type": "markdown",
"id": "59f5605a-6a22-49de-98a2-bc83e9d8d49b",
"metadata": {},
"source": [
"обработка данных"
]
},
2023-09-15 23:46:38 +03:00
{
"cell_type": "code",
2023-10-07 19:38:12 +03:00
"execution_count": 14,
2023-09-29 13:25:15 +03:00
"id": "87f15973-cb08-477e-a81d-2a81e1536105",
"metadata": {},
"outputs": [],
"source": [
"U_min = 900\n",
"R = 26.99e3 # Ом\n",
"\n",
"column_names = [\"Voltage\", \"Current\"]\n",
"\n",
"experiment_names = [\"Первая серия измерений\", \"Вторая серия измерений\"]\n",
"file_idxs = [[1, 2, 3], [4, 5]]\n",
"\n",
"dots_result = [None, None]\n",
"ex_result = [None, None]\n",
"\n",
"for num, (ex_name, f_idxs) in enumerate(zip(experiment_names, file_idxs)):\n",
" result = pd.DataFrame(columns=column_names)\n",
"\n",
" for i in f_idxs:\n",
" df = pd.read_csv(f\"RISING-{i}.csv\", header = None)\n",
" df = df.loc[lambda x : x[4] > U_min]\n",
"\n",
" U = df[4] # В\n",
" U_cur = df[10]\n",
" I = U_cur / R # А\n",
"\n",
" result = pd.concat([result, pd.concat(dict(zip(column_names, [U, I])), axis=1)], ignore_index=True)\n",
" \n",
" result[\"Current\"] -= min(result[\"Current\"])\n",
" ex_result[num] = result.groupby(\"Voltage\").mean().reset_index()\n",
" dots_result[num] = result"
]
},
{
"cell_type": "code",
2023-10-07 19:38:12 +03:00
"execution_count": 15,
2023-09-15 23:46:38 +03:00
"id": "24817123-a6cd-47a5-a153-7d4e6ab68135",
"metadata": {},
"outputs": [
{
"data": {
2023-09-29 12:46:12 +03:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABBgAAALLCAYAAABTmzHSAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAB7CAAAewgFu0HU+AAEAAElEQVR4nOz9eXwb550n+H8AAiRAUSJA+ghlJ5FAOQkdJ7ZAOs7pHARtJ51WDoNmulu9OzuxiHZ6emd+rx2TVm/32t7uaRlK+jfHznYEyD1X1JNYgO1OOp3EImgnzm0RsJw4URKLkBw7oqwDKFIkAeKq/QOoIgrEjSqAx+f9eulV4IOq+hYKoM3ni+f7PDpRFEUQERERERERETVA3+oLICIiIiIiIqKNjwkGIiIiIiIiImoYEwxERERERERE1DAmGIiIiIiIiIioYUwwEBEREREREVHDmGAgIiIiIiIiooYxwUBEREREREREDWOCgYiIiIiIiIgaZmj1BVBtLl++jGeeeQa7du2C2Wxu9eUQERERERHRJheLxXDu3DncfffduOaaa0ruxwTDBvO1r30Nf/Znf9bqyyAiIiIiIqIt5tixY/ijP/qjks8zwbDBdHZ2AgD+6q/+Cp/4xCc0jXX69Gns378fx44dw8DAAOMwDuMwjuZxmhmLcRiHcdZ/nGbGYhzGYRzGaUWsjRJHOn7Xrl1l92OCYYPp6OgAAOzevRt2u70pMQcGBpoSi3EYh3EYpxWxGIdxGGf9x2lmLMZhHMZhnFbE2ihxKpXpc5JHIiIiIiIiImoYEwwbjDShRrmJNdTS19eHhx9+GH19fZsiTrNstvu22eI0y2a7b818f/hZYJxmxmmWzXbf+N+E+m2292izxWmWzXbfNlucZtps904niqKoaQRSVSgUwuDgIILBYNOGBW0WvHcE8HNAq/hZIICfA1rFzwIB/BzQKn4WlKq9HxzBQEREREREREQNY4KBiIiIiIiIiBrGBANtGZuxZotqx88BSfhZIICfA1rFzwIB/BzQKn4W6sM5GDYY1gIRERERERFRM3EOBiIiIiIiIiJqGiYYiIiIiIiIiKhhTDAQERERERERUcOYYCAiIiIiIiKihjHBQEREREREREQNY4KBiIiIiIiIiBrGBAMRERERERERNYwJBiIiIiIiIiJqGBMMRERERERERNQwJhiIiIiIiIiIqGFMMBARERERERFRw5hgICIiIiIiIqKGMcFARERERERERA0ztPoCqD6nT5+WH/f19aGvr6+FV0NERERERESbydzcHObm5gAo+5/lMMGwQe3fv19+/PDDD+ORRx5p3cUQERERERHRpuLxePDoo4/WdAwTDBvUsWPHMDAwAAAcvUBERERERFuCKIrQ6XStvowtweVyYd++fQCyIxjyv+QuhQmGDWpgYAB2u73Vl0FERERERKQ5URQBUVx9rNMx0aCxekrxmWAgIiIiIiKi9U0UV5MMOh10AMAEw7rDVSSIiIiIiIho3RJzIxdQsJXbad1ggoGIiIiIiIjWLbkUomDLEon1hwkGonXM5XJBl6svU/Nff39/q18aEREREVH1pL9l9fpsYoHJhXWJCQaidczj8UAURczOziom9ZTaK/0LBoOK8wWDQfl8REREREQbhZRcQH6Sgd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iN/L5UON9BbKJFJfLxSUqiYgKiKIIMZMBcltRFDWJE718GdFf/QrIbaOXL2sSB8gmFpYvXwZy2+XlZc1ibTYcwUC0xUlDuGdmZsoOX7bZbJiYmGhooj2bzYZQKFS2g1E4l0I4HEYkEqlqWHI4HIbf78fU1BQikQiGhoZKlk0UcrvdcLlc8Hg88hBwrToSxVZMqOW49fJe5ZMmCKwlIdHMe15JPdcPZN8Tt9uNSCSCUCgkr8ZQ7col0lwUhw4dWjO
2023-09-15 23:46:38 +03:00
"text/plain": [
2023-09-29 13:25:15 +03:00
"<Figure size 1200x800 with 1 Axes>"
2023-09-15 23:46:38 +03:00
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
2023-09-29 13:25:15 +03:00
"for num, (ex_name, dots, line) in enumerate(zip(experiment_names, dots_result, ex_result)):\n",
2023-09-29 12:46:12 +03:00
" plt.plot(dots[\"Voltage\"]*1e-3, dots[\"Current\"]*1e6, alpha=0.01, ls=\"\", marker=\".\", markersize=2, color=f\"C{num}\")\n",
" plt.plot(line[\"Voltage\"]*1e-3, line[\"Current\"]*1e6, lw=1.5, alpha=1, color=f\"C{num}\", label=ex_name)\n",
"else:\n",
" df = pd.read_csv(\"VAH.csv\")\n",
" cols = df.columns\n",
" plt.plot(df[cols[0]]*1e-3, df[cols[1]]*1e-1, marker=\".\", lw=1, markersize=3, ls=\"--\", color=\"C2\", label=\"Ручные измерения\")\n",
" \n",
"plt.xlabel(fr\"Напряжение, кВ\")\n",
"plt.ylabel(fr\"Сила тока, мкА\")\n",
2023-09-29 13:25:15 +03:00
"# plt.yscale(\"log\")\n",
"\n",
"plt.legend()\n",
2023-09-29 12:46:12 +03:00
"plt.savefig(\"all-VAH.png\")\n",
2023-09-29 13:25:15 +03:00
"plt.show()"
]
},
2023-09-29 12:46:12 +03:00
{
"cell_type": "markdown",
"id": "8c61ec35-5368-4a1c-8708-9f5b08d969f7",
"metadata": {},
"source": [
"### Прямые с осциллографа"
]
},
2023-09-29 13:25:15 +03:00
{
"cell_type": "code",
2023-10-07 19:38:12 +03:00
"execution_count": 16,
2023-09-29 13:25:15 +03:00
"id": "f964e34e-f019-49d3-9815-86764aad6a64",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2023-09-29 12:46:12 +03:00
"0: k= -10.50\tb= -15.26\n",
"1: k= -7.50\tb= -17.57\n"
2023-09-29 13:25:15 +03:00
]
},
{
"data": {
2023-09-29 13:50:41 +03:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABE0AAAL1CAYAAAAy1hoDAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAB7CAAAewgFu0HU+AADrrUlEQVR4nOz9a1BbZ74u+j5j6MLdiLu52CDJmGDj2AjfYrsvicXM7Nmkq9ZsEc9Tdq19PsxAen48u9u01zrVSbpqTzfu3vtrItJ7Ve1V9qndhtXrnBlm90yDk07HdnxBAts4xMaS8AVjGwPC2AaENMb5oEjhIgkJhCTg+VVRIYNXY/w1NDAaj96LIMuyDCIiIiIiIiIimkOMdwFERERERERERImIoQkRERERERERUQAMTYiIiIiIiIiIAmBoQkREREREREQUAEMTIiIiIiIiIqIAGJoQEREREREREQXA0ISIiIiIiIiIKABlvAug9eXp06f49NNPUVZWhpSUlHiXQ0RERERERGvc5OQkBgYG8OabbyI3NzeixzI0oZj69NNPcezYsXiXQUREREREROvM6dOncfTo0Ygew9CEYqqsrAyA92KtrKyc87O+vj4cO3Ys4M8SQSLXx9qWLpHrS+TagMSuj7UtXSLXl8i1AYldH2tbukSuL5FrAxK7Pta2dIlcXyLXBiR2fYlcG7D8+nyP992PRoKhCcWUb0hOZWUlDAZDwDahfpYIErk+1rZ0iVxfItcGJHZ9rG3pErm+RK4NSOz6WNvSJXJ9iVwbkNj1sbalS+T6Erk2ILHrS+TagOXXt5QpIjgRLBERERERERFRAAxNKGEUFhbivff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76lwif/zo0Njaiq6vLv2+NRgOHw7HotdnZ2Yn6+nr/uQh1HuLxO7yU40fz9YjWdWk2m2G1WnH48GE4nU7/42f/m+O7Vmtra2G326HRaHDu3LnVv5y7TBRDFotFBiBbLJZ4lxLQtPWG7PzlSXm0ocn/5TxxUp623lj0se6no/LUhavyy3/7izz1xSXZ/WhYliQpBlUTEdF61HPnsWxsOrvoV8+dx/EuNSaam5tlABG/z/A9xmg0hmzX2toqazQa+fjx43O2d3R0yADkhoaGBe1n19TQ0CAfP35cNpvNc9pZLBZZo9HIOp0uZN1Go1EGIJtMpgU/Gxsbk3U6nQxAbm5uDvj4hoaGBTWOjY3599vR0RH02LPbGY1GeWxsLGAb33MNta9I2Gw22WAwyDqdTrbZbHN+1tHREfScxfu1MhgMi15TvvNpMBgC/jxe51yWl1e/ryaNRiO3trYGfOzx48dlAAFfV1n2Xqu+Gua/hoE0NDTIGo1m0d/9eF8XkR7fJxrXUzT3YzKZQtY7u02gf6/iZTn3oQxNKKYSPTSRZVmWPB7Z9c0defpyt+z65o4seTwRPd49PCJPnb/iDU++vCy7HzM8ISKi6DvXfTes0ORc9914lxoTKxmatLa2hrwBMJvNMoAFN1Oy7L2hW6wu3/sjAAFvImX5uxvNYDcqofYRKmCQZdkfuAQ79uznEIqvTaAb/EjZbDb/zXegusbGxmSTybTg5i4RXivffkLdVPrOebA28Tjn84+9lPp9ocliv4O+G/hAN+fNzc3+10mj0YTcj81mk81ms7+eYOch3tdFNI4f6vWIVpvFrstw9uMLgRbbT6wt5z6UffOJ5vGteqPeuwuqCn3EQ1gUudlQH9gN9X4DAAGuy91wXeiCZ3gEcrA+1ERERBHKyUiOajsKzNdNHkDQsfq+YQCBxvz7hhYYjcagXdQNBoO/a399ff2S6pw98eLsLvYA0NHRAbvdjpqamjnDOXx8wwJ8Qw7m8w1BiOV8BI2NjQC85zzQpJI
2023-09-29 13:25:15 +03:00
"text/plain": [
"<Figure size 1200x800 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"opt_arr = []\n",
"for num, (ex_name, line) in enumerate(zip(experiment_names, ex_result)):\n",
2023-09-29 12:46:12 +03:00
" x = 1e3 / line[\"Voltage\"]\n",
2023-09-29 13:25:15 +03:00
" y = np.log(line[\"Current\"]) - 2 * np.log(line[\"Voltage\"])\n",
2023-09-15 23:46:38 +03:00
" \n",
2023-09-29 13:25:15 +03:00
" popt, pcov = curve_fit(line_func, x, y)\n",
" print(f\"{num}: k= {popt[0]:.2f}\\tb= {popt[1]:.2f}\")\n",
" opt_arr.append(popt)\n",
2023-09-15 23:46:38 +03:00
" \n",
2023-09-29 13:25:15 +03:00
" plt.plot(x, y, ls=\"\", marker=\".\", markersize=5, color=f\"C{num}\", label=ex_name)\n",
" plt.plot(x, line_func(x, *popt), lw=0.5, alpha=.5, color=f\"C{num}\")\n",
"\n",
2023-09-29 13:41:43 +03:00
"plt.xlabel(r\"$\\dfrac {10^3} U$, у.е.\")\n",
"plt.ylabel(r\"$\\log \\dfrac I {U^2}$, у.е.\")\n",
2023-09-15 23:46:38 +03:00
"\n",
"plt.legend()\n",
2023-09-29 12:46:12 +03:00
"plt.savefig(\"osc-NORDGAME-FAULER.png\")\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "bb204b4f-dc40-4da5-bb0f-465162d6460f",
"metadata": {},
"source": [
"### Прямая ручная"
]
},
{
"cell_type": "code",
2023-10-07 19:38:12 +03:00
"execution_count": 17,
2023-09-29 12:46:12 +03:00
"id": "6b0c2a09-1033-43c5-baa4-02616c6bdb91",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1: k= -11.41\tb= -14.52\n"
]
},
{
"data": {
2023-09-29 13:50:41 +03:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABEkAAAL2CAYAAAC9qcjXAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgi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hbEjHAQAARBqLxRK87fV6zQsCYExyuVzBz5wFBQWDvi5mGDMBfSovL1dGRoYkyWq1mpxm6GbEJoV0HAAAGL0Gu18ZekpMTJTf7zc7BoAxqqioSGvXrpX040qGwRZKKJLAFBkZGaN249bBWJGSqdlxs/pdcpMcZ9WKlMwRTAUAAEJt56Hdeqb6hR7/zU+Os+rJ7MfZoH0APp8veLu/jV4BYDhYrdbr+kKe5TZAL37ovKRPTzWoK9DV6+PRUdH6ffa/yZDR6+OGDD2Z/TjfMgEAEMa6T7K7+kuREx2temx7sXYe2m1SstHP4/EEbxcWFvZYegMAoxlFEqAXR9uPa1fjHlUe2KFz37b3OiZ34Wr9cd1WzY6b1eP+5Dgrx/8CABDmOMnuxnSfaON0OnvsP+fxeJSTkyPDMHr8ycnJ6dF50j3HlWPS0tJUWVkpv9+v/Px8ORyOHo87HA7l5+cHr+9vjN/vH/F5erN169Zrno+EhATl5+ersrLymvF+v19FRUXBuXNycpSTk9Pr2KEI5XPhcDjk8/lUVlamnJwc5efnB7N2j+0tb/fvdeXzMJjlWh6PRwkJCT3eS2VlZX3+noN9/rp/17S0NCUkJATf05WVlcHruve7GOzmxIP9+aPtPX41r9eroqKiYP7u1zg/P7/HazHQ6zFqBYARVFd
2023-09-29 12:46:12 +03:00
"text/plain": [
"<Figure size 1200x800 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"df = pd.read_csv(\"VAH.csv\")\n",
"cols = df.columns\n",
"\n",
"volt_h = df[cols[0]]\n",
"curr_h = df[cols[1]]*1e-7\n",
"\n",
"x = 1e3 / volt_h\n",
"y = np.log(curr_h) - 2 * np.log(volt_h)\n",
"\n",
"popt, pcov = curve_fit(line_func, x, y)\n",
"print(f\"{num}: k= {popt[0]:.2f}\\tb= {popt[1]:.2f}\")\n",
"opt_arr.append(popt)\n",
"\n",
"plt.plot(x, y, ls=\"\", marker=\".\", markersize=5, color=f\"C2\", label=\"Ручные измерения\")\n",
"plt.plot(x, line_func(x, *popt), lw=0.5, alpha=.5, color=f\"C2\")\n",
"\n",
2023-09-29 13:41:43 +03:00
"plt.xlabel(r\"$\\dfrac {10^3} U$, у.е.\")\n",
"plt.ylabel(r\"$\\log \\dfrac I {U^2}$, у.е.\")\n",
2023-09-29 12:46:12 +03:00
"\n",
"plt.legend()\n",
"plt.savefig(\"hand-NORDGAME-FAULER.png\")\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "a212083d-2d53-4522-860d-8eba58766461",
"metadata": {},
"source": [
"### Все вместе"
]
},
{
"cell_type": "code",
2023-10-07 19:38:12 +03:00
"execution_count": 18,
2023-09-29 12:46:12 +03:00
"id": "d668aa7a-0a40-475b-9876-698f4bc62c0a",
"metadata": {},
"outputs": [
{
"data": {
2023-09-29 13:50:41 +03:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABEkAAAL1CAYAAAA7Pbp5AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAB7CAAAewgFu0HU+AAEAAElEQVR4nOzdeXzT9f0H8Nc36ZGepKUClUNI8SgKalI8QAEltfXCwVLxqJtOaXVz89hsBTeBbYqpm7rNTVt0P7fh2YoOpxwJcih4kEQBFTwakKscpU3vpG3y/f1Rv1+aNknTNm16vJ6PRx7i9/M93t+jbT7v7+cQRFEUQUREREREREQ0zCnCHQARERERERER0UDAJAkREREREREREZgkISIiIiIiIiICwCQJEREREREREREAJkmIiIiIiIiIiAAwSUJEREREREREBIBJEiIiIiIiIiIiAEBEuAOg4aWyshLr16/HxIkTERMTE+5wiIiIiIiIaIhramrC/v37kZWVhZSUlIDrMklC/Wr9+vXIzc0NdxhEREREREQ0zKxatQq33nprwHWYJKF+NXHiRABtD2d6enrAdffs2YPc3Nyg1u1rjGXgxjGQYhkocTCWgR3HQIploMQxkGIZKHEwloEdx0CKZaDEwVgGdhwDKZaBEgdjGdhxhD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XLVqVdB/Hzi7DYVFbm4udDoddDrdoJ0/OxAhKhLRsy9B4h9+g9ifLYTi9NFymefIMTT+83XUPvpnuLZ8DLGlJYyRduY+Vommt9ahfuUraHprHdzHKsMdEhER+TE
2023-09-29 12:46:12 +03:00
"text/plain": [
"<Figure size 1200x800 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"for num, (ex_name, line) in enumerate(zip(experiment_names, ex_result)):\n",
" x = 1e3 / line[\"Voltage\"]\n",
" y = np.log(line[\"Current\"]) - 2 * np.log(line[\"Voltage\"])\n",
" \n",
2023-09-29 13:41:43 +03:00
" plt.plot(x, y, ls=\"\", marker=\".\", markersize=4, color=f\"C{num}\", label=ex_name)\n",
" plt.plot(x, line_func(x, *(opt_arr[num])), lw=1, color=f\"C{num}\")\n",
2023-09-29 12:46:12 +03:00
"else:\n",
" x = 1e3 / volt_h\n",
" y = np.log(curr_h) - 2 * np.log(volt_h)\n",
"\n",
2023-09-29 13:41:43 +03:00
" plt.plot(x, y, ls=\"\", marker=\".\", markersize=4, color=f\"C2\", label=\"Ручные измерения\")\n",
" plt.plot(x, line_func(x, *(opt_arr[-1])), lw=1, color=f\"C2\")\n",
2023-09-29 12:46:12 +03:00
" \n",
2023-09-29 13:41:43 +03:00
"plt.xlabel(r\"$\\dfrac {10^3} U$, у.е.\")\n",
"plt.ylabel(r\"$\\log \\dfrac I {U^2}$, у.е.\")\n",
2023-09-29 12:46:12 +03:00
"\n",
"plt.legend()\n",
"plt.savefig(\"osc-NORDGAME-FAULER.png\")\n",
2023-09-15 23:46:38 +03:00
"plt.show()"
]
},
2023-09-29 13:25:15 +03:00
{
"cell_type": "markdown",
"id": "31fee377-ff25-4382-8f41-228790745a73",
"metadata": {},
"source": [
"Угол наклона полученной прямой получается по формуле\n",
"\n",
"$\\tan \\alpha = -0.683 \\cdot \\dfrac {\\phi^\\frac 3 2} \\beta$\n",
"\n",
"зная $\\phi = 4.5$ эВ -- работу выхода, находим $\\beta$ -- форм-фактор острия:"
]
},
2023-09-15 23:46:38 +03:00
{
"cell_type": "code",
2023-10-07 19:38:12 +03:00
"execution_count": 19,
2023-09-29 13:25:15 +03:00
"id": "21ac3719-9a57-4f80-9858-fc3c018fb1ad",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2023-09-29 13:41:43 +03:00
"beta:\t6.21e-01\n",
"beta:\t8.69e-01\n",
"beta:\t5.71e-01\n"
2023-09-29 13:25:15 +03:00
]
}
],
"source": [
"for opt in opt_arr:\n",
" tan_a = opt[0]\n",
" beta = -0.683 * (4.5**(3/2)) / tan_a\n",
2023-09-29 12:46:12 +03:00
" print(f\"beta:\\t{beta:.2e}\")"
2023-09-29 13:25:15 +03:00
]
},
2023-09-29 13:41:43 +03:00
{
"cell_type": "markdown",
"id": "d030c573-6440-4bcc-bab6-2887bd67624d",
"metadata": {},
"source": [
"# тоже самое, но для каждого файла в отдельности"
]
},
{
"cell_type": "code",
2023-10-07 19:38:12 +03:00
"execution_count": 20,
2023-09-29 13:41:43 +03:00
"id": "9e61c01d-77b7-4984-b906-68f55031aed4",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['RISING-1.csv',\n",
" 'RISING-2.csv',\n",
" 'RISING-3.csv',\n",
" 'RISING-4.csv',\n",
" 'RISING-5.csv',\n",
" 'BOTH-1.csv',\n",
" 'BOTH-2.csv',\n",
" 'BOTH-3.csv']"
]
},
2023-10-07 19:38:12 +03:00
"execution_count": 20,
2023-09-29 13:41:43 +03:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"file_names = [f\"RISING-{i}.csv\" for i in range(1, 6)] + [f\"BOTH-{i}.csv\" for i in range(1, 4)]\n",
"file_names"
]
},
{
"cell_type": "code",
2023-10-07 19:38:12 +03:00
"execution_count": 21,
2023-09-29 13:41:43 +03:00
"id": "cef56c78-13e9-435f-b84e-9549f195e647",
"metadata": {},
"outputs": [],
"source": [
"U_min = 900\n",
"R = 26.99e3 # Ом\n",
"\n",
"column_names = [\"Voltage\", \"Current\"]\n",
"dots_result = []\n",
"\n",
"for num, f_name in enumerate(file_names):\n",
" result = pd.DataFrame(columns=column_names)\n",
"\n",
" df = pd.read_csv(f_name, header = None)\n",
" df = df.loc[lambda x : x[4] > U_min]\n",
"\n",
" U = df[4] # В\n",
" U_cur = df[10]\n",
" I = U_cur / R # А\n",
"\n",
" result = pd.concat([result, pd.concat(dict(zip(column_names, [U, I])), axis=1)], ignore_index=True)\n",
" \n",
" result[\"Current\"] -= min(result[\"Current\"])\n",
" dots_result.append(result.groupby(\"Voltage\").mean().reset_index())"
]
},
{
"cell_type": "code",
2023-10-07 19:38:12 +03:00
"execution_count": 22,
2023-09-29 13:41:43 +03:00
"id": "ec61c33d-578b-45e4-9146-049724620a32",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0: k= -15.31\tb= -11.32\n",
"1: k= -10.81\tb= -14.96\n",
"2: k= -15.25\tb= -11.58\n",
"3: k= -10.82\tb= -15.03\n",
"4: k= -7.69\tb= -17.53\n",
"5: k= -7.45\tb= -17.89\n",
"6: k= -7.95\tb= -17.49\n",
"7: k= -7.96\tb= -17.50\n"
]
},
{
"data": {
2023-09-29 13:50:41 +03:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABE0AAAL1CAYAAAAy1hoDAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAB7CAAAewgFu0HU+AAEAAElEQVR4nOzdeXxU9b3/8deZfZLJZCbJTFYCSUggEAIkoGyKCLhU3Fqx9kqtbdXo7e399ba9cr3tVbS9t8XW9ra2V8EutsVqgdaquBUQFwQUCAiRQAIJSyB7ZpJMMvuc3x+RwJBt2CN+no+HjybnfM8530lJYN75fj8fRVVVFSGEEEIIIYQQQggRRXOxJyCEEEIIIYQQQggxHEloIoQQQgghhBBCCNEPCU2EEEIII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e42raaNs9xFCCCGEEEIMWxKaCAEoipbZo2cSqvwZm81f6adg6h+ZXXj9aa2AOJPA41ThiEpFbTOtnT6SE0wU5TjQamIPXhL1sY21DvCTQFEU4hPHkJw2Z8jQBKC7Yx/dHfv6HNfqraSNXEjaqDt6j7maNlKz6zE4ZSOTbPcRQgghhBBCDBcSmoiLorKysvfj9PR00tPTL+Jsetids5gL5Fc9xuFQcm9r3mxdG9mFZRf8DfzGiqM8tWYnTe7u3mOptjjuXzCJWUWZMd0j36IjyaAZtDAtwMaWAKPi9Zi0/YcsekNy7BPvRzjYAScFTqoa5si+X3NqYHLCmW/3EUIIIYQQQoj6+nrq6+uB6Pefp0tCE3FRLFq0qPfjRx55hCVLlly8yZzE7pyFzTGd3HNQY+NsVolsrDjKY89tQj0lU2h
2023-09-29 13:41:43 +03:00
"text/plain": [
"<Figure size 1200x800 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"opt_arr = []\n",
"for num, (f_name, line) in enumerate(zip(file_names, dots_result)):\n",
" x = 1e3 / line[\"Voltage\"]\n",
" y = np.log(line[\"Current\"]) - 2 * np.log(line[\"Voltage\"])\n",
" \n",
" popt, pcov = curve_fit(line_func, x, y)\n",
" print(f\"{num}: k= {popt[0]:.2f}\\tb= {popt[1]:.2f}\")\n",
" opt_arr.append(popt)\n",
" \n",
2023-09-29 13:50:41 +03:00
" plt.plot(x, y, ls=\"--\", marker=\".\", markersize=5, color=f\"C{num}\", label=f_name)\n",
" # plt.plot(x, line_func(x, *popt), lw=0.5, alpha=.5, color=f\"C{num}\")\n",
2023-09-29 13:41:43 +03:00
"\n",
"plt.xlabel(r\"$\\dfrac {10^3} U$, у.е.\")\n",
"plt.ylabel(r\"$\\log \\dfrac I {U^2}$, у.е.\")\n",
"\n",
"plt.legend()\n",
"plt.savefig(\"separ-NORDGAME-FAULER.png\")\n",
"plt.show()"
]
},
2023-09-29 13:25:15 +03:00
{
"cell_type": "code",
2023-10-07 19:38:12 +03:00
"execution_count": 23,
2023-09-29 13:41:43 +03:00
"id": "285e6509-6d8b-4235-8fc8-1134142e685d",
"metadata": {},
"outputs": [],
"source": [
"opt_arr = np.array(opt_arr)\n",
"k_arr = opt_arr.T[0]\n",
"b_arr = opt_arr.T[1]"
]
},
2023-10-07 19:38:12 +03:00
{
"cell_type": "code",
"execution_count": 53,
"id": "90c41f99-6ee6-43e1-abd5-9957a1df13ff",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\\begin{tabular}{rrrrrrrr}\n",
"\\hline\n",
" -15.31 & -10.81 & -15.25 & -10.82 & -7.69 & -7.45 & -7.95 & -7.96 \\\\\n",
" -11.32 & -14.96 & -11.58 & -15.03 & -17.53 & -17.89 & -17.49 & -17.50 \\\\\n",
"\\hline\n",
"\\end{tabular}\n"
]
}
],
"source": [
"from tabulate import tabulate\n",
"print(tabulate(opt_arr.T, tablefmt=\"latex\", floatfmt=\".2f\"))"
]
},
2023-09-29 13:41:43 +03:00
{
"cell_type": "markdown",
"id": "4b8623ef-91d3-455d-9093-8c2a60201356",
"metadata": {},
"source": [
2023-09-29 13:50:41 +03:00
"### Первый и второй случаи (b от ln -k)"
2023-09-29 13:41:43 +03:00
]
},
{
"cell_type": "code",
2023-10-07 19:38:12 +03:00
"execution_count": 54,
2023-09-29 13:41:43 +03:00
"id": "5af98fb6-4675-493e-aad6-19a8810a096a",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"k= 8.97\tb= -36.05\n"
]
},
{
"data": {
2023-09-29 13:50:41 +03:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABCIAAALVCAYAAAAVlkDIAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAB7CAAAewgFu0HU+AAB/IklEQVR4nO39a3Rb933n/35g2Y4tx9aGZNmBbxEBOw5sNZYBKld30l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j+jtXO2cYhqGTJ0/21WmPAADYzkJPKhQKliSrUCi4XUrbnX76JSuSPLHuz+mnX3K7VEekUilL0qr9H4lELMMwavctLCxsav2FQsHy+/3WyMjIqvtGR0ctwzCsXC637PaFhQVLkuX3+63R0dFV2x4ZGbEkWdlstuF2FxYWrFAoZEmy0un0qu36/f7aNmKx2LJtFAoFyzAMy+/3N31NOLGN6vojkUjDZSKRiCXJCoVCXbOebDZrGYZhjY6OLrs9l8tZktb8e7GrBkmrtlu9XdKqv8d0Om1Jskql0obrWEs2m61ta+U6N6taSywWa7hMLBZr+Jxks9ll7wUjIyPW6Ojoqr/rVv5uFxYWas9/JBJZ872j+hpf6/muNzIyUvvd1tpnay1ffd9q9rrazPtSvepz2ezvtLpMs30CAEC/a/U4lPad6HrnXn/H1uV6UTQaVSKRWPbt7mZGReTzeYXDYcVisTXb2KVSKaVSKUWjUWUymVX3J5PJNYcyp9NpjYyMKB6Pa3JyctXjTNPUwMCAisWicrncqm9DU6lU7dvJ+fl5ZbPZZdsIhUIqFAqan59XOBxe9g22k9u
2023-09-29 13:41:43 +03:00
"text/plain": [
"<Figure size 1200x800 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"x = np.log(-k_arr)\n",
"y = b_arr\n",
"\n",
"popt, pcov = curve_fit(line_func, x, y)\n",
"print(f\"k= {popt[0]:.2f}\\tb= {popt[1]:.2f}\")\n",
"\n",
"plt.plot(x, y, ls=\"\", marker=\".\", markersize=5, color=f\"C0\", label=\"Коэффициенты прямой\")\n",
"plt.plot(x, line_func(x, *popt), lw=0.5, alpha=.5, color=f\"C0\")\n",
"\n",
"plt.xlabel(r\"$b$, у.е.\")\n",
"plt.ylabel(r\"$\\log -k$, у.е.\")\n",
"\n",
"plt.legend()\n",
"plt.savefig(\"separ-1-KOEF.png\")\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "9591a07f-d002-4b3c-b329-cfc1823e5080",
"metadata": {},
"source": [
"### Третий случай (b + 2 * log(-k) от exp(-b / 2))"
]
},
{
"cell_type": "code",
2023-10-07 19:38:12 +03:00
"execution_count": 55,
2023-09-29 13:41:43 +03:00
"id": "0202a50a-02d6-40dd-8d79-854d179273e4",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"k= -0.00\tb= -6.90\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABD4AAALPCAYAAACKSQBTAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAB7CAAAewgFu0HU+AACfL0lEQVR4nOz9e1hU973/f7/WDKAih+HsiArMgAYxUQdMGpP0oDNNm2an3Q3E7l+t9x+7Qvf+7752A7F/bM2+7mtH3O11/7cTSPYft7XfbxNM27TpIRk0aXOOzKjxgAoz4BEFhfF8hLn/yGaKCgg4sGB4Pq7LK7BmzVovhoGw3uvzeX+McDgcFgAAAAAAQAyymB0AAAAAAABgvFD4AAAAAAAAMYvCBwAAAAAAiFkUPgAAAAAAQMyi8AEAAAAAAGIWhQ8AAAAAABCzKHwAAAAAAICYReEDAAAAAADErDizA2B8nD17Vu+8847y8/M1a9Yss+MAAAAAAGLc1atX1d7erieffFKZmZlmx4mg8BGj3nnnHa1du9bsGAAAAACAaWbbtm364Q9/aHaMCAofMSo/P1/Sl2+44uLiQfdpbm7W2rVrh91nrDh2bBx7Kmbm2Bw7lo89FTNzbI5t9rGnYmaOzbFj+dhTMTPHHvmx+7f1X49OFhQ+YlT/9Jbi4mK5XK5h9x3JPmPFsWPj2FMxM8fm2LF87KmYmWNzbLOPPRUzc2yOHcvHnoqZOfbIjz3Z2i3Q3BQAAAAAAMQsRnzEuObm5sjHdrtddrt9Qs5rt9u1cePGcTkfx544U/X1mKrHHk9T9TWZqsceL1P19Ziqxx5PU/U1marHHi9T9fWYqsceT1P1NZmqxx4vU/X1mKrH7tfV1SW/3y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VVqa6uTn6/Xy+99FJk9ER3d7fKyspUU1Mzojuq9fX1qqurUygUksPhiKzUN9DAcwSDQdlsNrnd7hGvWhPtc4RCIa1fv17BYDCy1LD05d+wDodDDQ0Nkr4ciTPUPq+++qokTarj3Pl97r+QbGpqksPhiHyPq6qqVF5ePi6vic1mU1pamkKhkGw2m8rKymSz2eT3+yPvzf7vTf/3qn97T0/PiF+LwWzZskVer/euRRXcbrfWrFlz19d8L0O9Jm63+66fje7ubm3fvn3I16T/dQuFQuru7o6s2rR9+/bIBX13d7ckac2aNSNqbuz3+yMNQPu/1n6NjY23jYhyu923FVirqqrU1NQU+bpsNtuIeiz2/77qP/adx73TaH4v2Wy2yO+k1atXR37e71y5pf9r7l/ZxWazaceOHdz0HkoYt/F6veGGhoao/PP5fHcdv6GhISwpLCkcCASGzeJwOMKSwg6HY9Rfh8/nC0saNMNkdau3L7yn9Ux4x+6j4T2tZ8K3evvMjgQAwJjtaT0Tdte8cc9/e1rPmB11QtTW1kb+Bhr494nb7Q7bbLbIYz09PWM6vs/nCzscjnBlZeVdj1VXV4dtNlvY6/Xetr2npyfyt1Z1dfVd566srAxLCjc0NAx53p6enrDL5QpLCtfV1d113oF/z5WXl992Dp/PF7bZbGGHwzHs32wTcY7+47vd7iH3cbvdYUlhl8s1ZY7T0NAQttls4erq6tu2e73esKRB3y/RyiDprvP2b5d01/uxrq5u0GuEkeQYzGiuO0aqP0t5efmQ+5SXlw/5mjQ0NNz2u6CysjJcXV191/t6JO/bnp6eyOvvdrsH/d3R/zM+2Os9UGVlZeRrG+x7Ntj+/b+3hvu5GsvvpYH6X8vh3qf9+wz3PZlIk/U6lMLHBAsEAoP+T38w/T9Mw/0yH8pkfcMN5YN9J8L/z0tv3/aH4A9fejv8wb4TZkcDAGBMduw+OqLCx47dR82OOiEGK3y43e5wQ0ND5CJ0LBd34fD
"text/plain": [
"<Figure size 1200x800 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"x = np.exp(-b_arr / 2)\n",
"y = b_arr + 2 * np.log(-k_arr)\n",
"\n",
"popt, pcov = curve_fit(line_func, x, y)\n",
"print(f\"k= {popt[0]:.2f}\\tb= {popt[1]:.2f}\")\n",
"\n",
"plt.plot(x, y, ls=\"\", marker=\".\", markersize=5, color=f\"C0\", label=\"Коэффициенты прямой\")\n",
"plt.plot(x, line_func(x, *popt), lw=0.5, alpha=.5, color=f\"C0\")\n",
"\n",
"plt.xlabel(r\"$\\exp{-b / 2}$, у.е.\")\n",
"plt.ylabel(r\"$b + 2\\log{-k}$, у.е.\")\n",
"\n",
"plt.legend()\n",
"plt.savefig(\"separ-3-KOEF.png\")\n",
"plt.show()"
]
},
{
"cell_type": "code",
2023-10-07 19:38:12 +03:00
"execution_count": 56,
2023-09-15 23:46:38 +03:00
"id": "8dfd4820-1065-4364-abe3-498825506a74",
"metadata": {},
"outputs": [
{
"data": {
2023-09-29 12:46:12 +03:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABBgAAALWCAYAAADs0yCXAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAB7CAAAewgFu0HU+AAEAAElEQVR4nOz9e3jc533feb9/pzkDGAxASiApiQfJEhTJsUDJthzHji3CTuKE2zZElLb8Y5snJuJ2/ex2W5NmepCUtpGppNvd9aYRKK+zz3XxShoBsbdynMQibceOHckiAcuWIko2CepEgiKBwRCY8+/0/DEABBAHzoAgQYKf13XBmpnf/Z3vbwD6j/s79/29jTAMQ0RERERERERELoO52jcgIiIiIiIiItc/FRhERERERERE5LKpwCAiIiIiIiIil00FBhERERERERG5bCowiIiIiIiIiMhlU4FBRERERERERC6bCgwiIiIiIiIictlUYBARERERERGRy6YCg4iIiIiIiIhcNhUYREREREREROSy2at9A1dCLpfj8ccfZ2hoCIBsNgvAjh072L9/P+l0etHY3t5estksDz/8MF1dXWzdunXmPYeHh/mz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xTOa4FOqbyOnX8+PGZxx0dHXR0dKzi3YiIiIiIiFy/7t3SzvlckY2ZFKezeY6/NU5rMko0YlGp+lOrDgI2ZlKkYhHu3dJ+TeZYSSMjI4yMjABz559LUYHhOrV79+6Zx4888giPPvro6t2MiIiIiIjIVVItVylOFAj8ANM
2023-09-15 23:46:38 +03:00
"text/plain": [
2023-09-29 13:25:15 +03:00
"<Figure size 1200x800 with 1 Axes>"
2023-09-15 23:46:38 +03:00
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
2023-09-29 13:25:15 +03:00
"idx = 900\n",
2023-09-15 23:46:38 +03:00
"U_min = 800\n",
"\n",
"for i in range(1, 4):\n",
" df = pd.read_csv(f\"BOTH-{i}.csv\", header = None)\n",
2023-09-29 13:25:15 +03:00
" data = [None, None]\n",
2023-09-15 23:46:38 +03:00
" df = df.loc[lambda x : x[4] > U_min]\n",
" \n",
2023-09-29 13:25:15 +03:00
" data[0] = df.loc[lambda x : x.index < idx]\n",
" data[1] = df.loc[lambda x : x.index >= idx]\n",
2023-09-15 23:46:38 +03:00
" \n",
2023-09-29 13:25:15 +03:00
" for (i, d) in enumerate(data):\n",
" U = d[4] * 1e-3 # кВ\n",
" U_res = d[10]\n",
" R = 26.99e3 # Ом\n",
" I = U_res / R * 1e6 # мкА\n",
"\n",
" plt.plot(U, I, lw=5, alpha=0.2, ls=\"\", marker=\"o\", markersize=4, color=f\"C{i}\")\n",
2023-09-15 23:46:38 +03:00
" \n",
" \n",
"plt.xlabel(fr\"Напряжение, кВ\")\n",
"plt.ylabel(fr\"Сила тока, мкА\")\n",
"# plt.yscale(\"log\")\n",
"\n",
2023-09-29 13:41:43 +03:00
"plt.savefig(\"all-VAH-BOTH.png\")\n",
2023-09-15 23:46:38 +03:00
"plt.show()"
]
2023-10-07 19:38:12 +03:00
},
{
"cell_type": "code",
"execution_count": null,
"id": "d2dc3e7e-c3bd-4dfe-9b14-26e190916c39",
"metadata": {},
"outputs": [],
"source": []
2023-09-15 23:46:38 +03:00
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}