Lugovtsov/6.11.5-tunnel-diode/plots.ipynb

139 lines
30 KiB
Plaintext
Raw Normal View History

2024-03-21 10:28:02 +03:00
{
"cells": [
{
"cell_type": "code",
2024-11-09 11:24:25 +03:00
"execution_count": 1,
2024-03-21 10:28:02 +03:00
"id": "65a1d145-551e-436d-977f-0b9e15aa66a3",
"metadata": {
"tags": []
},
"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",
"\n",
"matplotlib.rcParams.update({\n",
" 'figure.figsize': [6, 4],\n",
" 'savefig.facecolor': 'white',\n",
" 'figure.dpi': 150.0,\n",
" 'font.size': 12.0,\n",
2024-11-09 11:24:25 +03:00
"})"
2024-03-21 10:28:02 +03:00
]
},
{
"cell_type": "code",
2024-11-09 11:24:25 +03:00
"execution_count": 2,
2024-03-21 10:28:02 +03:00
"id": "027f3055-bd02-4cf0-9f6a-8ca35e6b36c8",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"df = pd.read_csv(\"data.csv\")\n",
"cols = df.columns\n",
"\n",
"U = df[cols[0]] # +- 0.01 mV\n",
"I = df[cols[1]] # +- 0.001 mA"
]
},
{
"cell_type": "code",
2024-11-09 11:24:25 +03:00
"execution_count": 4,
2024-03-21 10:28:02 +03:00
"id": "1a1b6e09-f30a-4e32-b1c3-1097d9d0295c",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
2024-11-09 11:24:25 +03:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAvoAAAIbCAYAAACaBzryAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAABcSAAAXEgFnn9JSAABRgUlEQVR4nO3dbXBbV57f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QAAANgsH330kS5fvly0bWVlRYZhFBxv6qBfimVZ6u7uVjAYVDQaLXtuLug/fvy44AdQrxH9a9eu6fXXX5fTySMRKI5+gkroI6gG/QTVoJ+0plIj+tu2bSsZ9Jt+6k4xO3fulCTF4/Gqv2bLli1FfwD14nQ6+WVCRfQTVEIfQTXoJ6gG/aS1FHutKr1+Tfvqjo+Pa8eOHbIsq+Q5Dx8+rGNFAAAAQOto2qA/MzOjRCKhRCJR0JYL+IcOHapzVQAAAEBraNqg7/P5Sj5sG4vFJEmBQKDeZQEAAAAtoWmD/vDwcMkni6PRqEzTXNfymgAAAEAnadqgb5qmdu3apfHx8TXHR0dHdevWrYqr7QAAAACdrKlX3RkZGVEsFtPw8LAePnyoRCIh0zR19+7dNRtoAQAAAFirqYO+JPn9fvn9/kaXAQAAALSUpp26AwAAAMC+ph/RR2u6s7isSzcs3X/wRHt3b9WxI6b27+lqdFkAAAAdg6CPmvv+v/oTnZn+ibLZXxx7/5PPde74YQ32djeuMAAAgA7C1B3U1Pf/1Z/onejakC9J6UxWb1+8qTuLy40pDAAAoMN0TNBPpVJKpVJKp9ONLqVt3Vlc1pnoT0q2pzNZTc1adaw
2024-03-21 10:28:02 +03:00
"text/plain": [
"<Figure size 900x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
2024-11-09 11:24:25 +03:00
"plt.errorbar(U, I, xerr=.01, yerr=.001, fmt=\".\")\n",
"plt.xlabel(\"Напряжение, мВ\")\n",
"plt.ylabel(\"Сила тока, мА\")\n",
"\n",
"im = plt.imread(\"vah-osc.jpg\")\n",
"# plt.imshow(im)\n",
"\n",
"plt.grid()\n",
"plt.savefig(\"vah.png\")\n",
"plt.show()"
2024-03-21 10:28:02 +03:00
]
},
{
"cell_type": "code",
2024-11-09 11:24:25 +03:00
"execution_count": 14,
2024-03-21 10:28:02 +03:00
"id": "048c8b91-5acd-4705-9989-a543d212c68c",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2024-11-09 11:24:25 +03:00
"xi = 170.3\n",
"En_max = 124.3\n"
2024-03-21 10:28:02 +03:00
]
}
],
"source": [
"Up = 46e-3\n",
"Ip = 4.8e-3\n",
"Uv = 340.6e-3\n",
"Iv = 0.5e-3\n",
"e = 1.6e-19\n",
"\n",
2024-11-09 11:24:25 +03:00
"xi = Uv/2\n",
"En_max = xi - Up\n",
"print(f\"xi = {xi*1e3:.1f}\\nEn_max = {En_max*1e3:.1f}\")"
2024-03-21 10:28:02 +03:00
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a4878798-dbe1-47f5-adae-cc6a2e58bf27",
"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.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}