mirror of
https://github.com/galera951/experiment-automation.git
synced 2024-11-14 18:05:53 +03:00
202 lines
47 KiB
Plaintext
202 lines
47 KiB
Plaintext
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 14,
|
||
|
"id": "a21511dc-d48d-4171-bf38-7ed030488d14",
|
||
|
"metadata": {
|
||
|
"tags": []
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"# %load ../processing_tools.py\n",
|
||
|
"import numpy as np\n",
|
||
|
"from scipy.optimize import curve_fit\n",
|
||
|
"import pandas as pd\n",
|
||
|
"\n",
|
||
|
"def line(x, k, b):\n",
|
||
|
" return k * x + b\n",
|
||
|
"\n",
|
||
|
"import matplotlib.pyplot as plt\n",
|
||
|
"import matplotlib\n",
|
||
|
"import scienceplots\n",
|
||
|
"\n",
|
||
|
"plt.style.use(['science', 'russian-font'])\n",
|
||
|
"\n",
|
||
|
"matplotlib.rcParams.update({\n",
|
||
|
" 'figure.figsize': [6, 4],\n",
|
||
|
" 'savefig.facecolor': 'white',\n",
|
||
|
" 'figure.dpi': 150.0,\n",
|
||
|
" 'font.size': 12.0,\n",
|
||
|
"})\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 10,
|
||
|
"id": "ebe7c967-eed8-4701-80a5-3f276e07347b",
|
||
|
"metadata": {
|
||
|
"tags": []
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"h = np.array([10, 20, 40]) # mm\n",
|
||
|
"ds = np.array([0, 1, 3]) # mm"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 19,
|
||
|
"id": "549aff15-dfb2-48b0-9802-f33cbfd7c3f5",
|
||
|
"metadata": {
|
||
|
"tags": []
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"(k, b), _ = curve_fit(line, h**2, ds)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 16,
|
||
|
"id": "c6234bfd-5756-4422-a7c9-557be49f0e67",
|
||
|
"metadata": {
|
||
|
"tags": []
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"x = np.linspace(0, 1700, 100)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 28,
|
||
|
"id": "2160928d-976d-4dd2-9074-ce026fb1f801",
|
||
|
"metadata": {
|
||
|
"tags": []
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAxgAAAIbCAYAAABonjh+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy88F64QAAAACXBIWXMAABcSAAAXEgFnn9JSAACA/0lEQVR4nO3deVwTd/4/8BeJiceoBPDoaWXoYW8NePRuBXru1TbRdtvdXgLaY69WkLq2ttkWw3a32+1aBW277fZS0G53e5pgz21RIGqrrbYyau3hBQxoRAnJ/P7gl3xBQEMyYSbwej4ePB6STD7zzmfGYd7zuRIURVFARERERESkAoPWARARERERUd/BBIOIiIiIiFTDBIOIiIiIiFTDBIOIiIiIiFTDBIOIiIiIiFQzQOsA4kkgEIDX64XBYEBCQgIMBgOMRqPWYRERERERRcTv9yMQCEBRFAQCAQiCAIMhujYIJhg9cOjQIQwfPlzrMIiIiIiIYsLr9WLIkCFRlcEEowcGDGirLlmWYTKZwmrB8Pl8EAQBXq8XJpMpqv3rsSw9xqRmWXqMSc2y9BiTmmXpMSY1y9JjTGqWxZh6vyw9xqRmWXqMSc2y9BiTmmXpMSY1y9IqpmALhs/ng8ViCd3vRoMJRg8kJCQAAIYMGdLjA28ymaI+WfRclh5jUrMsPcakZll6jEnNsvQYk5pl6TEmNctiTL1flh5jUrMsPcakZll6jEnNsvQYk5pl9XZMwfd9Ph+A/7vfjQYHeceYwWDAww8/HHVfNrWpFZea30+vZalFj99PjzGpSa/fT4/HT016/H56jElNevx+ei1LLXr8fnqMSU16/X56PH5aS1AURdE6iHjh8/lgNpvR0tKiWmYZT/vvj1jn2mC99z7Wee9jnfc+1rk2WO+9L5I6V/M4xX+KREREREREusEEI470paazeME61wbrvfexznsf67z3sc61wXrvfVrXObtI9QCb+IiIiIioL2IXKSIiIiIi0iUmGEREREREpBomGEREREREpBomGEREREREpBqu5B2B4EqHBoMBRqNR42iIiIiIiCLj9/sRCARC97dqYAtGBARBgNlshsPh0DoUIiIiIqKIORwOmM1mCIKgWpmcprYHgtN3eb1emEwmtmAQERERUVxr34IhCIIq09Syi1QETCYT18EgIiIiorhnNBpVf2DOLlJERERERKQaJhhERERERKQaJhhERERERKQaJhhERERERDrQ0urXOgRVMMEgIiIiItKQrzWAP/9nIyYVvoXGgy1ahxM1ziJFRERERKSRjd82YNbSSqzf3gAAeO1/25CXfYbGUUWHCQYRERERUS/ztQbwlzc3ofiNTfD5A0gSzCi+NR3TLxyrdWhRY4JBRERERNSLPt/RgFlLKvH5t22tFtdZT8Lfbp+I4yyDNY5MHUwwiIiIiIh6QUurH3/+zyY88d9NaPUrSB46EE/8Kh22KacgISFB6/BUwwQjAj6fDwBgMBhUX/mQiIiIiPqe9dvrMWtJJTbulAEAP8s4GU/eloFRidq2Wvj9fgQCgdD9rRo4i1QEBEGA2WyGw+HQOhQiIiIi0rHDPj8eLd+Ay+e/h407ZaQMG4h/3n0RXrrvYs2TCwBwOBwwm80QBEG1MhMURVFUK62P8/l8MJvN8Hq9MJlMbMEgIiIiom7VSHWYtaQSX33fCAC4YdIYPPHrDIwcPkjjyP5P+xYMQRDQ0tICk8kUVZnsIhUBk8kUdcUTERERUd90qMWPon9/gb+99RUCioKRwwfhydsy8POJY7QOrROj0aj6A3MmGEREREREKlm7dR9mLanE1z82AQCmXXAKnLemY8Qw/bRaxBoTDCIiIiKiKDW3tOJPK77A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darVob7RlMG65JLVH+7j1UhGjEge
|
||
|
"text/plain": [
|
||
|
"<Figure size 900x600 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.scatter(h**2, ds)\n",
|
||
|
"plt.plot(x, line(x, k, b))\n",
|
||
|
"\n",
|
||
|
"plt.xlabel(r'Квадрат диаметра диафрагмы $h^2, \\text{мм}^2$')\n",
|
||
|
"plt.ylabel(r'Отклонение $\\delta s$, мм')\n",
|
||
|
"\n",
|
||
|
"plt.savefig('images/dSonH2.svg')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 32,
|
||
|
"id": "2f749ff7-6a94-4a4a-8339-ea843247e055",
|
||
|
"metadata": {
|
||
|
"tags": []
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"1.1904761904772945"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 32,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"line(625, k, b) - line(0, k, b)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 7,
|
||
|
"id": "5889dd05-8f4c-42a1-8c27-fe2b8fbcbea7",
|
||
|
"metadata": {
|
||
|
"tags": []
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"f_chr = 0.5e-3\n",
|
||
|
"f_D = 5e-2"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 8,
|
||
|
"id": "e350de8c-412c-4732-a65c-33220c837c19",
|
||
|
"metadata": {
|
||
|
"tags": []
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"nu = f_D / f_chr"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 9,
|
||
|
"id": "4e359270-52c7-47e4-ac2d-8685fb69d1d9",
|
||
|
"metadata": {
|
||
|
"tags": []
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"100.0"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 9,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"nu"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"id": "4cf6e3cb-a91f-4dd7-b1ac-efd0b15b32ab",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
}
|
||
|
],
|
||
|
"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.6"
|
||
|
}
|
||
|
},
|
||
|
"nbformat": 4,
|
||
|
"nbformat_minor": 5
|
||
|
}
|