2023-03-14 17:13:37 +01:00
{
"cells": [
{
"cell_type": "code",
2023-03-15 11:29:21 +01:00
"execution_count": 1,
2023-03-14 17:13:37 +01:00
"id": "a4246751",
"metadata": {},
"outputs": [],
"source": [
2024-06-07 20:27:50 +02:00
"from Calculator import *\n",
"from Potentials import *\n",
"from Helpers import *\n",
"from Plotter import *\n",
"# %matplotlib notebook"
2023-03-14 17:13:37 +01:00
]
},
{
"cell_type": "markdown",
"id": "c68468e4",
"metadata": {},
"source": [
"## Plot ideal trap potential resulting for given parameters only"
]
},
{
"cell_type": "code",
2024-06-07 20:27:50 +02:00
"execution_count": 2,
2023-03-14 17:13:37 +01:00
"id": "38c770ac",
"metadata": {},
2024-06-07 20:27:50 +02:00
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\Karthik\\anaconda3\\envs\\Py39VEnv\\lib\\site-packages\\scipy\\optimize\\_minpack_py.py:1010: OptimizeWarning: Covariance of the parameters could not be estimated\n",
" warnings.warn('Covariance of the parameters could not be estimated',\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA3kAAAKyCAYAAABoqBcWAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAADRzUlEQVR4nOzdd3xV9eH/8de52XtvyCBhg4KAMlRABVFr1fpta62D1tH+1NYW21q6HK3a1tHdfmv1q7W12trWuiu4F8oQkB0SSAjZi+xxc+/5/XFuIpGVQHLPHe/n45HHXSfhnUMIeefzOZ+PYZqmiYiIiIiIiAQEh90BREREREREZOSo5ImIiIiIiAQQlTwREREREZEAopInIiIiIiISQFTyREREREREAohKnoiIiIiISABRyRMREREREQkgKnkiIiIiIiIBRCVPREREREQkgKjkiYiIiIiIBJCgLnm///3vKSgoIDIyklmzZvH222/bHUlEREREROSEBG3J+/vf/843vvENvv/977Nx40bOO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Q3uHuCxInQAZU6239CmQMW3YGwoP1fnTsyhKj2V8eqwWPRCRoXv/d9BQbP2iavH3j3hYc0cv96/excrzJhMTEYphGCp4IjIkKnkigc40rVG1tmporfSUt1qruHV84n5n4/A/vuGAyETPKFuyZ5QtCSITIDwGwmKs2/Boz/1o63FoFDhCrPc3HJ77nsemC/q66evpZO27b3HqrBmEunug+8DHJbOzycp8oAJaKqzC2VZtve198+N
"text/plain": [
"<Figure size 900x700 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-03-14 17:13:37 +01:00
"source": [
2024-06-07 20:27:50 +02:00
"Power = 40*u.W\n",
2023-03-14 17:13:37 +01:00
"Wavelength = 1.064*u.um\n",
"w_x, w_z = 30*u.um, 30*u.um # Beam Waists in the x and y directions\n",
"\n",
"#Power = 11*u.W\n",
"#w_x, w_z = 67*u.um, 67*u.um # Beam Waists in the x and y directions\n",
"\n",
"options = {\n",
" 'axis': 2, # axis referenced to the beam along which you want the dipole trap potential\n",
" 'extent': 1e2, # range of spatial coordinates in one direction to calculate trap potential over\n",
" 'crossed': False,\n",
" 'delta': 70, # angle between arms in degrees\n",
2024-06-07 20:27:50 +02:00
" 'modulation': True,\n",
2023-03-14 17:13:37 +01:00
" 'aspect_ratio': 4, # required aspect ratio of modulated arm\n",
" 'gravity': True,\n",
" 'tilt_gravity': False,\n",
" 'theta': 0.75, # gravity tilt angle in degrees\n",
" 'tilt_axis': [1, 0, 0], # lab space coordinates are rotated about x-axis in reference frame of beam\n",
" 'astigmatism': False,\n",
" 'disp_foci': 2.5*u.mm, #0.9 * z_R(w_0 = np.asarray([30]), lamb = 1.064)[0]*u.um, # difference in position of the foci along the propagation direction (Astigmatism)\n",
" 'extract_trap_frequencies': False\n",
"}\n",
"\n",
"ComputedPotentials = [] \n",
"Params = [] \n",
"\n",
2023-03-14 19:26:43 +01:00
"Positions, IdealTrappingPotential, TrappingPotential, TrapDepthsInKelvin, CalculatedTrapFrequencies, ExtractedTrapFrequencies = computeTrapPotential(w_x, w_z, Power, options)\n",
2023-03-14 17:13:37 +01:00
"ComputedPotentials.append(IdealTrappingPotential)\n",
"ComputedPotentials.append(TrappingPotential)\n",
"Params.append([TrapDepthsInKelvin, CalculatedTrapFrequencies, ExtractedTrapFrequencies])\n",
"\n",
"cpots = np.asarray(ComputedPotentials)\n",
"plotPotential(Positions, cpots, options, Params)"
]
},
{
"cell_type": "markdown",
"id": "fc9809de",
"metadata": {},
"source": [
"## Plot harmonic fit for trap potential resulting for given parameters only"
]
},
{
"cell_type": "code",
2024-06-07 20:27:50 +02:00
"execution_count": 3,
2023-03-14 17:13:37 +01:00
"id": "0f3e80f7",
"metadata": {},
2024-06-07 20:27:50 +02:00
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABKUAAAJOCAYAAABm7rQwAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdeVxU9foH8M8w7AIii4CAgGaaqWVaLomAhoVlKqKWXtNrWv6oFGkxr5lYLmnmRXPLMpc0MxUty1LMJUosc8nSule7uBG44ILsMJzfH8czMjDAmX37vF8vXgxnvnPO851xGZ55vs9XIQiCACIiIiIiIiIiIjNysnQARERERERERETkeJiUIiIiIiIiIiIis2NSioiIiIiIiIiIzI5JKSIiIiIiIiIiMjsmpYiIiIiIiIiIyOyYlCIiIiIiIiIiIrNjUoqIiIiIiIiIiMyOSSkiIiIiIiIiIjI7JqWIiIiIiIiIiMjsmJQicmBr1qyBQqHQ+vXKK6/g7NmzUCgUWLNmjfoxBw8eRFpaGm7cuCHrGjt37kRaWprRY09LS9OI19XVFVFRUZg0aZLs2GqaM2cOtm/fbvQ4tWnoOYmMjMSYMWP0Oq8hjyUiIiLLMMf7sdrvm1xcXNCyZUuMHz8e+fn5ppkYgDFjxiAyMlLWWIVCYZ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jT4EGNzc3xMTEYN68eQDEJYFEZHqslCIinXTs2BEAsGjRIowePRouLi5o27YtvL29Gxw/b948JCQkQKlUolOnTupP56ZMmYLCwkI8/PDD6t33Onf
"text/plain": [
"<Figure size 1200x600 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-03-14 17:13:37 +01:00
"source": [
"v, dv, popt, pcov = extractTrapFrequency(Positions, TrappingPotential, options['axis'])\n",
"plotHarmonicFit(Positions, TrappingPotential, TrapDepthsInKelvin, options['axis'], popt, pcov)"
]
},
{
"cell_type": "markdown",
"id": "37b40607",
"metadata": {},
"source": [
"## Plot trap potential resulting for given parameters (with one parameter being a list of values and the potential being computed for each of these values) only"
]
},
{
"cell_type": "code",
2024-06-07 20:27:50 +02:00
"execution_count": 4,
2023-03-14 17:13:37 +01:00
"id": "8504f99f",
"metadata": {
"scrolled": false
},
2024-06-07 20:27:50 +02:00
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\Karthik\\anaconda3\\envs\\Py39VEnv\\lib\\site-packages\\scipy\\optimize\\_minpack_py.py:1010: OptimizeWarning: Covariance of the parameters could not be estimated\n",
" warnings.warn('Covariance of the parameters could not be estimated',\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA3kAAAKyCAYAAABoqBcWAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdd3hb5dnH8e/Rlrz33s7eOyGEDEgIYYW9ymjLTIECpRRoeYGWlpYyWqBQoC2jQNk7BBIIZJCE7L3j2I73nto65/1DtsHEdgLYksf9uS5diX1uWT8dhKNbz3OeR9E0TUMIIYQQQgghRL+gC3YAIYQQQgghhBDdR5o8IYQQQgghhOhHpMkTQgghhBBCiH5EmjwhhBBCCCGE6EekyRNCCCGEEEKIfkSa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iqJpKIBCyzE0dGjoNBU9/psBDYOiYtCpGHQ+jDofZp0Pi96DWe9Fb9DQGTT0Jg29SUVnUtGbVIx6WACwE6K/cx5iFRtnx4+k1DOMUtcQypxZ4A1hUPUEBlVPINaxERqvB3M4+3U+7ilfCkCuNZ55CVM5NfNUspMmoJhCsJr0bT/XqNfxz8v9TaPHp5JX2cyO4np2FtezvaiOiZnfJGlyeVnw+CosBh2TsqKZPSSeOUPjSYvuHdfoCiF6gaqDsPZJ2P46eFquw9KbYfhZMPoiyJ4Fen+T9O/Vh3lncxG7So6+9sjj1Wh0egiz+Gv/MTcV+3PPUP/Gu+DzT8E0T51CydgRbNm6HvehvQAkZOcy9bxL+EPFP9hc+U/YD/FNGUytWkhu7TisrjBso9yomop
"text/plain": [
"<Figure size 900x700 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-03-14 17:13:37 +01:00
"source": [
"Potentials = [] \n",
"Params = [] \n",
"Power = [10, 30, 40]*u.W # Single Beam Power\n",
"for p in Power: \n",
2023-03-14 19:26:43 +01:00
" Positions, IdealTrappingPotential, TrappingPotential, TrapDepthsInKelvin, CalculatedTrapFrequencies, ExtractedTrapFrequencies = computeTrapPotential(w_x, w_z, p, options)\n",
2023-03-14 17:13:37 +01:00
" Potentials.append(IdealTrappingPotential)\n",
" Potentials.append(TrappingPotential)\n",
" Params.append([TrapDepthsInKelvin, CalculatedTrapFrequencies, ExtractedTrapFrequencies])\n",
"\n",
"cpots = np.asarray(Potentials)\n",
"plotPotential(Positions, cpots, options, Params)"
]
},
{
"cell_type": "markdown",
"id": "951010c6",
"metadata": {},
"source": [
"## Plot transverse intensity profile and trap potential resulting for given parameters only"
]
},
{
"cell_type": "code",
2024-06-07 20:27:50 +02:00
"execution_count": 5,
2023-03-14 17:13:37 +01:00
"id": "f3e4afd9",
"metadata": {},
2024-06-07 20:27:50 +02:00
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABKUAAAJOCAYAAAB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blz5/Lqq69Sq1YtwsPDueGGG9i3b5/dufvtt984cuSI3fDDfNoheKdPn2bEiBE0a9aMSpUqUb16da6//npWr15d7HMkhJCeUkIIIQoRGhrK66+/br0/dOhQnnvuOQ4cOECrVq10rEwIIYQQ+VJTUxk8eDAvvvgib731FgaDpd/BgQMH6NevHyNHjiQ0NJS9e/fyzjvvsGnTJochgLm5ufTr14/HHnuMMWPGsG7dOt58802OHDnCL7/8Uqy6Dh48CFh6eJ0+fZrOnTuTk5PDG2+8QVxcHL/++iujR48mKSmJKVOmULNmTRYtWsRNN93E8OHDefjhh63bA+zZs4fOnTsTExPD+++/T3R0NH/88QfPPPMMZ86cYezYsXbHf+WVV+jSpQtTp04lPT2dl156if79+/PPP/9gNBqZMmUKjz76KElJSSxYsMDl4zl37hwAY8eOJTo6mosXL7JgwQISEhJYunRpqQw3FKJcUoWoYGbMmKEC6ubNm93edu3aterYsWPV8+fPe76wYsh/LIcPH7bO80aN+cfJn4xGo1q7dm112LBh6rFjxzx2nHzffvut2qxZMzUoKEgF1G3bthX4WAua5wnjxo1TmzZtqppMJrv5v/32m/UcfPXVVw7bZWdnqw0aNFABtWnTpqqqquqsWbNUQF27dq3duiaTybqudlleXp4aExOjdu7c2W5etWrV1EmTJnnqYbrtn3/+UYOCgtSMjAzrvKlTp6q1atVSL168qFtdQgghREUwdOhQNTQ01G5ejx49VEBdunSp023NZrOam5urrly5UgXUHTt22O0XUD/44AO7bSZMmKAC6po1a4pUV25urpqbm6uePn1a/eCDD1RFUdT27durqqqqY8aMUQF148aNdts+8cQTqqIo6r59+1RVVdXTp0+rgDp27FiH49x4441qnTp11LS0NLv5Tz31lBoUFKSeO3dOVVVVXb58uQqo/fr1s1vvf//7nwqo69evt867+eab1djY2AIfV2F15MvLy1Nzc3PVXr16qXfccYdb2wohrpLhe0K4Yd26dYwbN44LFy7oXQoAN998M+vXr6dmzZrWed6sccaMGaxfv54lS5bwyCOPMHfuXLp16+bQDbwkTp8+zZAhQ6hfvz6L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eK8nsoSE5ODtOmTWPgwIEOvaQAtmzZwrXXXkvr1q0dGqVeeukl6tSpY70y3bXXXgtcbZRKT0+3rrtp0ybWrFnDiy++SGhoqN3vfd26dWzcuJHnnnvOWoOqqixYsIC77rrLoabVq1dzxx13UL16dYKCgqhfvz4vvviidXmfPn3o2rUrixcvpmvXroSEhBAXF2e9PPO8efNo164dISEhNGvWzOHbULPZzAMPPIDRaGTatGl2AaD5Bg0aRHp6Ot9++23hJ1cIIYQQXlHQ/+Zly5Zx4sQJpk+fzsMPP0z37t1p164dYWFhBe4jLy/PoWEov/e3tnGnIAaDgXbt2tGuXTtatGhh1yCVv4/U1FSH7U6cOAFA1apVne4/MjISo9HIsGHD2Lx5c4FTv379XNZZErNnzyYhIYFPP/2Um2++mQ4dOtCuXTsyMjK8elwhyjvpKSXEFXfddRcDBgxg+PDh7Nq1i5dffhmA6dOnA/Dwww9z7tw5PvroI+bPn2/9VqpZs2aA++GLro43ZMgQtm7dyoQJE2jUqBEXLlxg69atTr9JclbjggUL+OSTT7j//vvttvn4449p37497du3d/uc2QZY2rrzzju57777ePzxx61D+1auXEnv3r1p2bIl06ZNIzAwkClTptC/f3/mzp3LgAED+L//+z+uu+46nnzySd566y169uzp8KbGFXd
"text/plain": [
"<Figure size 1200x600 with 3 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-03-14 17:13:37 +01:00
"source": [
2023-03-14 19:26:43 +01:00
"Power = 40*u.W\n",
"Wavelength = 1.064*u.um\n",
"w_x, w_z = 30*u.um, 30*u.um # Beam Waists in the x and y directions\n",
"\n",
2023-03-14 17:13:37 +01:00
"options = {\n",
2023-03-14 19:26:43 +01:00
" 'axis': 2, # axis referenced to the beam along which you want the dipole trap potential\n",
2023-03-14 17:13:37 +01:00
" 'extent': 60, # range of spatial coordinates in one direction to calculate trap potential over\n",
2023-03-14 19:26:43 +01:00
" 'crossed': False,\n",
" 'delta': 70, # angle between arms in degrees\n",
2023-03-14 17:13:37 +01:00
" 'modulation': True,\n",
" 'modulation_function': 'arccos',\n",
2023-03-14 19:26:43 +01:00
" 'modulation_amplitude': 2.16,\n",
" 'aspect_ratio': 4, # required aspect ratio of modulated arm\n",
" 'gravity': True,\n",
" 'tilt_gravity': False,\n",
" 'theta': 0.75, # gravity tilt angle in degrees\n",
" 'tilt_axis': [1, 0, 0], # lab space coordinates are rotated about x-axis in reference frame of beam\n",
" 'astigmatism': False,\n",
" 'disp_foci': 2.5*u.mm, #0.9 * z_R(w_0 = np.asarray([30]), lamb = 1.064)[0]*u.um, # difference in position of the foci along the propagation direction (Astigmatism)\n",
" 'extract_trap_frequencies': False\n",
2023-03-14 17:13:37 +01:00
"}\n",
"\n",
2023-03-14 19:26:43 +01:00
"positions, waists, I, U, p = computeIntensityProfileAndPotentials(Power, [w_x, w_z], Wavelength, options)\n",
2023-03-14 17:13:37 +01:00
"plotIntensityProfileAndPotentials(positions, waists, I, U)"
]
},
{
"cell_type": "markdown",
"id": "db0df307",
"metadata": {},
"source": [
"## Plot gaussian fit for trap potential resulting from modulation for given parameters only"
]
},
{
"cell_type": "code",
2024-06-07 20:27:50 +02:00
"execution_count": 6,
2023-03-14 17:13:37 +01:00
"id": "7afa7d82",
"metadata": {},
2024-06-07 20:27:50 +02:00
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABKYAAAJOCAYAAACN2Q8zAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAADwJ0lEQVR4nOzde1xT9f8H8Ndh3EFBQYUYirc077dK1Amk4K1CF3kr09Ksn11Qu9pFsVLL0qC+WVkm3TQTp2VqigqKimkqamoXLyggeEEFRbmN8/vjuMlgwAYb29jr+Xj42PY5n53zOZ/hdvbe5/P+CKIoiiAiIiIiIiIiIqpnDpZuABERERERERER2ScGpoiIiIiIiIiIyCIYmCIiIiI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QUFCg3V4XgwYNwo0bN7Bu3Tqd8u+++06nDZp26junBx98EH/99Rfatm2LPn36VPpXm8CUMX0oCAKcnZ11glI5OTlclY+IiKiBqOvoakC6Xvjss88gk8nw1ltvAQD69+8Pb29vHD9+XO81TJ8+feDs7FxpXy1btsTzzz+P8PBwHDx4sMpjhoWFAQB+/PFHnfIVK1ZUqhsUFISLFy/qrBhYXFyMzZs3VzoPADoL4IiiiK+++qqmLtDh4uKCkJAQfPDBBwCk6YFEVL84YoqIzKZr164AgLi4OEycOBFOTk7o0KEDGjVqVG39Dz74AMOGDYNMJkO3bt20v+y99tpryM/PR//+/bWr8vX
"text/plain": [
"<Figure size 1200x600 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABKYAAAJOCAYAAACN2Q8zAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAADXKklEQVR4nOzdeVhU5dsH8O9hGDaRXQUBBc3cF3DJDYEMtxYTcclSLLXMStzKrFyo1BYXyJ9ZmkmLqaljq6VkoKS4i1ZavSqoIG6g4sbicN4/jnNkZJvBGWb7fq5rLmae88w599mG4eZZBFEURRAREREREREREdUyO1MHQEREREREREREtomJKSIiIiIiIiIiMgkmpoiIiIiIiIiIyCSYmCIiIiIiIiIiIpNgYoqIiIiIiIiIiEyCiSkiIiIiIiIiIjIJJqaIiIiIiIiIiMgkmJgiIiIiIiIiIiKTYGKKiIiIiIiIiIhMgokpItJJUlISBEGo8DFt2jRkZWVBEAQkJSXJ79m1axfmzJmDK1eu6LSNzZs3Y86cOQaPfc6cOVrxOjg4IDg4GHFxcTrHVta8efPw3XffGTzOilR1TIKCgjB69Ogarfd+3ktERET3rza+W937HUipVKJRo0YYN24czp07Z5wdAzB69GgEBQXpVFcQBKN8/6tpPERU++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bFgCQmJiI2NhYKJVKNG/eHHXr1q2y/vvvv4/+/ftDoVCgXbt28n/2pk+fjoKCAvTo0UOelS8kJAQjR46
"text/plain": [
"<Figure size 1200x600 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-03-14 17:13:37 +01:00
"source": [
"x_Positions = positions[0].value\n",
"z_Positions = positions[1].value\n",
"x_Potential = U[:, np.where(z_Positions==0)[0][0]].value\n",
"z_Potential = U[np.where(x_Positions==0)[0][0], :].value\n",
"poptx, pcovx = p[0], p[1]\n",
"poptz, pcovz = p[2], p[3]\n",
"plotGaussianFit(x_Positions, x_Potential, poptx, pcovx)\n",
"plotGaussianFit(z_Positions, z_Potential, poptz, pcovz)"
]
},
{
"cell_type": "markdown",
"id": "5e5b8123",
"metadata": {},
"source": [
"## Calculate relevant parameters for evaporative cooling"
]
},
{
"cell_type": "code",
2024-06-07 20:27:50 +02:00
"execution_count": 7,
2023-03-14 17:13:37 +01:00
"id": "95ab43bd",
"metadata": {},
2024-06-07 20:27:50 +02:00
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Particle Density = 4.63E+13 1 / cm3\n",
"Elastic Collision Rate = 2813.75 1 / s\n",
"PSD = 9.00E-05 \n",
"v_x = 2588.17 Hz\n",
"v_y = 20.66 Hz\n",
"v_z = 2588.17 Hz\n",
"a_s = 111.31 \n"
]
}
],
2023-03-14 17:13:37 +01:00
"source": [
"Power = 40*u.W\n",
"Wavelength = 1.064*u.um\n",
"w_x, w_z = 30*u.um, 30*u.um # Beam Waists in the x and y directions\n",
"\n",
"AtomNumber = 1.00 * 1e7\n",
"BField = 2.5 * u.G\n",
"\n",
"modulation_depth = 0.0\n",
"Temperature = convert_modulation_depth_to_temperature(modulation_depth)[0] * u.uK\n",
2023-03-14 19:26:43 +01:00
"n = particleDensity(w_x, w_z, Power, N = AtomNumber, T = Temperature).decompose().to(u.cm**(-3))\n",
"Gamma_elastic = calculateElasticCollisionRate(w_x, w_z, Power, N = AtomNumber, T = Temperature, B = BField)\n",
"PSD = calculatePSD(w_x, w_z, Power, N = AtomNumber, T = Temperature).decompose()\n",
2023-03-14 17:13:37 +01:00
"\n",
"print('Particle Density = %.2E ' % (n.value) + str(n.unit))\n",
"print('Elastic Collision Rate = %.2f ' % (Gamma_elastic.value) + str(Gamma_elastic.unit))\n",
"print('PSD = %.2E ' % (PSD.value))\n",
"\n",
2023-03-14 19:26:43 +01:00
"v_x = calculateTrapFrequency(w_x, w_z, Power, dir = 'x')\n",
"v_y = calculateTrapFrequency(w_x, w_z, Power, dir = 'y')\n",
"v_z = calculateTrapFrequency(w_x, w_z, Power, dir = 'z')\n",
2023-03-14 17:13:37 +01:00
"\n",
"print('v_x = %.2f ' %(v_x.value) + str(v_x.unit))\n",
"print('v_y = %.2f ' %(v_y.value) + str(v_y.unit))\n",
"print('v_z = %.2f ' %(v_z.value) + str(v_z.unit))\n",
"\n",
"print('a_s = %.2f ' %(scatteringLength(BField)[0] / ac.a0))"
]
},
{
"cell_type": "markdown",
"id": "ff252fbe",
"metadata": {},
"source": [
"## Plot alphas"
]
},
{
"cell_type": "code",
2024-06-07 20:27:50 +02:00
"execution_count": 3,
2023-03-14 17:13:37 +01:00
"id": "dd7fc03d",
"metadata": {},
2024-06-07 20:27:50 +02:00
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAnYAAAHWCAYAAAD6oMSKAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABlR0lEQVR4nO3deVxU1f/H8dcMIJuAuKMiaGAupSaWpqbmVmm5pJZp5YLbzzbbs+WLVlbf+mq254LY4pZrplYuuaRm5VapLWriilsuoCwCc39/TIwgAwIyzDC8n4/HPJy5c+fOZ+YEvDvnnnNNhmEYiIiIiEipZ3Z2ASIiIiJSPBTsRERERNyEgp2IiIiIm1C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S7tYy/f69346pfHjTJ1qxmQyA7lPpDeZDKZMsTB+fPH+oS9Mu5sMI68zwUqeyWRi0aJF9OzZE4BNmzbRunVrjhw5Qo0aNWz7DR8+nAMHDvDtt9/aPc7YsWPtXh901qxZds+V8vT0pHr16oSGhlKuXLni+TD/unABatWqAMDhw2dL5f+dSOl38eJFDh06xLFjx8jIyHB2OSJSRqWmetCvn3V0Y86cpfj4ZF7hFa5nwoQoNmyogWHkPpvNbLbQuvVRnnxya7G+Z3JyMv379+fcuXMEBgbmu69L99hluXyhV8Mw8l38dcyYMTmWr0hMTCQ0NJQuXbrY/UJSU1M5dOgQ5cuXt61DVhSGYZCUlERAQICtvuydI4GBgQp2TmCvXcqa1NRUfH1
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-03-14 17:13:37 +01:00
"source": [
"plotAlphas()"
]
},
{
"cell_type": "markdown",
"id": "c09cb260",
"metadata": {},
"source": [
"## Plot Temperatures"
]
},
{
"cell_type": "code",
2024-06-07 20:27:50 +02:00
"execution_count": 4,
2023-03-14 17:13:37 +01:00
"id": "5c79840e",
"metadata": {},
2024-06-07 20:27:50 +02:00
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAnYAAAHWCAYAAAD6oMSKAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAACB7UlEQVR4nO3deVhU1RsH8O+dYUdWRRYFUcF9AXHXFEsp991SS1BcSjNJTStToFLT0ijL0lKx1KxMTX9aiRsuZK64ZLmCK+CGILINzP39MXFlZEAGZ2P4fp7nPszce+bed+Y48nLOPecIoiiKICIiIqJKT2bsAIiIiIhIN5jYEREREZkJJnZEREREZoKJHREREZGZYGJHREREZCaY2BERERGZCSZ2RERERGaCiR0RERGRmbAwdgCmQqlU4ubNm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cOzs7LFu2TGqVeu211+Dg4IDg4GBkZGQAAKZMmYK2bduW63yLFy+WRmpmZmaiTZs25Z7uRBAEfPLJJ1LrU1RUFJycnNChQwedtkjVqlULMTExEAQB+fn5CA0NhbOzM+zs7BAYGIi5c+cipdiN6J9//jm8vb0BAAkJCdI9dg0bNlQbLezn5wc3NzepXLVq1Z64ykfbtm0REREBQDXQIzg4GA4ODpg0aRIAwMLCAl9//TVsNa1RZwKY2BERkVmqX//R4+ho02+pK27w4MH4888/MXToUHh4eMDCwgJOTk4IDg7GihUrsHjx4nKfSyytX7qchgwZgl9++QUtWrSAlZUVvL29MXv
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-03-14 17:13:37 +01:00
"source": [
"plotTemperatures(w_x, w_z, plot_against_mod_depth = True)"
]
},
{
"cell_type": "markdown",
"id": "063879ee",
"metadata": {},
"source": [
"## Calculate and Plot calculated trap frequencies"
]
},
{
"cell_type": "code",
2024-06-07 20:27:50 +02:00
"execution_count": 5,
2023-03-14 17:13:37 +01:00
"id": "0ddff726",
"metadata": {},
2024-06-07 20:27:50 +02:00
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAxUAAAJNCAYAAABHt1gkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAADDQ0lEQVR4nOzdd3RU1dfG8e+kEgIJNYRAaEoLKF1ApCNKrxaKFLEhIPaCBSzIz15elWIB6RaKSJMaioLSpYtI772Tet8/DkkIJJBJZnInyfNZ665M7ty5s4MBz55z9j4Oy7IsRERERERE0snL7gBERERERCRrU1IhIiIiIiIZoqRCREREREQyREmFiIiIiIhkiJIKERERERHJECUVIiIiIiKSIUoqREREREQkQ5RUiIiIiIhIhiipEBERERGRDFFSISIiIiIiGeJjdwAiIiIi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ERERFJLyUVHirQL5BZXWdRL7wepwPg7p4ONhxcB3fcAWvW3PT1Pj5Qrx4MHWqWSO3fb4q5O3SAPHlM0vH99/DAA2blVcOGphh848aU97kRERER8VSlSpXCsqwbHhmdpZAbU1LhwfL45WF2t9nULlabk7ksmvX2ZlPsQWjQAKZOdepexYpBnz7mZSdOmHa0zz1n2tPGxcHSpfDyy3D77VCiBDz+OMyYAefPu+mHExEREZFsQ0mFhwvyD2Ju97nUDKvJ8VxxNH3Ej625L0KnTvC//6VrWsHPD5o0gQ8/hC1bYOdOs7Fey5aQK5eZ1Rg1Ctq
"text/plain": [
"<Figure size 800x600 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-03-14 17:13:37 +01:00
"source": [
"AtomNumber = 1.00 * 1e7\n",
"BField = 1.4 * u.G\n",
2023-03-14 19:26:43 +01:00
"Wavelength = 1.064*u.um\n",
"w_x, w_z = 30*u.um, 30*u.um # Beam Waists in the x and y directions\n",
2023-03-14 17:13:37 +01:00
"modulation_depth = np.arange(0, 1.0, 0.08)\n",
"\n",
"w_xs = w_x * convert_modulation_depth_to_alpha(modulation_depth)[0]\n",
2023-03-14 19:26:43 +01:00
"new_aspect_ratio = w_xs / w_z\n",
2023-03-14 17:13:37 +01:00
"\n",
"v_x = np.zeros(len(modulation_depth))\n",
"v_y = np.zeros(len(modulation_depth))\n",
"v_z = np.zeros(len(modulation_depth))\n",
"\n",
"for i in range(len(modulation_depth)):\n",
2023-03-14 19:26:43 +01:00
" v_x[i] = calculateTrapFrequency(w_xs[i], w_z, Power, dir = 'x').value\n",
" v_y[i] = calculateTrapFrequency(w_xs[i], w_z, Power, dir = 'y').value\n",
" v_z[i] = calculateTrapFrequency(w_xs[i], w_z, Power, dir = 'z').value\n",
2023-03-14 17:13:37 +01:00
"\n",
"plotTrapFrequencies(v_x, v_y, v_z, modulation_depth, new_aspect_ratio, plot_against_mod_depth = True)"
]
},
{
"cell_type": "markdown",
"id": "76ff8301",
"metadata": {},
"source": [
"## Plot measured trap frequencies"
]
},
{
"cell_type": "code",
2024-06-07 20:27:50 +02:00
"execution_count": 6,
2023-03-14 17:13:37 +01:00
"id": "7a85ec41",
"metadata": {},
2024-06-07 20:27:50 +02:00
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAxUAAAJOCAYAAADBIyqKAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAAByXUlEQVR4nO3deXgUVdr38V9nJYSERSAECAQVWUdRcAmC4KAwomwy4/IggiIGBUSRVw0Ok8QZBhdkAGUwOggioD6K4IYIjoRF0GHL4xJRVJYQOyAgkATIWu8fNWnSSSek01vS/f1cV13pOnWq+u5ul777nPuUxTAMQwAAAABQS0G+DgAAAABA/UZSAQAAAMAlJBUAAAAAXEJSAQAAAMAlJBUAAAAAXEJSAQAAAMAlJBUAAAAAXEJSAQAAAMAlIb4OwBeKi4u1e/duxcTEKCiIvAoAAADuUVpaqsOHD+vyyy9XSEjgfNUOnFdazu7du3XVVVf5OgwAAAD4qf/85z+68sorfR2G1wRkUhETEyPJ/LBjY2N9HA0AAAD8hdVq1VVXXWX7vhkoAjKpKJvyFBsbq7Zt2/o4GgAAAPibQJtiH1ivFgAAAIDbkVQAAAAAcAlJBQAAAACXkFQAAAAAcElAFmoDAAD4q5KSEhUVFfk6DL8TGhqq4OBgX4dRZ5FUAAAA+AHDMJSTk6OTJ0/KMAxfh+N3LBaLGjdurFatWslisfg6nDqHpAIAAMAPnDx5UidOnFCLFi0UGRnJF183MgxD+fn5+vXXXxUREaEmTZr4OqQ6h6QCAACgnjMMQ0eOHFF0dLSaN2/u63D8UkREhAoKCnTkyBE1btyYpK0CCrUBAADquZKSEpWUlCg6OtrXofi16Oho23sNe4xUAAAA1HPFxcWSpJAQF77aWa3m5qzYWHMLAGXvb3FxsWvvt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rq5akJFwcHS6NHS5Mnmfj0cpZCkxJ6JGtppqF3bmaIz6rO4jyRpyz1bFBEaUem82Eb18/UCAOD3xo41l5S97DJz/+GHpQkTpIsv9kk43bp1U+/evbV161YVFxdLkv70pz85lVAsXrzYllDcfvvtmjlzplq3bq1Jkybpu+++08SJE7XEy0vm+guSCk8pP43p7Nnqi53OnrVfB7oeio2qPI0pvzDf9rhHqx6KDKs68wcAAHXQRRede5yaKlXzK7433H///dq6davdfk1lZmZq0qRJkqS4uDi99NJLkqSJEydq/fr1eu+99/Taa6+pf//+GuuDkZj6jqTCG+pYsRMAAEB9NGbMGI0ZM6ZW53bt2lX5+fkOj61evdqFqCCRVHhO+ULtq6+ufqTimmukXbvM/XpaqA0AAIDARVLhKWlpNSvULi2Vhg8/t19PC7UBAEA9V3HlSkk6c+bc44wMKaJyfWRd+EF0//796tChQ7V9NmzYoP79+3snoABEUuEp5Qu1y2RlSatXm//CxsaayURcnH0fRikAAIAvnO8H0T59HLfzgyhEUuE5jrL2K66Qhg3zTTwAAADVcfSDaE3UgR9E4+PjFYB3SahTSCoAAABQJ6Yxof4K8nUAAAAAAOo3kgoAAAAALiGpAAAAAOASaioAAADgcEXZmqAUAxJJBQAAAFTzW2xVxIqykEgqAAAAIMcryp45c+72FFu2VH3vO4CkAgAAAA6nMeXnn3vco4cUGenVkFCPUKgNAAAAwCUkFQAAAABcQlIBAACAOmvq1KmyWCyyWCxasWKF3bGZM2fajr344ovnvVZ8fLytv6Nt//79HnoV/s/nScXChdKll0rR0eaWkCB9/HH152zcKPXsKTVoIF14ofTSS96JFQAAIFBt2OCb573//vttj19//XW7Y8uWLZMkRURE6K677nL5uSwWi8vXCFQ+TyratpWeflrascPcfv97adgw6dtvHffft08aPFjq21favVuaPl166CFp5Urvxg0AAODvDOPc4+Rk+31v6dy5s/r27StJWr9+vXJyciRJ27dv1549eyRJt912m5o0aXLea+3fv1+GYcgwDBUVFemWW26xHbv//vvVvn1797+AAOHzpGLIEDNJuOQSc5s5U2rUSPriC8f9X3pJatdOmjtX6tJFuu8+6d57pdmzvRo2AACA3/v3v8893rVLWrfON3GUjVaUlJTYpkAtXbq00vGaKi0t1d13360PP/xQknTXXXdp4cKFboo2MPk8qSivpER6801z+bKEBMd9tm2TBg60bxs0yBzlKCryfIwAAACBwDCkp546tx8cLM2Y4ZvRij/+8Y9q2rSpJHMKVFFRkd58801JUvfu3dW7d2+nrvfAAw/ojTfekCSNHDlSS5YsUVBQnfpaXO/UiXfv66/N0YnwcGnCBGnVKqlrV8d9c3KkmBj7tpgYqbhYOnrU8TkFBQU6deqUbcvNzXXvCwAAAPAz69aZoxNlSkqk7dt9M1rRoEEDjR49WpKUkZGh5557Tkf/+8XP2VGKxx57TC+//LIkafDgwXrjjTcUHBzs3oADUJ1IKjp1kjIyzClPDzwgjRkjZWZW3b9iDU1ZxlxVbc2sWbPUuHFj29a1qowFAAAAMgxzVKLij/dBQb4brSifPCQnJ0syC7TLko2a+Nvf/qbnnntOkvT73/9eK1euVGhoqHsDDVB1IqkIC5Muvljq1UuaNUu67DJp3jzHfVu1MkcryjtyRAoJkS64wPE5SUlJOnnypG3LrC5jAQAACHCFhdLBg1JpqX17aamUlWUe97Zu3brZpjkVFxdLkv70pz/VqEC7zIwZM2yPP/vsM0VERLCkrJvUiaSiIsOQCgocH0tIkNavt29bt85MSKpKNMPDwxUdHW3boqKi3BswAACAHwkPN6c6bdlyrm3LFmnnTrM9PNw3cVWc6uTs1Cd4ToivA5g+XbrpJikuTsrNNQu109OltWvN40lJUna2VFbgP2GC9OKL0tSp0vjxZuH2okXSf2ttAAAA4AZxcVKzZuf2e/SQIiN
"text/plain": [
"<Figure size 800x600 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-03-14 17:13:37 +01:00
"source": [
"modulation_depth_radial = [0, 0.5, 0.3, 0.7, 0.9, 0.8, 1.0, 0.6, 0.4, 0.2, 0.1]\n",
"fx = [3.135, 0.28, 0.690, 0.152, 0.102, 0.127, 0.099, 0.205, 0.404, 1.441, 2.813]\n",
"dfx = [0.016, 0.006, 0.005, 0.006, 0.003, 0.002, 0.002,0.002, 0.003, 0.006, 0.024]\n",
"fz = [2.746, 1.278, 1.719, 1.058, 0.923, 0.994, 0.911, 1.157, 1.446, 2.191, 2.643]\n",
"dfz = [0.014, 0.007, 0.009, 0.007, 0.005, 0.004, 0.004, 0.005, 0.007, 0.009, 0.033]\n",
"\n",
"modulation_depth_axial = [1, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1]\n",
"fy = [3.08, 3.13, 3.27, 3.46, 3.61, 3.82, 3.51, 3.15, 3.11, 3.02]\n",
"dfy = [0.03, 0.04, 0.04, 0.05, 0.07, 0.06, 0.11, 0.07, 0.1, 1.31]\n",
"\n",
"plotMeasuredTrapFrequencies(fx, dfx, fy, dfy, fz, dfz, modulation_depth_radial, modulation_depth_axial, w_x, w_z, plot_against_mod_depth = True)"
]
},
{
"cell_type": "markdown",
"id": "4a4843d2",
"metadata": {},
"source": [
"## Plot ratio of measured to calculated trap frequencies"
]
},
{
"cell_type": "code",
2024-06-07 20:27:50 +02:00
"execution_count": 7,
2023-03-14 17:13:37 +01:00
"id": "58cf3f64",
"metadata": {},
2024-06-07 20:27:50 +02:00
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAnYAAAHWCAYAAAD6oMSKAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABXgklEQVR4nO3deXxTVf7/8Xe6L7RlhyBlEwQcZEdkEYoCjqg47o6gbCruIu6O2Hb064a4jKOI/hAYEXFcQAdBQFmkMCKrqIwKCAha0LK0pWva3N8fMZemSVfaprl5PR+PPMi9uUk+N6dp35xzz702wzAMAQAAIOCF+LsAAAAA1AyCHQAAgEUQ7AAAACyCYAcAAGARBDsAA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DkBg8DXknJd38v727WVfuihQerN8HWwvyVFUpPVpaRo0eLDCy7psUaAKljBQz3t5akQw7KN08hjfSZNO9qaHhrrOAVsPjvEl2AEIDBVdbNx9bcrSAunUEWWFUIdDmenpUq9e1jt1RLCEgWCYyR0M++g2frxrksgfx/g677xTobff7vdQJxHsAASKMnqzKhTIvVnBIFjCQD3v5akRPvbRYyKMFfaxpBLH+DqTkxXasKH/aimBYAcgMATSkCoqL5jCQD3u5akxpfZRU6ZYY7Z6RYeCfP215OtasX74vUWwAwD4V5CGAedf/qLQkrOb3QL9PzFWm60uVXgoSHhSku8H/HAoCMEOAOB/hIGTAum40GARQBObCHYAgDrlqyNLeSHaqMmargd0/xth6j/E+3kB15EVQGE
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-03-14 17:13:37 +01:00
"source": [
"modulation_depth = [0.5, 0.3, 0.7, 0.9, 0.8, 1.0, 0.6, 0.4, 0.2, 0.1]\n",
"w_xs = w_x * convert_modulation_depth_to_alpha(modulation_depth)[0]\n",
"\n",
"v_x = np.zeros(len(modulation_depth))\n",
"v_y = np.zeros(len(modulation_depth))\n",
"v_z = np.zeros(len(modulation_depth))\n",
"\n",
"for i in range(len(modulation_depth)):\n",
2023-03-14 19:26:43 +01:00
" v_x[i] = calculateTrapFrequency(w_xs[i], w_z, Power, dir = 'x').value / 1e3\n",
" v_y[i] = calculateTrapFrequency(w_xs[i], w_z, Power, dir = 'y').value\n",
" v_z[i] = calculateTrapFrequency(w_xs[i], w_z, Power, dir = 'z').value / 1e3\n",
2023-03-14 17:13:37 +01:00
"\n",
"fx = [0.28, 0.690, 0.152, 0.102, 0.127, 0.099, 0.205, 0.404, 1.441, 2.813]\n",
"dfx = [0.006, 0.005, 0.006, 0.003, 0.002, 0.002,0.002, 0.003, 0.006, 0.024]\n",
"fy = [3.08, 3.13, 3.27, 3.46, 3.61, 3.82, 3.51, 3.15, 3.11, 3.02]\n",
"dfy = [0.03, 0.04, 0.04, 0.05, 0.07, 0.06, 0.11, 0.07, 0.1, 1.31]\n",
"fz = [1.278, 1.719, 1.058, 0.923, 0.994, 0.911, 1.157, 1.446, 2.191, 2.643]\n",
"dfz = [0.007, 0.009, 0.007, 0.005, 0.004, 0.004, 0.005, 0.007, 0.009, 0.033]\n",
"\n",
"plotRatioOfTrapFrequencies(fx, fy, fz, dfx, dfy, dfz, v_x, v_y, v_z, modulation_depth, w_x, w_z, plot_against_mod_depth = True)\n"
]
},
{
"cell_type": "markdown",
"id": "44e92099",
"metadata": {},
"source": [
"## Plot Feshbach Resonances"
]
},
{
"cell_type": "code",
2024-06-07 20:27:50 +02:00
"execution_count": 8,
2023-03-14 17:13:37 +01:00
"id": "d15205ff",
"metadata": {},
2024-06-07 20:27:50 +02:00
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA3kAAAKyCAYAAABoqBcWAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAAC3KklEQVR4nOzdd3gU1f4G8HdTCEkIJAQIBAIBpHdRRJQuoFGxYS8oXq+KekXEgl4B9acoKqBgb6BgwWvHiICCSFHpvRs6IZQUUkg2yfz+OEwKKWyZ2XNm5v08D89Mwmby3Wx2su9+z5zj0jRNAxEREREREdlCkOwCiIiIiIiIyDgMeURERERERDbCkEdERERERGQjDHlEREREREQ2wpBHRERERERkIwx5RERERERENsKQR0REREREZCMMeURERERERDYSIrsAVRQXF+PQoUOIioqCy+WSXQ4REREREVE5mqbh5MmTiI+PR1BQ1f06hrzTDh06hISEBNllEBERERERVWv//v1o0qRJlf/PkHdaVFQUACAlJQV169aVXA35wu12Y/78+Rg8eDBCQ0Nll0M+sNNj+OKLwMsvA3ffDUyeLLuawLHTY+hUqj6GEycCL70EjBgBTJkiuxpA04DoaLG/ezdQr57Ucsox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1cdw69YeABrh0KFNSE7eI7scqaz6GFIp1R7DAwe6AWiK7du3ITl5l+xysHt3HQD9kJ9/CsnJ82WXUylvH8PiYuDECXFJzPr1v2H//lMef+3y5e0AtEZe3h4kJ2/06vt66vjxiwDUw9q1axAefrjC/69aFQegJzIyMpGcvAQAkJMzAEAUVqxYgaysE6bUZSb
"text/plain": [
"<Figure size 900x700 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-03-14 17:13:37 +01:00
"source": [
"plotScatteringLengths(B_range = [0, 3.6])"
]
},
{
"cell_type": "markdown",
"id": "1a2e113f",
"metadata": {},
"source": [
"## Calculate and Plot Collision Rates and PSD"
]
},
{
"cell_type": "code",
2024-06-07 20:27:50 +02:00
"execution_count": 9,
2023-03-14 17:13:37 +01:00
"id": "86e9ba21",
"metadata": {
"scrolled": false
},
2024-06-07 20:27:50 +02:00
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAxYAAAJOCAYAAAAqFJGJAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAADF6klEQVR4nOzdd3gUZdcG8Hs2CaElkZqQUAIovfdA6E2KNAGlI8UGAiKgvH4IiooFsCEoRYo0C00UpfdeFQhVkpAghJ5QU+f742Sy2TR2N5vMlvt3XXvt7Oxk9gQImTPP85yjqKqqgoiIiIiIKBsMegdARERERESOj4kFERERERFlGxMLIiIiIiLKNiYWRERERESUbUwsiIiIiIgo25hYEBERERFRtjGxICIiIiKibGNiQURERERE2eaudwCOJCEhAcePH4evry8MBuZkRERERPYmKSkJUVFRqF27Ntzdeambm/inbYHjx4+jQYMGeodBRERERE9w6NAh1K9fX+8wXAoTCwv4+voCkH+oJUqU0DkaIiIiIkrr6tWraNCgQcp1G+UeJhYW0KY/lShRAiVLltQ5GiIiIiLKjEXT1nftAj7/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jY4Hz53M3LiIiIp0xsXASX38NBAYC4eHAqFF6R0PkpFTVuHBb61+RmsFgLDvL6VBERORimFg4CW9v4Mcf5bpm8WLgl1/0jojICZ0+Dfz3H5A3L9C0acbHcJ0FERG5KCYWTiQ4GHjnHdl+5RXgyhV94yF
"text/plain": [
"<Figure size 800x600 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-03-14 17:13:37 +01:00
"source": [
"AtomNumber = 1.00 * 1e7\n",
"BField = 1.4 * u.G\n",
2023-03-14 19:26:43 +01:00
"Power = 40*u.W\n",
"Wavelength = 1.064*u.um\n",
"w_x, w_z = 30*u.um, 30*u.um # Beam Waists in the x and y directions\n",
2023-03-14 17:13:37 +01:00
"modulation_depth = np.arange(0, 1.0, 0.08)\n",
"\n",
"w_xs = w_x * convert_modulation_depth_to_alpha(modulation_depth)[0]\n",
"new_aspect_ratio = w_xs / w_z\n",
"Temperatures = convert_modulation_depth_to_temperature(modulation_depth)[0] * u.uK\n",
"\n",
"# n = np.zeros(len(modulation_depth))\n",
"Gamma_elastic = np.zeros(len(modulation_depth))\n",
"PSD = np.zeros(len(modulation_depth))\n",
"\n",
"for i in range(len(modulation_depth)):\n",
2023-03-14 19:26:43 +01:00
" # n[i] = particleDensity(w_xs[i], w_z, Power, N = AtomNumber, T = Temperatures[i]).decompose().to(u.cm**(-3))\n",
" Gamma_elastic[i] = calculateElasticCollisionRate(w_xs[i], w_z, Power, N = AtomNumber, T = Temperatures[i], B = BField).value\n",
" PSD[i] = calculatePSD(w_xs[i], w_z, Power, N = AtomNumber, T = Temperatures[i]).decompose().value\n",
2023-03-14 17:13:37 +01:00
"\n",
"\n",
"plotCollisionRatesAndPSD(Gamma_elastic, PSD, modulation_depth, new_aspect_ratio, plot_against_mod_depth = True)"
]
},
{
"cell_type": "markdown",
"id": "74d353c9",
"metadata": {},
"source": [
"## Plot Collision Rates and PSD from only measured trap frequencies"
]
},
{
"cell_type": "code",
2024-06-07 20:27:50 +02:00
"execution_count": 10,
2023-03-14 17:13:37 +01:00
"id": "6c81d9da",
"metadata": {},
2024-06-07 20:27:50 +02:00
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAxYAAAJOCAYAAAAqFJGJAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAACzxUlEQVR4nOzdd3gU1dcH8O9sEgKEIjUJNRRBkV5EepMmVVAQpIMiooKIKPLyo6hgoUkREZHeFAFBOlIk9CpVRKUESEKHJITUef84THY3je2zm/1+nmeenZ2dnTmBzWbO3HvPVVRVVUFERERERGQHg94BEBERERGR52NiQUREREREdmNiQUREREREdmNiQUREREREdmNiQUREREREdmNiQUREREREdmNiQUREREREdmNiQUREREREdvPVOwB3kZiYiOPHjyMwMBAGA/MtIiIiIk+UnJyMyMhIVKtWDb6+vNR1Jf5rP3b8+HE8//zzeodBRERERA5w6NAh1KpVS+8wvAoTi8cCAwMByIcwODhY52iIiIiIyBbh4eF4/vnnU67tyHWYWDymdX8KDg5GsWLFdI6GiIiIiOzBru2ux39xIiIiIiKyGxMLIiIiIiKyGxMLIiIiIiKyGxMLIiIiIiKyGxMLIiIiIiKyGxMLIiIiIiKyGxMLIiIiIiKyGxMLIiIiIiKyGxMLIiIiIiKyGxMLIiIiIiKyGxMLIiIiIiKyGxMLIiIiIiKyGxMLIiIiIiKyGxMLIiIiIiKyGxMLIiIiIiKyGxMLIiIiIiKyGxMLIiIiIiKyGxMLIiIiIiKyGxMLIiIiIiKyGxMLIiIiIiKym6/eAXiD8HBZrBUcLAsRkUfhlx4RkVdiYuECc+YA48ZZ/74xY4CxYx0eDhGRc/FLj4jIK7lVYjFxIvDJJ8CQIcC0abJNVeXv0/ffA3fvArVrA7NmAc89Z3xfXBwwfDiwfDkQGws0awZ8+y1QrJguP0YaAwcC7dubb4uNBerXl/XQU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4ECgfXvzbbGxQP36sh4aCuTIkfZ9bK0gIiLySEwsiMg50uvSFBNjXK9aFQgIcGlIRERE5DwcvE1ERERERHZjYkFERERERHZjVygiIiIish+rAXo9JhZEREREZD9WA/R6TCyIiIiIyH6sBuj1mFgQERERkf1YDdDrcfA2ERERERHZjYkFERERERHZjYkFERERERHZjYkFERERERHZjYkFERERERHZjYkFERERERHZjYkFERERERHZjYkFERERERHZjYkFERERERHZjYkFERERERHZjYkFERERERHZjYkFERERERHZjYkFERERERHZjYkFEREREXm3a9eAHj2AAgWAnDmBqlWBo0czf8/u3UCNGkD27EDp0sB33zkmlitXgHbtgIAAoGBB4L33gPh44+uXLgGKknbZvNkx57eDr94BEBGRl9m5E2jbVu8oiIjE3btAvXpAkybApk1A4cLAv/8CTz2V8XsuXgReegl44w1gyRJg717g7beBQoWAzp1tjyUpCWjTRo4TGgrcvg307g2oKjBjhvm+27cDzz1nfJ4/v+3ndRAmFkRE5HyqalwfM0b+cCqKfvEQEWm+/BIoXhyYP9+4LSQk8/d89x1QogQwbZo8f/ZZ4MgRYNIk88Ri/nzgq68kEQkJkdaHt9/O+LhbtwJnzwJhYUCRIrJt8mSgTx/g88+BPHmM+xYoAAQFWf5zugC7QhERkfP9/rtx/dgx+eNJROQO1q0DatYEXn1VWiuqVQPmzs38Pfv3Ay1amG9r2VKSi4QEeT53LjBqlCQE584BEyYAo0cDCxdmftyKFY1JhXbcuLi0XbPat5d469UDVq2y/Od1IrZYpJKYmIgE7QPh1PMAOXIY111wSiL9JSTAL2U1gR98b6Gq8Pm//0u5k6UCUEeNQlKTJmy1IMrqdPjeT0xMBABERUXhwYMHKdv9/f3h7++f9g3//QfMng0MGwZ88glw6JC0LPj7A716pX+SiAggMNB8W2CgXNTdugUEBwOffiqtDZ06yeulSklrxJw50r3J0uPmywdkyyavAUCuXMCUKZJQGAySGHXtKglLjx5P+udxKiYWqezfvx85c+Z0ybmWL5fHXbtccjoi3fk8egStZ/2WLVuQlD27rvGQaxQ6fhx1T59Oea4AUI4exYEJE3CzWjX9AiMip9Pje//hw4cAgAoVKphtHzNmDMaOHZv2DcnJ0mIxYYI8r1YNOHNGko2MEgsg7Y0RrcunogA3b0p3pv79ZRyGJjERyJtX1lu3BvbskfWSJeWc6R1XO7a2vWBB4P33ja/VrCnjRL76iomFu6lTpw6KFi3q9PM8fCjJLACEh0sBAqIsLyYmZbVly5ZS8YKyNlWF78iRUCEJRcpmAC/89huSPvmErRZEWZkO3/vXrl0DAJw9e9bsmi7d1gpALshSJSF49lngl18yPklQkLEFQXPjBuDrK2Mf7tyRbXPnArVrm+/n4yOPP/wAxMbKup+f8bgHD5rvf/eutPSkbskw9cILcjydMbFIxdfXF37af65Tz2P8LPn6Gj9PRFmayQfdz8+PH3xv8OgR8M8/aTYrAJSrV2FQVWniJ6KsSYfvfV9fubzNnTs38pgOds5IvXrA+fPm2/7+W1oRMlKnDrB+vfm2rVul9cDPT5KAokWlm9Xrr6d/jPRuZNepI2MywsONd6C3bpVuWTVqZBzP8ePG/XXExIKIiJxn9Wq505Y9uyQZgPQPjo4Gpk+XP5ZERHp6/32gbl3pCtWli4yx+P57WTQjR8pcF4sWyfO33gJmzpRxGW+8IYOu580z9nMHgLFjZaxGnjzS7SkuTgZ3370r70tPixbSetKzJ/D119LyMXy4nENLkhYulOSlWjUZY7F+vXyffvmlU/55rMGqUERE5BwxMcCIEbL+0UfG7a++Ko+bNrk+JiKi1GrVAtaskaSgYkUZdD1tmnlLQ3i4TFynKVU
"text/plain": [
"<Figure size 800x600 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-03-14 17:13:37 +01:00
"source": [
2023-03-14 19:26:43 +01:00
"AtomNumber = 1.00 * 1e7\n",
"BField = 1.4 * u.G\n",
"Wavelength = 1.064*u.um\n",
"w_x, w_z = 30*u.um, 30*u.um # Beam Waists in the x and y directions\n",
"\n",
2023-03-14 17:13:37 +01:00
"fin_mod_depth = [0.5, 0.3, 0.7, 0.9, 0.8, 1.0, 0.6, 0.4, 0.2, 0.1]\n",
"v_x = [0.28, 0.690, 0.152, 0.102, 0.127, 0.099, 0.205, 0.404, 1.441, 2.813] * u.kHz\n",
"dv_x = [0.006, 0.005, 0.006, 0.003, 0.002, 0.002,0.002, 0.003, 0.006, 0.024] * u.kHz\n",
"v_z = [1.278, 1.719, 1.058, 0.923, 0.994, 0.911, 1.157, 1.446, 2.191, 2.643] * u.kHz\n",
"dv_z = [0.007, 0.009, 0.007, 0.005, 0.004, 0.004, 0.005, 0.007, 0.009, 0.033] * u.kHz\n",
"sorted_modulation_depth, sorted_v_x = zip(*sorted(zip(fin_mod_depth, v_x)))\n",
"sorted_modulation_depth, sorted_dv_x = zip(*sorted(zip(fin_mod_depth, dv_x)))\n",
"sorted_modulation_depth, sorted_v_z = zip(*sorted(zip(fin_mod_depth, v_z)))\n",
"sorted_modulation_depth, sorted_dv_z = zip(*sorted(zip(fin_mod_depth, dv_z)))\n",
"\n",
"fin_mod_depth = [1, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1] \n",
"v_y = [3.08, 3.13, 3.27, 3.46, 3.61, 3.82, 3.51, 3.15, 3.11, 3.02] * u.Hz\n",
"dv_y = [0.03, 0.04, 0.04, 0.05, 0.07, 0.06, 0.11, 0.07, 0.1, 1.31] * u.Hz\n",
"sorted_modulation_depth, sorted_v_y = zip(*sorted(zip(fin_mod_depth, v_y)))\n",
"sorted_modulation_depth, sorted_dv_y = zip(*sorted(zip(fin_mod_depth, dv_y)))\n",
"\n",
"fin_mod_depth = [1.0, 0.8, 0.6, 0.4, 0.2, 0.9, 0.7, 0.5, 0.3, 0.1]\n",
"T_x = [22.1, 27.9, 31.7, 42.2, 145.8, 27.9, 33.8, 42.4, 61.9, 136.1] * u.uK\n",
"dT_x = [1.7, 2.6, 2.4, 3.7, 1.1, 2.2, 3.2, 1.7, 2.2, 1.2] * u.uK\n",
"T_y = [13.13, 14.75, 18.44, 26.31, 52.55, 13.54, 16.11, 21.15, 35.81, 85.8] * u.uK\n",
"dT_y = [0.05, 0.05, 0.07, 0.16, 0.28, 0.04, 0.07, 0.10, 0.21, 0.8] * u.uK\n",
"\n",
"sorted_modulation_depth, sorted_T_x = zip(*sorted(zip(fin_mod_depth, T_x)))\n",
"sorted_modulation_depth, sorted_dT_x = zip(*sorted(zip(fin_mod_depth, dT_x)))\n",
"sorted_modulation_depth, sorted_T_y = zip(*sorted(zip(fin_mod_depth, T_y)))\n",
"sorted_modulation_depth, sorted_dT_y = zip(*sorted(zip(fin_mod_depth, dT_y)))\n",
"\n",
"modulation_depth = sorted_modulation_depth\n",
"\n",
"pd, dpd, T, dT, new_aspect_ratio = calculateParticleDensityFromMeasurements(sorted_v_x, sorted_dv_x, sorted_v_y, sorted_dv_y, sorted_v_z, sorted_dv_z, w_x, w_z, sorted_T_x, sorted_T_y, sorted_dT_x, sorted_dT_y, sorted_modulation_depth, AtomNumber, m = 164*u.u)\n",
"\n",
"Gamma_elastic = [(pd[i] * scatteringCrossSection(BField) * meanThermalVelocity(T[i]) / (2 * np.sqrt(2))).decompose() for i in range(len(pd))]\n",
"Gamma_elastic_values = [(Gamma_elastic[i]).value for i in range(len(Gamma_elastic))]\n",
"dGamma_elastic = [(Gamma_elastic[i] * ((dpd[i]/pd[i]) + (dT[i]/(2*T[i])))).decompose() for i in range(len(Gamma_elastic))]\n",
"dGamma_elastic_values = [(dGamma_elastic[i]).value for i in range(len(dGamma_elastic))]\n",
"\n",
"PSD = [((pd[i] * thermaldeBroglieWavelength(T[i])**3).decompose()).value for i in range(len(pd))]\n",
"dPSD = [((PSD[i] * ((dpd[i]/pd[i]) - (1.5 * dT[i]/T[i]))).decompose()).value for i in range(len(Gamma_elastic))]\n",
"\n",
"fig, ax1 = plt.subplots(figsize=(8, 6))\n",
"ax2 = ax1.twinx()\n",
"ax1.errorbar(modulation_depth, Gamma_elastic_values, yerr = dGamma_elastic_values, fmt = 'ob', markersize=5, capsize=5)\n",
"ax2.errorbar(modulation_depth, PSD, yerr = dPSD, fmt = '-^r', markersize=5, capsize=5)\n",
"ax2.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1e'))\n",
"ax1.set_xlabel('Modulation depth', fontsize= 12, fontweight='bold')\n",
"ax1.set_ylabel('Elastic Collision Rate (' + str(Gamma_elastic[0].unit) + ')', fontsize= 12, fontweight='bold')\n",
"ax1.tick_params(axis=\"y\", labelcolor='b')\n",
"ax2.set_ylabel('Phase Space Density', fontsize= 12, fontweight='bold')\n",
"ax2.tick_params(axis=\"y\", labelcolor='r')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "9329ee37",
"metadata": {},
"source": [
"## Investigate deviation in alpha"
]
},
{
"cell_type": "code",
2024-06-07 20:27:50 +02:00
"execution_count": 11,
2023-03-14 17:13:37 +01:00
"id": "7b8191f2",
"metadata": {},
2024-06-07 20:27:50 +02:00
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\Karthik\\anaconda3\\envs\\Py39VEnv\\lib\\site-packages\\scipy\\optimize\\_minpack_py.py:1010: OptimizeWarning: Covariance of the parameters could not be estimated\n",
" warnings.warn('Covariance of the parameters could not be estimated',\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAnUAAAHWCAYAAAARl3+JAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABiaklEQVR4nO3deZyNdePG8c99zpnVbLYxlomxJWQpqZC00F6iDWWthEJUaDN6irRIu7YHJS0IaRHK1mop2aIwsg2DYVYzc5bv7w+P8yNDtpn7zJnr/XrNq5n7vs8515yvmbn63ptljDGIiIiISInmsDuAiIiIiJw+lToRERGRIKBSJyIiIhIEVOpEREREgoBKnYiIiEgQUKkTERERCQIqdSIiIiJBQKVOREREJAi47A5Q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uzgITYcC6pUzFgL29S2Bmeh9+abevWrf7PvV4v27ZtK3S7Q45139FjLT8Zh98+pbDj2Q7Pc+hM00MOnxUsLPexznT95ZdfuOmmm8jLy6NcuXLMnTuXs88++2Sji4hIoDIGVnyI+ephLHcu6SaKR9y9ya/YgPS0VCw44m/8ob8+g29uyWWh4TYE1u7XIuF0WAy/4eAuxn9WjENfD7+hfsAWumO58cYb/Z+/8cYbrFixgszMTJ544gn/LF39+vWPmqWzW4sWLfy7h3/77TfGjRtHdnY2CxcuPGLW8oYbbjih51u1ahXXXHMN2dnZxMTE8M0333DuuecWRXQREbHDgf0wtQfM7IflzuUHbwNu9IzmwqvvZOKADjzQpSN7Y85hjUnyf+yNOYf7u3Tksub
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAnUAAAHWCAYAAAARl3+JAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABpzElEQVR4nO3dd3zT1f7H8Vealg6gZVN2iyKggAiogCKgUhWUqYB4WaJXLsh0AKICXn9w0SviQBRFUEFFkKUXgapMAQUERcGBgKwyitDB6Ei/vz+OTVualrS0TZO+n49HHk1OTpJP8u1493y/33NslmVZiIiIiIhX8/N0ASIiIiJy+RTqRERERHyAQp2IiIiID1CoExEREfEBCnUiIiIiPkChTkRERMQHKNSJiIiI+ACFOhEREREfoFAnIiIi4gMU6kRERER8gFeGuvXr13PPPfdQvXp1bDYbS5cuveRj1q1bR/PmzQkKCqJu3bq8+eabhV+oiIiISBHxylB39uxZrr32Wl5//XW3+u/fv5+OHTvSpk0bduzYwVNPPcXw4cP59NNPC7lSERERkaJhsyzL8nQRl8Nms7FkyRK6du2aY58xY8awfPly9uzZ42wbPHgwP/zwA5s3by6CKkVE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rz+008/5fpaudVVtWpV5/WPPvrIuWs28yUtLY3AwMAsawAfOnQoy/P8+eefudYgIuLVEhLMqNzVV0NUFHz2mQl
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-03-14 17:13:37 +01:00
"source": [
"Power = 40*u.W\n",
"Wavelength = 1.064*u.um\n",
2023-03-14 19:26:43 +01:00
"w_x, w_z = 30*u.um, 30*u.um\n",
2023-03-14 17:13:37 +01:00
"\n",
"options = {\n",
" 'axis': 0, # axis referenced to the beam along which you want the dipole trap potential\n",
" 'extent': 3e2, # range of spatial coordinates in one direction to calculate trap potential over\n",
" 'crossed': False,\n",
" 'delta': 70, # angle between arms in degrees\n",
" 'modulation': False,\n",
" 'aspect_ratio': 5, # required aspect ratio of modulated arm\n",
2023-03-14 19:26:43 +01:00
" 'gravity': True,\n",
2023-03-14 17:13:37 +01:00
" 'tilt_gravity': False,\n",
" 'theta': 0.75, # gravity tilt angle in degrees\n",
" 'tilt_axis': [1, 0, 0], # lab space coordinates are rotated about x-axis in reference frame of beam\n",
" 'astigmatism': True,\n",
2023-03-15 11:29:21 +01:00
" 'foci_disp_single': 2.5*u.mm, #0.9 * z_R(w_0 = np.asarray([30]), lamb = 1.064)[0]*u.um, # difference in position of the foci along the propagation direction\n",
" 'foci_disp_crossed': [2.5*u.mm, 1.5*u.mm], # astigmatism of each of the two beams in the cODT\n",
" 'foci_shift': [0.0*u.mm, 0.0*u.mm],\n",
" 'beam_disp': [[0.0, 0.0, 0.0]*u.mm, [0, 0, 0.03]*u.mm],\n",
" 'extract_trap_frequencies': False # Flag to extract trap frequencies by fitting the computed potential\n",
2023-03-14 17:13:37 +01:00
"}\n",
"\n",
"modulation_depth = np.arange(0, 1.1, 0.1)\n",
"Alphas, fin_mod_dep, meas_alpha_x, meas_alpha_z, dalpha_x, dalpha_z = convert_modulation_depth_to_alpha(modulation_depth) \n",
"meas_alpha_deviation = [(g - h) for g, h in zip(meas_alpha_x, meas_alpha_z)]\n",
"sorted_fin_mod_dep, sorted_meas_alpha_deviation = zip(*sorted(zip(fin_mod_dep, meas_alpha_deviation)))\n",
"avg_alpha = [(g + h) / 2 for g, h in zip(meas_alpha_x, meas_alpha_z)]\n",
"sorted_fin_mod_dep, new_aspect_ratio = zip(*sorted(zip(fin_mod_dep, (w_x * avg_alpha) / w_z)))\n",
"\n",
"current_ar = w_x/w_z\n",
"aspect_ratio = np.arange(current_ar, 10*current_ar, 0.8)\n",
"w_x = w_x * (aspect_ratio / current_ar)\n",
"\n",
"v_x = np.zeros(len(w_x))\n",
"#v_y = np.zeros(len(w_x))\n",
"v_z = np.zeros(len(w_x))\n",
"\n",
"for i in range(len(w_x)):\n",
" \n",
" options['axis'] = 0\n",
2023-03-14 19:26:43 +01:00
" ExtractedTrapFrequencies = computeTrapPotential(w_x[i], w_z, Power, options)[5]\n",
2023-03-14 17:13:37 +01:00
" tmp = ExtractedTrapFrequencies[0][0]\n",
" v_x[i] = tmp if not np.isinf(tmp) else np.nan\n",
" \n",
" # options['axis'] = 1\n",
2023-03-14 19:26:43 +01:00
" # ExtractedTrapFrequencies = computeTrapPotential(w_x[i], w_z, Power, options)[5]\n",
2023-03-14 17:13:37 +01:00
" # tmp = ExtractedTrapFrequencies[1][0]\n",
" # v_y[i] = tmp if not np.isinf(tmp) else np.nan\n",
" \n",
" options['axis'] = 2\n",
2023-03-14 19:26:43 +01:00
" ExtractedTrapFrequencies = computeTrapPotential(w_x[i], w_z, Power, options)[5]\n",
2023-03-14 17:13:37 +01:00
" tmp = ExtractedTrapFrequencies[0][0]\n",
" v_z[i] = tmp if not np.isinf(tmp) else np.nan\n",
"\n",
2023-03-14 19:26:43 +01:00
" #v_x[i] = calculateTrapFrequency(w_x[i], w_z, Power, dir = 'x').value\n",
" #v_y[i] = calculateTrapFrequency(w_x[i], w_z, Power, dir = 'y').value\n",
" #v_z[i] = calculateTrapFrequency(w_x[i], w_z, Power, dir = 'z').value\n",
2023-03-14 17:13:37 +01:00
"\n",
"alpha_x = [(v_x[0]/v)**(2/3) for v in v_x]\n",
"alpha_z = [(v_z[0]/v)**2 for v in v_z]\n",
"\n",
"calc_alpha_deviation = [(g - h) for g, h in zip(alpha_x, alpha_z)]\n",
"\n",
"plt.figure()\n",
"plt.plot(aspect_ratio, alpha_x, '-o', label = 'From horz TF')\n",
"plt.plot(aspect_ratio, alpha_z, '-^', label = 'From vert TF')\n",
"plt.xlabel('Aspect Ratio', fontsize= 12, fontweight='bold')\n",
"plt.ylabel('$\\\\alpha$', fontsize= 12, fontweight='bold')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.legend(prop={'size': 12, 'weight': 'bold'})\n",
"plt.show()\n",
"\n",
"plt.figure()\n",
"plt.plot(aspect_ratio, calc_alpha_deviation, '--ob', label = 'Extracted')\n",
"plt.plot(new_aspect_ratio, sorted_meas_alpha_deviation, '-or', label = 'Measured')\n",
"plt.xlabel('Aspect Ratio', fontsize= 12, fontweight='bold')\n",
"plt.ylabel('$\\\\Delta \\\\alpha$', fontsize= 12, fontweight='bold')\n",
"plt.ylim([-0.5, 1])\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.legend(prop={'size': 12, 'weight': 'bold'})\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "29a1cf87",
"metadata": {},
"source": [
"## Quick calculation of PSD and elastic collision rate"
]
},
{
"cell_type": "code",
2024-06-07 20:27:50 +02:00
"execution_count": 12,
2023-03-14 17:13:37 +01:00
"id": "3950f1b5",
"metadata": {},
2024-06-07 20:27:50 +02:00
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Particle Density = 1.87E+12 1 / cm3\n",
"Elastic Collision Rate = 37.24 1 / s\n",
"PSD = 2.50E-05 \n"
]
}
],
2023-03-14 17:13:37 +01:00
"source": [
"Power = 9.5*u.W\n",
"Wavelength = 1.064*u.um\n",
"w_x, w_z = 50*u.um, 45*u.um # Beam Waists in the x and y directions\n",
"\n",
"NCount = 11000\n",
"AtomNumber = calculateAtomNumber(NCount, pixel_size = 3.45 * u.um, magnification = 0.5, eta = 0.5)\n",
2023-03-15 11:29:21 +01:00
"#AtomNumber = calculateAtomNumber(NCount, pixel_size = 5.86 * u.um, magnification = 0.5, eta = 0.5)\n",
2023-03-14 17:13:37 +01:00
"\n",
"BField = 3.75 * u.G\n",
"modulation_depth = 0.00\n",
"\n",
"w_x = w_x * convert_modulation_depth_to_alpha(modulation_depth)[0]\n",
"new_aspect_ratio = w_x / w_z\n",
"Temperature = 33 * u.uK\n",
"\n",
2023-03-14 19:26:43 +01:00
"n = particleDensity(w_x, w_z, Power, N = AtomNumber, T = Temperature).decompose().to(u.cm**(-3))\n",
"Gamma_elastic = calculateElasticCollisionRate(w_x, w_z, Power, N = AtomNumber, T = Temperature, B = BField)\n",
"PSD = calculatePSD(w_x, w_z, Power, N = AtomNumber, T = Temperature).decompose()\n",
2023-03-14 17:13:37 +01:00
"\n",
"print('Particle Density = %.2E ' % (n.value) + str(n.unit))\n",
"print('Elastic Collision Rate = %.2f ' % (Gamma_elastic.value) + str(Gamma_elastic.unit))\n",
"print('PSD = %.2E ' % (PSD.value))"
]
},
{
"cell_type": "markdown",
"id": "d975586b",
"metadata": {},
"source": [
"## Plot measured PSDs and collision rates"
]
},
{
"cell_type": "code",
2024-06-07 20:27:50 +02:00
"execution_count": 13,
2023-03-14 17:13:37 +01:00
"id": "b11b6aae",
"metadata": {},
2024-06-07 20:27:50 +02:00
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAxYAAAJOCAYAAAAqFJGJAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAAC+LklEQVR4nOzdd3gUVRcG8HdSSAiE0BMIHaSG3gwgSJEmTVCQ3gUB6VVFQEWKNKWDSJGuoIKCIi1+QO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lROTYmFgQERFZkzYNqkoVIGtW857r4yPJBQBMm2bduIhsQJsG1aOHrmGQnWBiQUREZE2WTINKaOhQmai+f7/xXER26PRp4OhRwM0N6NxZ72jIHjCxICIisiZTG+OlJF8+oHt32eaoBdkxrXdFixZAnjy6hkJ2gokFERGRtdy5I+sjAMsTC0BKzyoK8MsvcluYyM7ExADffSfbXLRNGiYWRERE1nLggDyWLp22W7ivvAK0ayfb06enPS4iK/vtN+DmTSBvXqBZM72jIXvBxIKIiMha0joNKqExY+Rx3TqpMkVkR7RF2126mNYDkpwDEwsiIiJrSevC7YSqVQMaNgQMBmDWrLSfj8hKbt0Ctm6VbU6DooSYWBAREVnD06dSIgewTmIBGEctli6V9RtEdmDtWsl3q1UDAgL0jobsCRMLIiIiazh0SFa05s8PFClinXM2aiT9MJ48AebNs845idKIvSsoJUwsiIiIrCHhNChFsc45FcU4avH118Djx9Y5L5GFQkKAv/6SVisdO+odDdkbJhZ
"text/plain": [
"<Figure size 800x600 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-03-14 17:13:37 +01:00
"source": [
"Gamma_elastic = [96.01, 82.53, 102.95, 143.5, 110.92, 471.77, 908.46]\n",
"PSD = [8.95e-05, 4.19e-04, 2.94e-04, 2.17e-04, 8.98e-04, 5.52e-04, 6.10e-04]\n",
"\n",
"fig, ax1 = plt.subplots(figsize=(8, 6))\n",
"ax2 = ax1.twinx()\n",
"\n",
"ax1.plot(Gamma_elastic, '-ob')\n",
"ax2.plot(PSD, '-*r')\n",
"ax2.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1e'))\n",
"\n",
"ax1.set_xlabel('Optimization Steps', fontsize= 12, fontweight='bold')\n",
"ax1.set_ylabel('Elastic Collision Rate', fontsize= 12, fontweight='bold')\n",
"ax1.tick_params(axis=\"y\", labelcolor='b')\n",
"ax2.set_ylabel('Phase Space Density', fontsize= 12, fontweight='bold')\n",
"ax2.tick_params(axis=\"y\", labelcolor='r')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "da1a3346",
"metadata": {},
"source": [
2023-03-16 19:28:49 +01:00
"## Plot crossed beam trap potential resulting for given parameters only"
2023-03-14 17:13:37 +01:00
]
},
{
"cell_type": "code",
2024-06-07 20:27:50 +02:00
"execution_count": 14,
2023-03-14 17:13:37 +01:00
"id": "f17a4d01",
"metadata": {},
2024-06-07 20:27:50 +02:00
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.legend.Legend at 0x11ebf064970>"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA3kAAAKyCAYAAABoqBcWAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAACZ4ElEQVR4nOzdeXiU1d3/8c/MZDLZN7KyhCAqiriCyqICLqBSFFttfbQItdVa61KXp+rjr49Qi9aKbZ/aarWLVmvrWq11qeAuAooUFEFQlpBACGTfMzOZuX9/TGZIIAkzMJN7lvfrunJBZu5MvsnJ9plzzvdYDMMwBAAAAACIC1azCwAAAAAAhA8hDwAAAADiCCEPAAAAAOIIIQ8AAAAA4gghDwAAAADiCCEPAAAAAOIIIQ8AAAAA4gghDwAAAADiCCEPAAAAAOIIIQ8AAAAA4kjchryHHnpIo0aNUkpKisaPH68PPvjA7JIAAAAAIOLiMuQ988wz+tGPfqQ777xTa9as0emnn67zzjtPFRUVZpcGAAAAABFlMQzDMLuIcDv11FN10kkn6eGHHw7cdvTRR2vOnDm69957TawMAAAAACIr7mbyXC6XVq9erRkzZvS6fcaMGVq+fLlJVQEAAADA4Egyu4Bwq62tlcfjUVFRUa/bi4qKVF1d3efbOJ1OOZ3OwOter1f19fUaMmSILBZLROsFAAAAgGAYhqGWlhYNHTpUVmv/83VxF/L89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ILRZLxI6daGxs1IIFC7RgwQI9/vjjA35sfd0faeXl5QN+bvd9KS8vH/QaD6RnfVarVSkpKSosLNSECRN0/fXX67PPPhv0ml566aXAuPf1OfPXW1ZWNui17avT7VF5bbt++8C9On5Ero4oypQ9ybbf2L/77ruBt1mwYIFsNptyc3MDZ13t+zJ//vyg3v/VV1+t8ePHq6CgQHa7Xenp6Ro7dqxuuukmVVdX73f9l19+qblz52ro0KFKTk5WSUmJ5s6dq82bN4fpM9Lb448/HviYpk2b1uu+119/XampqYGvvT/84Q8RqcEM5eXluuOOOzR16lQdc8wxSktLU3FxsU477TT99a9/ldfr7XV9z89TXy89f751dnbqvvvu09e+9jUddthhysjIUE5Ojk444QT97Gc/U0tLS9B1NjY26o477tC4ceOUnp4uu92u4uJizZkzR8uXLw/XpyNk7733ns477zzl5eUpJSVFY8aM0U9+8hO1trYG/RhLly7Vt7/9bR155JGyWq19fi/uq6KiQtddd50OP/xwpaSkKDs7W2PHjtU111wT1Pvs+T2978+ud999N6p+dvViYD9NTU2GJKOpqcnsUgzDMAyXy2W89NJLhsvlMrsURBhjHV4dHR3Ghg0bjI6ODrNL2Y/H4zEaGhoMj8ez33076tuNTysbjC92NRkej7fPt7/rrrsMSf2+ZGdn97r+9ttv3++a448/3jAMw/j3v//d52M0NDSE+aP22bZtW+B9TJ06dcCP7bHHHotIDcHWF8zLtm3bBny8gcY6Ug5Us9VqNf73f/930OoxDMOYN29e4P2/8847/dY8cuTIQa1rX063x9hQ1WR8WtlgXHfr/t83PV96fhwH+p6UZFx33XVB1WCz2fp9jJEjRxotLS2Baz/55BMjIyOjz2tzcnKMNWvWhPkzZBiPPfZYn9/DL730kpGcnBz4Gnv88cfD/r7N9Pe//33A8b388st7Xd/z89TXS8+fb7t27Rrw2qOOOspobm4+YI1dXV3GiSee2O/jJCUl9fn9F2l//etfDavV2mdNEyZMMNrb24N6nBtvvPGA34s9LVu2zMjJyenzbWw22wHfn8fjGfDn/TvvvBP2n10H+tsl2JzCTB4ARJnibIf
"text/plain": [
"<Figure size 900x700 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-03-14 19:26:43 +01:00
"source": [
"Powers = [1, 11] * u.W\n",
2023-03-14 17:13:37 +01:00
"Wavelength = 1.064*u.um\n",
2023-03-16 19:28:49 +01:00
"w_x = [27, 67]*u.um # Beam Waists in the x direction\n",
"w_z = [31, 67]*u.um # Beam Waists in the y direction\n",
2023-03-14 17:13:37 +01:00
"\n",
"options = {\n",
2023-03-16 19:28:49 +01:00
" 'axis':2, # axis referenced to the beam along which you want the dipole trap potential\n",
" 'extent': 3e2, # range of spatial coordinates in one direction to calculate trap potential over\n",
2023-03-15 11:29:21 +01:00
" 'crossed': True, # Flag for either a crossed beam configuration or a single focussed beam\n",
2023-03-14 17:13:37 +01:00
" 'delta': 70, # angle between arms in degrees\n",
2023-03-15 11:29:21 +01:00
" 'modulation': False, # Flag for spatial modulation of a single beam\n",
2023-03-14 17:13:37 +01:00
" 'aspect_ratio': 5, # required aspect ratio of modulated arm\n",
2023-03-15 11:29:21 +01:00
" 'gravity': False, # Flag for adding levitation/gravitation potential\n",
" 'tilt_gravity': False, # Flag for tilt of the beam wrt to gravity axis\n",
2023-03-14 17:13:37 +01:00
" 'theta': 0.75, # gravity tilt angle in degrees\n",
" 'tilt_axis': [1, 0, 0], # lab space coordinates are rotated about x-axis in reference frame of beam\n",
2023-03-15 11:29:21 +01:00
" 'astigmatism': False, # Flag for astigmatism of beam\n",
" 'foci_disp_single': 2.5*u.mm, #0.9 * z_R(w_0 = np.asarray([30]), lamb = 1.064)[0]*u.um, # difference in position of the foci along the propagation direction\n",
2023-03-16 19:28:49 +01:00
" 'foci_disp_crossed': [2.5*u.mm, 2.8*u.mm], # astigmatism of each of the two beams in the cODT\n",
2023-03-15 11:29:21 +01:00
" 'foci_shift': [0.0*u.mm, 0.0*u.mm],\n",
2023-03-16 19:28:49 +01:00
" 'beam_disp': [[0.0, 0.0, 0.05]*u.mm, [0.0, 0.0, 0.0]*u.mm], # shift arm 1 along x, z; shift arm 2 along y, z\n",
" 'extract_trap_frequencies': True # Flag to extract trap frequencies by fitting the computed potential\n",
2023-03-14 17:13:37 +01:00
"}\n",
"\n",
2023-03-15 11:29:21 +01:00
"Positions, IdealTrappingPotential, TrappingPotential, TrapDepthsInKelvin, CalculatedTrapFrequencies, ExtractedTrapFrequencies = computeTrapPotential(w_x, w_z, Powers, options)\n",
"\n",
"EffectiveTrapDepthInKelvin = TrapDepthsInKelvin[1]\n",
2023-03-16 19:28:49 +01:00
"v = ExtractedTrapFrequencies[1][0]\n",
"dv = ExtractedTrapFrequencies[1][1]\n",
2023-03-14 17:13:37 +01:00
"\n",
2023-03-16 19:28:49 +01:00
"plt.figure(figsize=(9, 7))\n",
2023-03-15 11:29:21 +01:00
"plt.plot(Positions[options['axis']], TrappingPotential[options['axis']], label = 'Effective Trap Depth = ' + str(round(EffectiveTrapDepthInKelvin.value, 2)) + ' ' + str(EffectiveTrapDepthInKelvin.unit) + '; ' + generate_label(v, dv)) \n",
2023-03-16 19:28:49 +01:00
"#plt.plot(Positions[options['axis']], TrappingPotential[options['axis']]) \n",
2023-03-15 11:29:21 +01:00
"axis = options['axis']\n",
"if axis == 0:\n",
" dir = 'X - Horizontal'\n",
"elif axis == 1:\n",
" dir = 'Y - Propagation'\n",
"else:\n",
" dir = 'Z - Vertical'\n",
" \n",
"plt.ylim(top = 0)\n",
"plt.xlabel(dir + ' Direction (um)', fontsize= 12, fontweight='bold')\n",
"plt.ylabel('Trap Potential (uK)', fontsize= 12, fontweight='bold')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.legend(loc=1, prop={'size': 12, 'weight': 'bold'})"
2023-03-14 17:13:37 +01:00
]
},
{
"cell_type": "markdown",
"id": "1a28b820",
"metadata": {},
"source": [
"## Calculate trap frequencies in a crossed beam trap for given parameters"
]
},
{
"cell_type": "code",
2024-06-07 20:27:50 +02:00
"execution_count": 15,
2023-03-14 17:13:37 +01:00
"id": "09149423",
"metadata": {},
2024-06-07 20:27:50 +02:00
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"v_x = 480.60 Hz\n",
"v_y = 255.73 Hz\n",
"v_z = 492.63 Hz\n"
]
}
],
2023-03-14 17:13:37 +01:00
"source": [
"Powers = [1, 11] * u.W\n",
2023-03-16 19:28:49 +01:00
"w_x = [27, 67]*u.um # Beam Waists in the x direction\n",
"w_z = [31, 67]*u.um # Beam Waists in the y direction\n",
2023-03-14 17:13:37 +01:00
"\n",
"options = {\n",
" 'axis': 1, # axis referenced to the beam along which you want the dipole trap potential\n",
" 'extent': 1e3, # range of spatial coordinates in one direction to calculate trap potential over\n",
2023-03-14 19:26:43 +01:00
" 'crossed': True, # Flag for either a crossed beam configuration or a single focussed beam\n",
2023-03-14 17:13:37 +01:00
" 'delta': 70, # angle between arms in degrees\n",
2023-03-14 19:26:43 +01:00
" 'modulation': False, # Flag for spatial modulation of a single beam\n",
2023-03-14 17:13:37 +01:00
" 'aspect_ratio': 5, # required aspect ratio of modulated arm\n",
2023-03-14 19:26:43 +01:00
" 'gravity': False, # Flag for adding levitation/gravitation potential\n",
" 'tilt_gravity': False, # Flag for tilt of the beam wrt to gravity axis\n",
2023-03-14 17:13:37 +01:00
" 'theta': 0.75, # gravity tilt angle in degrees\n",
" 'tilt_axis': [1, 0, 0], # lab space coordinates are rotated about x-axis in reference frame of beam\n",
2023-03-14 19:26:43 +01:00
" 'astigmatism': False, # Flag for astigmatism of beam\n",
2023-03-15 11:29:21 +01:00
" 'foci_disp_single': 2.5*u.mm, #0.9 * z_R(w_0 = np.asarray([30]), lamb = 1.064)[0]*u.um, # difference in position of the foci along the propagation direction\n",
" 'foci_disp_crossed': [2.5*u.mm, 1.5*u.mm], # astigmatism of each of the two beams in the cODT\n",
" 'foci_shift': [0.01*u.mm, 0.20*u.mm],\n",
2023-03-16 19:28:49 +01:00
" 'beam_disp': [[0, 0, 0.0]*u.mm, [0, 0, 0.0]*u.mm],\n",
2023-03-14 19:26:43 +01:00
" 'extract_trap_frequencies': False # Flag to extract trap frequencies by fitting the computed potential\n",
2023-03-14 17:13:37 +01:00
"}\n",
"\n",
"v_x = calculateCrossedBeamTrapFrequency(options['delta'], [w_x, w_z], Powers, dir = 'x')\n",
"v_y = calculateCrossedBeamTrapFrequency(options['delta'], [w_x, w_z], Powers, dir = 'y')\n",
"v_z = calculateCrossedBeamTrapFrequency(options['delta'], [w_x, w_z], Powers, dir = 'z')\n",
"\n",
"print('v_x = %.2f ' %(v_x.value) + str(v_x.unit))\n",
"print('v_y = %.2f ' %(v_y.value) + str(v_y.unit))\n",
"print('v_z = %.2f ' %(v_z.value) + str(v_z.unit))"
]
},
2023-03-16 19:28:49 +01:00
{
"cell_type": "markdown",
"id": "3cf7eb64",
"metadata": {},
"source": [
"## Calculate trap frequencies, trap depths in a crossed beam trap for different shifts of Arm 2 along Y and Z"
]
},
2023-03-14 17:13:37 +01:00
{
"cell_type": "code",
"execution_count": null,
2023-03-15 11:29:21 +01:00
"id": "fc585c24",
2023-03-16 19:28:49 +01:00
"metadata": {
"scrolled": false
},
"outputs": [],
"source": [
"Powers = [1, 11] * u.W\n",
"Wavelength = 1.064*u.um\n",
"w_x = [27, 67]*u.um # Beam Waists in the x direction\n",
"w_z = [31, 67]*u.um # Beam Waists in the y direction\n",
"\n",
"options = {\n",
" 'axis':1, # axis referenced to the beam along which you want the dipole trap potential\n",
" 'extent': 2e3, # range of spatial coordinates in one direction to calculate trap potential over\n",
" 'crossed': True, # Flag for either a crossed beam configuration or a single focussed beam\n",
" 'delta': 70, # angle between arms in degrees\n",
" 'modulation': False, # Flag for spatial modulation of a single beam\n",
" 'aspect_ratio': 5, # required aspect ratio of modulated arm\n",
" 'gravity': False, # Flag for adding levitation/gravitation potential\n",
" 'tilt_gravity': False, # Flag for tilt of the beam wrt to gravity axis\n",
" 'theta': 0.75, # gravity tilt angle in degrees\n",
" 'tilt_axis': [1, 0, 0], # lab space coordinates are rotated about x-axis in reference frame of beam\n",
" 'astigmatism': False, # Flag for astigmatism of beam\n",
" 'foci_disp_single': 2.5*u.mm, #0.9 * z_R(w_0 = np.asarray([30]), lamb = 1.064)[0]*u.um, # difference in position of the foci along the propagation direction\n",
" 'foci_disp_crossed': [2.5*u.mm, 2.8*u.mm], # astigmatism of each of the two beams in the cODT\n",
" 'foci_shift': [0.0*u.mm, 0.0*u.mm],\n",
" 'beam_disp': [[0.0, 0.0, 0.0]*u.mm, [0.0, 0.0, 0.0]*u.mm],\n",
" 'extract_trap_frequencies': True # Flag to extract trap frequencies by fitting the computed potential\n",
"}\n",
"\n",
"disp_range = 100\n",
"yvals = np.arange(-disp_range, disp_range, 5) \n",
"zvals = np.arange(-disp_range, disp_range, 5)\n",
"\n",
"TrapDepths = np.zeros((len(yvals), len(zvals))) * u.uK\n",
"TrapFrequencies = np.zeros((len(yvals), len(zvals)))\n",
"\n",
"idx = 0\n",
"if options['extract_trap_frequencies']:\n",
" idx = 1\n",
" \n",
"for i in range(len(yvals)):\n",
" options['beam_disp'][1][1] = yvals[i] * u.um\n",
" for j in range(len(zvals)):\n",
" options['beam_disp'][1][2] = zvals[j] * u.um\n",
" Positions, IdealTrappingPotential, TrappingPotential, TrapDepthsInKelvin, CalculatedTrapFrequencies, ExtractedTrapFrequencies = computeTrapPotential(w_x, w_z, Powers, options)\n",
" TrapDepths[i][j] = TrapDepthsInKelvin[1] \n",
" try:\n",
" if np.isnan(ExtractedTrapFrequencies[idx][0].value):\n",
" TrapFrequencies[i][j] = np.nan\n",
" else:\n",
" TrapFrequencies[i][j] = ExtractedTrapFrequencies[idx][0] \n",
" except:\n",
" TrapFrequencies[i][j] = ExtractedTrapFrequencies[idx][0] "
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e060601f",
"metadata": {
"scrolled": false
},
"outputs": [],
"source": [
"fig, ax = plt.subplots()\n",
"axis = options['axis']\n",
"if axis == 0:\n",
" dir = 'X'\n",
"elif axis == 1:\n",
" dir = 'Y'\n",
"else:\n",
" dir = 'Z'\n",
"plt.title('Trap Frequency along ' + dir)\n",
"c = ax.matshow(np.asarray(TrapFrequencies), origin='lower', cmap = 'coolwarm', aspect = 1)\n",
"x_pos = np.arange(len(zvals))\n",
"plt.xticks(x_pos, zvals)\n",
"#plt.xticks(np.arange(min(zvals.value), max(zvals.value), 30))\n",
"ax.xaxis.set_ticks_position('bottom')\n",
"y_pos = np.arange(len(yvals))\n",
"plt.yticks(y_pos, yvals)\n",
"#plt.yticks(np.arange(min(yvals.value), max(yvals.value), 30))\n",
"plt.xlabel('Z - shift (um)', fontsize= 12, fontweight='bold')\n",
"plt.ylabel('Y - shift (um)', fontsize= 12, fontweight='bold')\n",
"plt.setp(ax.get_xticklabels(), rotation=45, horizontalalignment='right')\n",
"fig.colorbar(c, ax = ax)\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "1fe6e6de",
"metadata": {},
"source": [
"## Calculate trap frequencies, trap depths in a crossed beam trap for different shifts of Arm 1 along X and Z"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "faf6d746",
"metadata": {},
"outputs": [],
"source": [
"Powers = [1, 11] * u.W\n",
"Wavelength = 1.064*u.um\n",
"w_x = [27, 67]*u.um # Beam Waists in the x direction\n",
"w_z = [31, 67]*u.um # Beam Waists in the y direction\n",
"\n",
"options = {\n",
" 'axis':2, # axis referenced to the beam along which you want the dipole trap potential\n",
" 'extent': 3e3, # range of spatial coordinates in one direction to calculate trap potential over\n",
" 'crossed': True, # Flag for either a crossed beam configuration or a single focussed beam\n",
" 'delta': 70, # angle between arms in degrees\n",
" 'modulation': False, # Flag for spatial modulation of a single beam\n",
" 'aspect_ratio': 5, # required aspect ratio of modulated arm\n",
" 'gravity': False, # Flag for adding levitation/gravitation potential\n",
" 'tilt_gravity': False, # Flag for tilt of the beam wrt to gravity axis\n",
" 'theta': 0.75, # gravity tilt angle in degrees\n",
" 'tilt_axis': [1, 0, 0], # lab space coordinates are rotated about x-axis in reference frame of beam\n",
" 'astigmatism': False, # Flag for astigmatism of beam\n",
" 'foci_disp_single': 2.5*u.mm, #0.9 * z_R(w_0 = np.asarray([30]), lamb = 1.064)[0]*u.um, # difference in position of the foci along the propagation direction\n",
" 'foci_disp_crossed': [2.5*u.mm, 2.8*u.mm], # astigmatism of each of the two beams in the cODT\n",
" 'foci_shift': [0.0*u.mm, 0.0*u.mm],\n",
" 'beam_disp': [[0.0, 0.0, 0.0]*u.mm, [0.0, 0.0, 0.0]*u.mm],\n",
" 'extract_trap_frequencies': True # Flag to extract trap frequencies by fitting the computed potential\n",
"}\n",
"\n",
"disp_range = 100\n",
"xvals = np.arange(-disp_range, disp_range, 5) \n",
"zvals = np.arange(-disp_range, disp_range, 5)\n",
"\n",
"TrapDepths = np.zeros((len(xvals), len(zvals))) * u.uK\n",
"TrapFrequencies = np.zeros((len(xvals), len(zvals)))\n",
"\n",
"idx = 0\n",
"if options['extract_trap_frequencies']:\n",
" idx = 1\n",
" \n",
"for i in range(len(xvals)):\n",
" options['beam_disp'][0][0] = xvals[i] * u.um\n",
" for j in range(len(zvals)):\n",
" options['beam_disp'][0][2] = zvals[j] * u.um\n",
" Positions, IdealTrappingPotential, TrappingPotential, TrapDepthsInKelvin, CalculatedTrapFrequencies, ExtractedTrapFrequencies = computeTrapPotential(w_x, w_z, Powers, options)\n",
" TrapDepths[i][j] = TrapDepthsInKelvin[1] \n",
" try:\n",
" if np.isnan(ExtractedTrapFrequencies[idx][0].value):\n",
" TrapFrequencies[i][j] = np.nan\n",
" else:\n",
" TrapFrequencies[i][j] = ExtractedTrapFrequencies[idx][0] \n",
" except:\n",
" TrapFrequencies[i][j] = ExtractedTrapFrequencies[idx][0] "
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "387ec0a1",
"metadata": {},
"outputs": [],
"source": [
"fig, ax = plt.subplots()\n",
"axis = options['axis']\n",
"if axis == 0:\n",
" dir = 'X'\n",
"elif axis == 1:\n",
" dir = 'Y'\n",
"else:\n",
" dir = 'Z'\n",
"plt.title('Trap Frequency along ' + dir)\n",
"\n",
"c = ax.matshow(np.asarray(TrapFrequencies), origin='lower', cmap = 'coolwarm', aspect = 1)\n",
"\n",
"x_pos = np.arange(len(zvals))\n",
"plt.xticks(x_pos, zvals)\n",
"#plt.xticks(np.arange(min(zvals.value), max(zvals.value), 30))\n",
"ax.xaxis.set_ticks_position('bottom')\n",
"x_pos = np.arange(len(xvals))\n",
"plt.yticks(x_pos, xvals)\n",
"#plt.yticks(np.arange(min(yvals.value), max(yvals.value), 30))\n",
"plt.xlabel('Z - shift (um)', fontsize= 12, fontweight='bold')\n",
"plt.ylabel('X - shift (um)', fontsize= 12, fontweight='bold')\n",
"plt.setp(ax.get_xticklabels(), rotation=45, horizontalalignment='right')\n",
"fig.colorbar(c, ax = ax)\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "bc9b993e",
"metadata": {},
"source": [
"# Heating Rate in ODT Arm 1"
]
},
{
"cell_type": "code",
2024-06-07 20:27:50 +02:00
"execution_count": null,
2023-03-16 19:28:49 +01:00
"id": "8cc8af09",
"metadata": {},
2024-06-07 20:27:50 +02:00
"outputs": [],
2023-03-16 19:28:49 +01:00
"source": [
"w_x = 27 * u.um\n",
"w_y = 31 * u.um\n",
"P = 2.29 * u.W\n",
"linewidth = 32.2 * u.MHz\n",
"detuning = 4.3e+14 * u.Hz \n",
"\n",
"HeatingRate, T_recoil, Gamma_sr, U = calculateHeatingRate(w_x, w_y, P, linewidth, detuning, wavelength = 1.064*u.um)\n",
"\n",
"print((U/ac.k_B).to(u.uK))\n",
"print(Gamma_sr)\n",
"print(HeatingRate.to(u.nK/u.s))"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "56bef045",
2023-03-14 17:13:37 +01:00
"metadata": {},
"outputs": [],
2023-03-15 11:29:21 +01:00
"source": []
2023-03-14 17:13:37 +01: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",
2024-06-07 20:27:50 +02:00
"version": "3.9.12"
2023-03-14 17:13:37 +01:00
}
},
"nbformat": 4,
"nbformat_minor": 5
}