Lugovtsov/4.3.2-light-difraction-liquid-ultrasonic/lab.ipynb

343 lines
126 KiB
Plaintext
Raw Normal View History

2023-02-28 13:50:28 +03:00
{
"cells": [
{
"cell_type": "code",
2023-09-15 14:01:17 +03:00
"execution_count": 1,
2023-02-28 13:50:28 +03:00
"id": "80b69570-3c97-4533-a6e0-f5e254110784",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"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",
2023-09-15 14:01:17 +03:00
"})"
2023-02-28 13:50:28 +03:00
]
},
{
"cell_type": "markdown",
"id": "287d428d-047c-4f87-a3d2-dd87b14ed429",
"metadata": {},
"source": [
"При увеличении частоты УЗ волн расстояние между полосами увеличивается"
]
},
2023-09-15 14:01:17 +03:00
{
"cell_type": "markdown",
"id": "d957de11-49fd-40a5-8788-54bde84a02dd",
"metadata": {},
"source": [
"## Первый способ"
]
},
2023-02-28 13:50:28 +03:00
{
"cell_type": "markdown",
"id": "212f0889-b035-48c6-a902-5e3696c27e61",
"metadata": {
"tags": []
},
"source": [
"**Расстояние между наиболее чёткими дифракционными картинами**"
]
},
{
"cell_type": "code",
2023-09-15 14:01:17 +03:00
"execution_count": 2,
2023-02-28 13:50:28 +03:00
"id": "8c92872b-c1dc-4c49-abdb-5a0542e1312c",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
2023-09-15 14:01:17 +03:00
"1568.356"
2023-02-28 13:50:28 +03:00
]
},
2023-09-15 14:01:17 +03:00
"execution_count": 2,
2023-02-28 13:50:28 +03:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Lambda = 50+38-14\n",
2023-09-15 14:01:17 +03:00
"Lambda = Lambda * 10 * 2 # в микронах удвоенное +- 2 микрона\n",
"\n",
2023-02-28 13:50:28 +03:00
"Lambda = Lambda * 1e-6 # длина УЗ волны в м\n",
2023-09-15 14:01:17 +03:00
"nu = 1.0597e6 # частота в Гц\n",
"\n",
"v = Lambda * nu # Скорость звука в воде по формуле (5)\n",
"v"
2023-02-28 13:50:28 +03:00
]
},
{
"cell_type": "code",
2023-09-15 14:01:17 +03:00
"execution_count": 5,
"id": "ecfa5265-d5d0-4194-94e1-82b48d7689b4",
"metadata": {},
2023-02-28 13:50:28 +03:00
"outputs": [
{
"data": {
"text/plain": [
2023-09-15 14:01:17 +03:00
"1480"
2023-02-28 13:50:28 +03:00
]
},
2023-09-15 14:01:17 +03:00
"execution_count": 5,
2023-02-28 13:50:28 +03:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
2023-09-15 14:01:17 +03:00
"Lambda = 50+38-14\n",
"Lambda = Lambda * 10 * 2 # в микронах удвоенное +- 2 микрона\n",
"Lambda"
2023-02-28 13:50:28 +03:00
]
},
{
"cell_type": "markdown",
2023-09-15 14:01:17 +03:00
"id": "d3f7247d-7b4c-4c6e-8ec5-88d9becaf144",
2023-02-28 13:50:28 +03:00
"metadata": {},
"source": [
2023-09-15 14:01:17 +03:00
"## Второй способ"
2023-02-28 13:50:28 +03:00
]
},
{
"cell_type": "markdown",
"id": "c7011dfa-0db8-4cff-bbb8-cc4e42836911",
"metadata": {},
"source": [
2023-09-15 14:01:17 +03:00
"**Положения максимумов на разных частотах** в делениях винта (цена -- 4 мкм, погр 4 мкм)"
2023-02-28 13:50:28 +03:00
]
},
{
"cell_type": "code",
2023-09-15 14:01:17 +03:00
"execution_count": 3,
2023-02-28 13:50:28 +03:00
"id": "eae1dcdf-7f12-4cc0-b47c-950502dbd13b",
"metadata": {},
"outputs": [],
"source": [
"x_array = np.array([\n",
" (1.059, 3, [-106, -69, -34, 2, 36, 72, 108]),\n",
2023-09-15 14:01:17 +03:00
" # (2.898, 2, [-194, -96, 1, 101, 199]),\n",
2023-02-28 13:50:28 +03:00
" (1.210, 2, [-81, -40, 0, 42, 81]),\n",
2023-09-15 14:01:17 +03:00
" # (2.951, 1, [-98, 0, 99]),\n",
2023-02-28 13:50:28 +03:00
" (0.902, 2, [-58, -29, 1, 30, 61]),\n",
" (0.294, 1, [-10, 0, 9]),\n",
" (0.439, 2, [-29, -14, 0, 16, 30]),\n",
" (0.669, 2, [-47, -24, 0, 23, 46])\n",
"],\n",
2023-09-15 14:01:17 +03:00
"dtype=[('frequency', 'f4'), ('count', 'i4'), ('data', 'O')])\n",
2023-02-28 13:50:28 +03:00
"x_array.sort(0)"
]
},
{
"cell_type": "code",
2023-09-15 14:01:17 +03:00
"execution_count": 4,
2023-02-28 13:50:28 +03:00
"id": "e4bb6e63-0945-4fb8-86e2-a122a27342b5",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
2023-09-15 14:01:17 +03:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAyIAAAIVCAYAAAAtRUv/AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAABcSAAAXEgFnn9JSAADu/UlEQVR4nOzde1xUdf748dcMAgoKA961vAze09QBtbum0E33u5uC1G5tpcFou7VdGd1qq2+1OnT/VquDVrvb1sYlt/2llTF5664waZp5Y/CeN+CgIgjMnN8fxxkZuQjDIKjv5+PhQ+ecz/mczwDqec/n8/68daqqqgghhBBCCCHEOaRv7QEIIYQQQgghLj4SiAghhBBCCCHOOQlEhBBCCCGEEOecBCJCCCGEEEKIc04CESGEEEIIIcQ51661ByDA7XZTUVFBu3bt0Ol0rT0cIYQQQgghmk1VVaqrq2nfvj16fe35DwlE2oCKigrCw8NbexhCCCGEEEIEXFlZGWFhYbWOSyDSBrRrp30bysrKCA4OrrddVVUV4eHhZ23XFBdzny3Vr/R5cfb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2gPtjWTiZ1OJ3Pnzq13GUxT27clNbfofXzq5ed0OdaZ4uPjsVqtPnkcnpkAD0VRcDqdPj9jsbGxKIpSq35Nza//okWLSElJ8X7PO3fu3OhNFRRFwWKxkJGR4S2W6AmO5s6d6zNbY7FYyMnJAbQlisnJyaSlpXl/RjyziZMmTfKeA212xXMuJSXF+7XwJLDHx8d7N4mw2+04HA4WLVrUqPELIYQQ4sJ0rKSMT99ew/YftFmQ7n278KvUCXTv24XiAwo
"text/plain": [
"<Figure size 900x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAxEAAAIVCAYAAACugXLEAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAABcSAAAXEgFnn9JSAABwXUlEQVR4nO3de3yT5f3/8XcSEg7hEFrwLEKK5wOQHtycUyetzvOmLZ1uqLjRun2/ovPQwBBFM4Wg84D7brZu4lmhxW3OIw06nW6zh+D5SIOCCiK04VAOTZP79we/dNSeS9oc+no+Hn1sTa7e+bTctvc71/W5L5NhGIYAAAAAoJvM8S4AAAAAQHIhRAAAAADoEUIEAAAAgB4hRAAAAADoEUIEAAAAgB4ZFO8CklkkEtGuXbs0aNAgmUymeJcDAAAAxIRhGGpubtaQIUNkNreddyBE7INdu3bJbrfHuwwAAACgTzQ2NmrYsGFtHidE7INBg/b8+ILBoBwOhxobG2W1WuNWTygUkt1uj3sd1JLYdSRSLYlSB7Ukdh2JVEui1EEtiV1HItWSKHVQS2LX0V4t0c+j17vfRojYB9ElTNF/dKvVGvcTIJHqkKglkeuQEqeWRKlDopZErkNKnFoSpQ6JWhK5DilxakmUOiRqSeQ6pLa1dLRkn8bqGDCbzbr55pvbXS82EOtItFoSRSL9TBKllkSpI9Ekys8lUepItFoSRSL9TBKllkSpI5Ek0s+EWhJbT38mJsMwj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gAAABASvtm6y7NfXKVnnxjjSTpwNFDdcfPsnR+1iEymUxxri45ESIAAACQkgzD0GP
2023-02-28 13:50:28 +03:00
"text/plain": [
"<Figure size 900x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
2023-09-15 14:01:17 +03:00
"k1 = []\n",
2023-02-28 13:50:28 +03:00
"for x in x_array:\n",
" count = x['count']\n",
" m = np.linspace(-count, count, count * 2 + 1, dtype=np.int32)\n",
" y = 4 * np.array(x['data'])\n",
" y = y - y[count]\n",
2023-09-15 14:01:17 +03:00
" k1.append(np.mean(y[count+1:] / m[count+1:]))\n",
2023-02-28 13:50:28 +03:00
" \n",
" plt.errorbar(m, y, yerr=4, label=f'${x[\"frequency\"]:.2f}$ MHz', marker='.')\n",
" \n",
"plt.xlabel('Номер максимума', fontsize='small')\n",
"plt.ylabel('Расстояние до центрального максимума, мкм', fontsize='small')\n",
"plt.legend(frameon=True, fontsize='x-small')\n",
2023-09-15 14:01:17 +03:00
"plt.savefig(r'images/r_on_m.svg')\n",
"plt.show()\n",
"\n",
"k2 = np.mean(k1 / x_array['frequency'])\n",
"plt.errorbar(x_array['frequency'], k1, marker='.', ls='', ms=6)\n",
"plt.plot(x_array['frequency'], k2 * x_array['frequency'], color='C0', lw=1)\n",
"plt.ylabel(r'$\\Delta x_m / \\Delta m$', fontsize='small')\n",
"plt.xlabel(r'Частота, МГц', fontsize='small')\n",
"plt.savefig(r'images/deltax_on_nu.svg')\n",
2023-02-28 13:50:28 +03:00
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "4a240cce-bfaf-4f8b-becf-17e1f7724fba",
"metadata": {},
"source": [
"Полоса пропускания красного фильтра 6400+-200 ангстрем"
]
},
{
2023-09-15 14:01:17 +03:00
"cell_type": "code",
"execution_count": 5,
"id": "921a119b-62b2-45bb-9982-c8d80e12ff31",
2023-02-28 13:50:28 +03:00
"metadata": {},
2023-09-15 14:01:17 +03:00
"outputs": [
{
"data": {
"text/plain": [
"1440.463516686639"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
2023-02-28 13:50:28 +03:00
"source": [
2023-09-15 14:01:17 +03:00
"f = 30e-2\n",
"lamb = 640e-9\n",
"v = f * lamb / k2 * 1e12 # по формулам 5, 6\n",
"v"
2023-02-28 13:50:28 +03:00
]
},
{
"cell_type": "markdown",
2023-09-15 14:01:17 +03:00
"id": "34ee029f-b068-404b-8547-c5ac67ead220",
2023-02-28 13:50:28 +03:00
"metadata": {},
"source": [
2023-09-15 14:01:17 +03:00
"## Третий способ"
2023-02-28 13:50:28 +03:00
]
},
{
2023-09-15 14:01:17 +03:00
"cell_type": "markdown",
"id": "332667c3-7164-4702-a533-18f74ca7f67a",
"metadata": {},
2023-02-28 13:50:28 +03:00
"source": [
2023-09-15 14:01:17 +03:00
"**Длина волны по методу тёмного поля от частоты**"
2023-02-28 13:50:28 +03:00
]
},
{
"cell_type": "code",
2023-09-15 14:01:17 +03:00
"execution_count": 6,
"id": "943094f5-a196-4dfe-823b-cdae8f375a30",
"metadata": {},
2023-02-28 13:50:28 +03:00
"outputs": [],
"source": [
2023-09-15 14:01:17 +03:00
"s = '''lambda[del]/2,nu[MHz]\n",
"27.33,0.599\n",
"22.00,0.708\n",
"17.60,0.901\n",
"15.33,1.023\n",
"13.14,1.243\n",
"5.53,2.889\n",
"5.33,2.980'''\n",
"s = s.split('\\n')\n",
"\n",
"df = pd.DataFrame([list(map(float, i.split(','))) for i in s[1:]], columns=s[0].split(','))"
2023-02-28 13:50:28 +03:00
]
},
{
"cell_type": "code",
2023-09-15 14:01:17 +03:00
"execution_count": 7,
"id": "fafead29-8ce6-420f-aa62-fa24afac5c29",
"metadata": {},
2023-02-28 13:50:28 +03:00
"outputs": [
{
"data": {
"text/plain": [
2023-09-15 14:01:17 +03:00
"1484.112292358804"
2023-02-28 13:50:28 +03:00
]
},
2023-09-15 14:01:17 +03:00
"execution_count": 7,
2023-02-28 13:50:28 +03:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
2023-09-15 14:01:17 +03:00
"k = 2 / 43 # Цена деления окулярной шкалы микроскопа, мм\n",
"\n",
"Lambda_temn = df[df.columns[0]]*2 * k * 1e-3 # длина волны по методу темн поля\n",
"nu_temn = df[df.columns[1]] * 1e6 # частота\n",
"\n",
"v = np.mean(nu_temn * Lambda_temn)\n",
2023-02-28 13:50:28 +03:00
"v"
]
},
{
"cell_type": "markdown",
2023-09-15 14:01:17 +03:00
"id": "2f54defb-0072-4cdf-a30b-05351cfd5197",
2023-02-28 13:50:28 +03:00
"metadata": {},
"source": [
2023-09-15 14:01:17 +03:00
"## Дополнительно"
2023-02-28 13:50:28 +03:00
]
},
{
"cell_type": "markdown",
"id": "5eed1189-92d8-4317-9b40-e0a9ea938af2",
"metadata": {},
"source": [
"При перемещении проволоки стало ничего не видно"
]
},
{
"cell_type": "markdown",
"id": "17885155-3769-426f-8be1-62ad3275d077",
"metadata": {},
"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",
2023-09-15 14:01:17 +03:00
"version": "3.10.10"
2023-02-28 13:50:28 +03:00
}
},
"nbformat": 4,
"nbformat_minor": 5
}