analyseScript/Joschka/Fitting.ipynb

1282 lines
2.3 MiB
Plaintext
Raw Normal View History

{
"cells": [
{
"cell_type": "markdown",
"source": [
"# Import supporting package"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2023-07-26 09:41:51 +02:00
"execution_count": 1,
"outputs": [],
"source": [
2023-07-20 20:34:19 +02:00
"import lmfit\n",
"import xarray as xr\n",
"import pandas as pd\n",
"import numpy as np\n",
"import copy\n",
"\n",
"import glob\n",
"\n",
"import xrft\n",
"import finufft\n",
"\n",
"from uncertainties import ufloat\n",
"from uncertainties import unumpy as unp\n",
"from uncertainties import umath\n",
"\n",
"from datetime import datetime\n",
"\n",
"import matplotlib.pyplot as plt\n",
"\n",
"\n",
"plt.rcParams['font.size'] = 18\n",
"\n",
"from scipy.ndimage import gaussian_filter\n",
"import matplotlib as mpl\n",
"from scipy.optimize import curve_fit\n",
"mpl.rc('xtick', labelsize=8)\n",
"mpl.rc('ytick', labelsize=8)\n",
"\n",
"from DataContainer.ReadData import read_hdf5_file, read_hdf5_global, read_hdf5_run_time, read_csv_file\n",
"from Analyser.ImagingAnalyser import ImageAnalyser\n",
"from Analyser.FitAnalyser import FitAnalyser\n",
"from Analyser.FitAnalyser import ThomasFermi2dModel, DensityProfileBEC2dModel, Polylog22dModel\n",
"from Analyser.FFTAnalyser import fft, ifft, fft_nutou\n",
"from ToolFunction.ToolFunction import *\n",
"\n",
"import time\n",
"\n",
"from ToolFunction.HomeMadeXarrayFunction import errorbar, dataarray_plot_errorbar\n",
"xr.plot.dataarray_plot.errorbar = errorbar\n",
"xr.plot.accessor.DataArrayPlotAccessor.errorbar = dataarray_plot_errorbar\n",
"\n",
"imageAnalyser = ImageAnalyser()\n",
"\n"
],
"metadata": {
2023-07-20 20:34:19 +02:00
"collapsed": false,
"ExecuteTime": {
2023-07-26 09:41:51 +02:00
"end_time": "2023-07-25T07:24:41.519442Z",
"start_time": "2023-07-25T07:24:32.815578600Z"
2023-07-20 20:34:19 +02:00
}
}
},
{
"cell_type": "code",
2023-07-26 09:41:51 +02:00
"execution_count": 205,
"outputs": [],
"source": [
"# get center of thresholded image\n",
"\n",
"def calc_cen(thresh1):\n",
" \"\"\"\n",
" returns array: [Y_center,X_center]\n",
" \"\"\"\n",
" cen = np.zeros(2)\n",
" (Y,X) = np.shape(thresh1)\n",
"\n",
"\n",
" thresh1 = thresh1 /np.sum(thresh1)\n",
"\n",
" # marginal distributions\n",
" dx = np.sum(thresh1, 0)\n",
" dy = np.sum(thresh1, 1)\n",
"\n",
" # expected values\n",
" cen[0] = np.sum(dx * np.arange(X))\n",
" cen[1] = np.sum(dy * np.arange(Y))\n",
" return cen\n",
"\n",
"def calc_cen_bulk(thresh):\n",
" \"\"\"\n",
" returns array in shape of input, containing array with [Y_center,X_center] for each image\n",
" \"\"\"\n",
" shape = np.shape(thresh)\n",
" cen = np.zeros((shape[0], shape[1], 2))\n",
" for i in range(0, shape[0]):\n",
" for j in range(0, shape[1]):\n",
" cen[i,j] = calc_cen(thresh[i,j])\n",
" return cen\n",
"\n",
"def guess_BEC_width(thresh, center):\n",
" \"\"\"\n",
" returns width of thresholded area along both axis through the center with shape of thresh and [X_width, Y_width] for each image\n",
" \"\"\"\n",
" shape = np.shape(thresh)\n",
" BEC_width_guess = np.zeros((shape[0], shape[1], 2))\n",
"\n",
" for i in range(0, shape[0]):\n",
" for j in range(0, shape[1]):\n",
" BEC_width_guess[i, j, 0] = np.sum(thresh[i, j, round(center[i,j,1]), :])\n",
" BEC_width_guess[i, j, 1] = np.sum(thresh[i, j, :, round(center[i,j,0])])\n",
"\n",
" return BEC_width_guess\n",
"\n",
"\n",
"\n",
"def gaussian(x, x0, sigma, A):\n",
" return A * np.exp(-0.5 * (x-x0)**2 / sigma**2)\n",
"\n",
2023-07-26 09:41:51 +02:00
"# def polylog(power, numerator, order = 15):\n",
"#\n",
"# dataShape = numerator.shape\n",
"# numerator = np.tile(numerator, (order, 1))\n",
"# numerator = np.power(numerator.T, np.arange(1, order+1)).T\n",
"#\n",
"# denominator = np.arange(1, order+1)\n",
"# denominator = np.tile(denominator, (dataShape[0], 1))\n",
"# denominator = denominator.T\n",
"#\n",
"# data = numerator/ np.power(denominator, power)\n",
"#\n",
"# return np.sum(data, axis=0)\n",
"\n",
2023-07-20 20:34:19 +02:00
"def thermal(x, x0, amp, sigma):\n",
" res = np.exp(-0.5 * (x-x0)**2 / sigma**2)\n",
2023-07-26 09:41:51 +02:00
" return amp/1.643 * polylog(2, res)\n",
"\n",
"def Thomas_Fermi_1d(x, x0, amp, sigma):\n",
2023-07-26 09:41:51 +02:00
" res = (1-(( x - x0 ) / sigma) **2) **(3/2)\n",
" return amp * np.where(res > 0, res, 0)\n",
"\n",
2023-07-20 20:34:19 +02:00
"def density_1d(x, x0_bec, x0_th, amp_bec, amp_th, sigma_bec, sigma_th):\n",
2023-07-26 09:41:51 +02:00
" return thermal(x, x0_th, amp_th, sigma_th) + Thomas_Fermi_1d(x, x0_bec, amp_bec, sigma_bec)\n",
"\n",
"\n",
"def polylog(pow, x):\n",
" order = 15\n",
" sum = 0\n",
" for k in range(1,order):\n",
" sum += x ** k /k **pow\n",
" return sum\n",
"\n",
"\n",
"def ThomasFermi_2d(x, y=0.0, centerx=0.0, centery=0.0, amplitude=1.0, sigmax=1.0, sigmay=1.0):\n",
" res = (1- ((x-centerx)/(sigmax))**2 - ((y-centery)/(sigmay))**2)**(3 / 2)\n",
" return amplitude * np.where(res > 0, res, 0)\n",
" # return amplitude * 5 / 2 / np.pi / max(tiny, sigmax * sigmay) * np.where(res > 0, res, 0)\n",
"\n",
"\n",
" # return amplitude / 2 / np.pi / 1.20206 / max(tiny, sigmax * sigmay) * polylog(2, np.exp( -((x-centerx)**2/(2 * (sigmax)**2))-((y-centery)**2/( 2 * (sigmay)**2)) ))\n",
"\n",
"\n",
"def density_profile_BEC_2d(x, y=0.0, amp_bec=1.0, amp_th=1.0, x0_bec=0.0, y0_bec=0.0, x0_th=0.0, y0_th=0.0,\n",
" sigmax_bec=1.0, sigmay_bec=1.0, sigmax_th=1.0, sigmay_th=1.0):\n",
" return ThomasFermi_2d(x=x, y=y, centerx=x0_bec, centery=y0_bec,\n",
" amplitude=amp_bec, sigmax=sigmax_bec, sigmay=sigmay_bec\n",
" ) + polylog2_2d(x=x, y=y, centerx=x0_th, centery=y0_th,\n",
" amplitude=amp_th, sigmax=sigmax_th, sigmay=sigmay_th)"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2023-07-26T07:27:08.849310200Z",
"start_time": "2023-07-26T07:27:08.756787700Z"
}
}
},
{
"cell_type": "code",
"execution_count": 204,
"outputs": [],
"source": [
"def polylog2_2d(x, y=0.0, centerx=0.0, centery=0.0, amplitude=1.0, sigmax=1.0, sigmay=1.0):\n",
" ## Approximation of the polylog function with 2D gaussian as argument. -> discribes the thermal part of the cloud\n",
" return amplitude/1.643 * polylog_int(np.exp( -((x-centerx)**2/(2 * (sigmax)**2))-((y-centery)**2/( 2 * (sigmay)**2)) ))"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
2023-07-26 09:41:51 +02:00
"end_time": "2023-07-26T07:27:07.250614700Z",
"start_time": "2023-07-26T07:27:07.165178200Z"
}
}
},
{
"cell_type": "code",
2023-07-26 09:41:51 +02:00
"execution_count": 174,
"outputs": [],
"source": [
"# Set up table for polylog\n",
"\n",
"def polylog_tab(pow, x):\n",
" order = 100\n",
" sum = 0\n",
" for k in range(1,order):\n",
" sum += x ** k /k **pow\n",
" return sum\n",
"\n",
"x_int = np.linspace(0, 1.00001, 100000)\n",
"\n",
"poly_tab = polylog_tab(2,x_int)"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2023-07-25T14:50:01.270231500Z",
"start_time": "2023-07-25T14:50:00.931242800Z"
}
}
},
{
"cell_type": "code",
"execution_count": 175,
"outputs": [],
"source": [
"from scipy.interpolate import CubicSpline\n",
"\n",
"polylog_int = CubicSpline(x_int, poly_tab)"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2023-07-25T14:50:02.455416900Z",
"start_time": "2023-07-25T14:50:02.364988500Z"
}
}
},
{
"cell_type": "code",
"execution_count": 176,
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1.2525003487835937\n",
"1.2525003487835928\n"
]
}
],
"source": [
"x = 0.881\n",
"print(polylog_int(x))\n",
"print(polylog_tab(2, x))"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2023-07-25T14:50:03.008503Z",
"start_time": "2023-07-25T14:50:02.935021500Z"
}
}
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 118,
"outputs": [],
"source": [
"# import data\n",
"img_dir = '//DyLabNAS/Data/'\n",
"SequenceName = \"Evaporative_Cooling\" + \"/\"\n",
"folderPath = img_dir + SequenceName + '2023/04/24'# get_date()\n",
"\n",
"\n",
"shotNum = \"0009\"\n",
"filePath = folderPath + \"/\" + shotNum + \"/2023-04-24_0009_Evaporative_Cooling_*0.h5\"\n",
"\n",
"\n",
"dataSet = read_hdf5_file(filePath, \"images/MOT_3D_Camera/in_situ_absorption\")\n",
"# flip the x and y axis\n",
"dataSet = swap_xy(dataSet)\n",
"\n",
"# get the scan axis name of the shot\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"# calculate the absorption imaging\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"OD = dataSet[\"OD\"]\n",
"\n",
"OD_np = OD.to_numpy()"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
2023-07-26 09:41:51 +02:00
"end_time": "2023-07-25T13:18:51.814713700Z",
"start_time": "2023-07-25T13:18:50.659769100Z"
}
}
},
{
"cell_type": "code",
2023-07-26 09:41:51 +02:00
"execution_count": 119,
"outputs": [
{
"data": {
"text/plain": "<Figure size 1000x900 with 10 Axes>",
2023-07-20 20:34:19 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA4gAAANiCAYAAAAjb+cqAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOz9e3heVZ02jt9pk6YpJKUpJNC0TYQU2i+2QpWCFi0wdTjMixzkoCiCDlB8dVR0PCCOyOgPZEQcRkZlHE+visIlhxFR1CJUrQytFKRoqw2SQgMkQKAJNpSk7N8fe9/Putdnr/0kaXMqrPu6cuV5nr332ut8+Hzuda+KJEkSRERERERERERERERERLziMWm8IxARERERERERERERERExMRAXiBEREREREREREREREREA4gIxIiIiIiIiIiIiIiIiIkNcIEZEREREREREREREREQAiAvEiIiIiIiIiIiIiIiIiAxxgRgREREREREREREREREBIC4QIyIiIiIiIiIiIiIiIjLEBWJEREREREREREREREQEgLhAjIiIiIiIiIiIiIiIiMiw2y4Qv/3tb6OiogItLS0v63cS7e3tqKioQEVFBdrb28f8+Z0F33n33XeP2TsjRgexzY3t8zuL2OYihorYpsf2+Z1FbNMRERFjjd12gVgOt956Kz7zmc/g1ltvHe+ovGzx7//+7/jMZz6DBx54YLyjMuFx4YUXlgb48ZgUjQQefvhhfPvb3wYAbN68Gfvssw+OPfZY3HTTTQB2vc2tW7cO73znOzF79mxUV1djv/32wymnnII//elPQ3r+rrvuwimnnIL99tsP1dXVmD17Nt75zndi3bp1g773q1/9Ks4//3wsXrwY1dXVE7acYpsbOl4ubW7FihV41atehalTp+ba3K5i3bp1uO666wCkbZpt7le/+hWAcJvu7+/H17/+daxYsQKHH3445syZg5qaGkybNg0HHHAAzjrrLKxcuXJI79+2bRuOPfZYNDQ0YOrUqXjVq16FFStWoK2tbdhp+d3vfofJkycPupDavn176fOJJ56IvfbaC1VVVdhnn31w9NFH48tf/jK2bds27PfvLGKbHjpimy6P7du348tf/jKOPPJIzJgxA1OnTkVLSwvOO++8suNokiS455578KlPfQpHHXUUGhsbUVVVhenTp+O1r30tLr74YnR0dJR9d0tLS6lsiv6OPPLIwnjfdttteP/734/Xve51494mIwTJbopvfetbCYCkubk5d+2cc85JACTnnHPOmL1ztPHII48kABIAySOPPDLmz1s0NzcnAJJvfetbZe876KCDkoMOOii59957d/mduyN+9atfJRUVFaW8H4+6s6u4/fbbk2nTppXSUFFRkUyaNKn0/d3vfvcutbmvf/3rSWVlZSm86dOne3k2WL5deumlXtymT59e+l5ZWZl8/etfL3yW9dj+NTc3xza3m+Ll2Obq6upybe6ll17a6fBtm6uoqPDy7NJLLw226aeeesprJxUVFcmMGTOSyZMne7+fc845SX9/f/Dd3/zmN717J02alNTV1ZW+T5s2Lbn99tuHnJa+vr5k/vz5Xph33XVX8N6lS5d691VWVnr9BYCktbU12bRpU/D52KbHB7FNl8cTTzyRHHrooaWwqqqqkhkzZpS+V1dXJ9///veDz37uc5/Ltem99trLy++6urrkf/7nfwrfz3pcV1eXNDY2Bv/e8pa3BJ9dvnz5LrXJiNHDy9KDGDFxsHHjRmzcuBFLliwZ76iMObZt24bzzz8flZWVeN3rXjfe0dkpPPLIIzjjjDOwbds2tLa2AgDmzp2LrVu34tOf/jQA4Fvf+hYeeuihnQr/nnvuwYUXXoiBgQGcfPLJeOyxx/Dcc8/hqaeewooVK0r3FVkQb7zxRlx22WUAgBUrVuCpp57Cc889h8ceewwnn3wyBgYGcOGFF+Kee+4JPj9lyhQccsgheM973oNrr70WZ5999k6lYyIhtrmXT5tbunQp/vznP2Pr1q25NveFL3xhp8LXNnfooYcCSNu0trnLLrssSKGsrq7GP/3TP+GGG25Ae3s7tm/fju7ubrz44otYv3493va2twEAvvOd7+Cqq64Kvv9nP/tZ6fOll15aStvGjRvxhje8Adu2bcMZZ5yBRx55ZEjpueyyy0rPDoaBgYHS55/85CfYvn07nnvuOXR3d+PKK6/EtGnT0NbWhuOPPx4vvPDCkN4/FohtOrbpIiRJgre+9a24//77UVNTg69//evo6elBd3c3Hn/8cbzrXe/C9u3bce655+K+++7LPd/f34+6ujpceOGF+NWvfoW//e1vePbZZ/G3v/0NN910E+bOnYuenh6cfvrp2LBhQ9m4XHPNNXjyySeDf//zP/8TfKa/vx/Nzc34zGc+g3Xr1u02bfIVgfFeoe4sogdxbJ+3GKrl85WMD33oQwmA5JJLLinVyd3N8vnOd74zAZDsu+++yX/+53/m0nDBBReULJY70+aOPPLIBECycOHC5MUXX8xdf/WrX50ASCZPnpwMDAx41wYGBkr18Ljjjss9u3379tLzRx55ZPD9Nkx6I3dnD+IrGS+3Nvfss8/mrrPN1dXVJd3d3cMOX9vcf//3f+fy6Nhjj00AJHvsscew2/RLL72UvOENbyhZ/S26u7uTqVOnJgCSPffcM3h93333TQAk73znOwd933333ZdUVlYmra2tyc9+9rNBPYg33nhj2Tb5gx/8oHT9u9/9bu56bNNjj9imy+O2224r1cl///d/D95zxBFHJACSY445Jnft/vvvL/vOv/71r0lNTU0CIPnHf/zH4D27Uo9/85vfFLINkmTwNhkxehj1BeJdd92VnHbaacmsWbOSKVOmJDNnzkyOOeaY5Jvf/GZucmZxzz33JCeddFIyc+bMZOrUqcmBBx6YfPKTn0x6e3uDi7W77rorSBfTv6KBYyiw7/z973+fnH766cm+++6bTJkyJXnVq16VXHTRRYM28La2tuTCCy9MWltbk6lTpya1tbXJoYcemlx22WXJ1q1bg88MZWDasmVLcsEFFySzZ89OpkyZkjQ1NSXnnntusmnTphEb2JTOV/SnKMp3G5/29vbkvPPOS+bMmZNUV1cn+++/f3LJJZckzz//fOmZ9evXJ+94xzuS2bNnJ9XV1Ulra2vy2c9+NriwsO/64Ac/mPx//9//l+yxxx5JTU1NctBBByUf+MAHks2bN+90XpTDPffck0yaNCk58MADk76+vjEd2EayzZFm8slPfjLY5rTzHm6be/jhh0v3fOc73wne8/GPf7x0z69+9SuvzXFRCiD5yU9+Enz+29/+dumes846a9A2N9wFYmxzYbzS2txI4fnnny9Nxi677LLS77ZNsxzf/e53D6tNV1dXl5697rrrgm36S1/60i6NoxdddFECIJk6dWru2je+8Y1SGE1NTUmS5MfRvfbaq/S81kWLDRs2JPX19QmAZMqUKR59r6g/GKxN7tixo7Qw3nPPPWObNu+KbXr4KGrTCi3Hb37zm8MK/8ILL0yA1KBTVIY33XRTKfydKasTTjghAZAsWrQoeH00DR07duxIamtrEwDJBz7wgREPP6IYo7pA5EABOF6z7lU45phjkp6enuCz3/jGNzx+9vTp00sD4/z585Orr74611GsXr06aWxsLFkop06dmuNBr169eqfTo4Pp97///dIEdfr06V5cDz744KS3tzcYxg033OAN0rW1td73OXPmJH/6059yzw02MN13330e57ympibZc889EyC1St1www0jMrB94QtfSBobG0vpDXHOFUMZ2G666abSpKCurs6rI2984xuTF198MfnJT35SmgDYPWpnnnlmYXy/973veflbXV1d6qyZ/z//+c93Oj9CeOGFF5IFCxYkFRUVyd13350kSTJmA9tItjlOlAAkLS0thW1Owx9Om/va175Weq6zs7MwTrznxBNP9Nqc1oGiNtfZ2ZmbeJVrc8NZIMY2F8Yrrc2NJO64445SPq1ZsyZJknCb1vo8nDat5TBv3rxgm/71r3/tlfVw2vSOHTuSww8/vNQmLd7
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"imageAnalyser.center = (960, 890)\n",
2023-07-20 20:34:19 +02:00
"imageAnalyser.span = (150, 150)\n",
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"cropOD = dataSet_cropOD.to_numpy()\n",
"dataSet_cropOD.plot.pcolormesh(cmap='jet', vmin=0, col=scanAxis[0], row=scanAxis[1])\n",
"plt.show()"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
2023-07-26 09:41:51 +02:00
"end_time": "2023-07-25T13:18:54.107015500Z",
"start_time": "2023-07-25T13:18:51.857684700Z"
}
}
},
{
"cell_type": "code",
2023-07-26 09:41:51 +02:00
"execution_count": 120,
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2023-07-26 09:41:51 +02:00
"fitting time: 137.02940940856934 ms\n"
]
}
],
"source": [
"# from opencv import moments\n",
"shape = np.shape(cropOD)\n",
"sigma = 0.4\n",
"blurred = gaussian_filter(cropOD, sigma=sigma)\n",
"\n",
"thresh = np.zeros(shape)\n",
"for i in range(0,shape[0]):\n",
" for j in range(0, shape[1]):\n",
" thresh[i,j] = np.where(blurred[i,j] < np.max(blurred[i,j])*0.5,0,1)\n",
"\n",
"center = calc_cen_bulk(thresh)\n",
"\n",
"BEC_width_guess = guess_BEC_width(thresh, center)\n",
"\n",
"X_guess_og = np.zeros((shape[0], shape[1], shape[3]))\n",
"# Y_guess_og = np.zeros((shape[0], shape[1], shape[2]))\n",
"\n",
"for i in range(0, shape[0]):\n",
" for j in range(0, shape[1]):\n",
" X_guess_og[i,j] = np.sum(cropOD[i,j,round(center[i,j,1] - BEC_width_guess[i,j,1]/2) : round(center[i,j,1] + BEC_width_guess[i,j,1]/2) , :], 0) / len(cropOD[i,j,round(center[i,j,1] - BEC_width_guess[i,j,1]/2) : round(center[i,j,1] + BEC_width_guess[i,j,1]/2),0])\n",
"\n",
" # Y_guess_og[i,j] = np.sum(cropOD[i,j, :, round(center[i,j,0] - BEC_width_guess[i,j,0]/2) : round(center[i,j,0] + BEC_width_guess[i,j,0]/2)], 1) / len(cropOD[i,j,0,round(center[i,j,0] - BEC_width_guess[i,j,0]/2) : round(center[i,j,0] + BEC_width_guess[i,j,0]/2)])\n",
"\n",
"#[nr images x, nr images y, X / Y, center / sigma]\n",
"x = np.linspace(0,149,150)\n",
2023-07-20 20:34:19 +02:00
"y = np.linspace(0,149, 200)\n",
"\n",
"popt = np.zeros((shape[0], shape[1], 6))\n",
"\n",
"p0 = np.ones((shape[0], shape[1], 6))\n",
"\n",
"max = np.zeros((shape[0], shape[1]))\n",
"\n",
"for i in range(0, shape[0]):\n",
" max[i] = np.ndarray.max(X_guess_og[i],axis=1)\n",
"\n",
"\n",
"p0[:, :, 0] = center[:, :, 0] # center BEC\n",
"p0[:, :, 1] = center[:, :, 0] # center th\n",
"p0[:, :, 2] = 0.7 * max # amp BEC\n",
"p0[:, :, 3] = 0.3 * max # amp th\n",
"p0[:, :, 4] = BEC_width_guess[:, :, 0] # sigma BEC\n",
"p0[:, :, 5] = BEC_width_guess[:, :, 0] * 3 # sigma th\n",
"\n",
"start = time.time()\n",
"for i in range(0, shape[0]):\n",
" for j in range(0, shape[1]):\n",
" popt[i,j], pcov = curve_fit(density_1d, x, X_guess_og[i,j] , p0[i, j], nan_policy='omit')\n",
"stop = time.time()\n",
"\n",
"print(f'fitting time: {(stop-start)*1e3} ms')"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
2023-07-26 09:41:51 +02:00
"end_time": "2023-07-25T13:18:54.284965700Z",
"start_time": "2023-07-25T13:18:54.116202500Z"
}
}
},
{
"cell_type": "code",
2023-07-26 09:41:51 +02:00
"execution_count": 121,
"outputs": [
{
"data": {
"text/plain": "<Figure size 1500x1000 with 9 Axes>",
2023-07-26 09:41:51 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABMAAAAMpCAYAAADipk9SAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdd3hUVfrA8e+dnjaTTgJJCF2aFAFRFAEL2FCxrw0URVdXXXfVVde6P/uq664NV8W2VmzYewEVaYbeIaT3ZGYyk0y9vz/uJBJpSZjJpLyf55lHZubOve+MyZyc95zzHkVVVRUhhBBCCCGEEEIIIbopXbQDEEIIIYQQQgghhBAikiQBJoQQQgghhBBCCCG6NUmACSGEEEIIIYQQQohuTRJgQgghhBBCCCGEEKJbkwSYEEIIIYQQQgghhOjWJAEmhBBCCCGEEEIIIbo1SYAJIYQQQgghhBBCiG7NEO0A2iIYDFJSUkJCQgKKokQ7HCGE6PJUVcXpdNK7d290Ohk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pOgWJAEmRDjZC1EI0qgasST2aflcopYQ661UU2l3RSE4IYQQ3VGNy8sIpSkBNnqP5xtTRwBgKF/bgVEJIYToamrdPu4yvoTBVw+9x4C1D0neUq7Qf0S1JMBENyAJMCHCqTYfgEI1nd5JMS2fS8ggoBgwKgEaqos7PjYhhBDdkjYDLF+7s1v9ryYxfbVC+On1GzswKiGEEF1JIKiS1JDPSfplqIoeZj4BJ/wDgD8aFuF21kY5QiEOniTAhAin2l0AFKppZNgsLZ/T6XHHZGr/thd0cGBCCCG6K7uznsFKoXZnLwmwPkNDhfADxTT
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fsize=(15,10)\n",
"vmax = 1.5\n",
"fig, ax = plt.subplots(shape[0],shape[1],figsize=fsize)\n",
"for i in range(0, shape[0]):\n",
" for j in range(0, shape[1]):\n",
" lab = f\"A$_{{BEC}}$ = {popt[i,j,0]:.1f} \\n A$_{{th}}$ = {popt[i,j,1]:.1f} \"\n",
" ax[i,j].plot(x, X_guess_og[i,j])\n",
" ax[i,j].plot(x, density_1d(x, *popt[i,j]), label = lab, zorder=3)\n",
" ax[i,j].plot(x, thermal(x, popt[i,j,1], popt[i,j, 3], popt[i,j, 5]))\n",
"\n",
"\n",
" #ax[i,j].legend(fontsize=10)\n",
" ax[i,j].set_facecolor('#FFFFFF')\n",
"plt.show()\n"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
2023-07-26 09:41:51 +02:00
"end_time": "2023-07-25T13:18:56.970354800Z",
"start_time": "2023-07-25T13:18:55.981784100Z"
}
}
},
{
"cell_type": "code",
2023-07-26 09:41:51 +02:00
"execution_count": 122,
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2023-07-26 09:41:51 +02:00
"0.000997304916381836\n",
"0.015292882919311523\n",
"0.0\n",
"\n",
"0.0009982585906982422\n",
"0.028937816619873047\n",
"0.0\n",
"\n",
"0.0\n",
"0.0226593017578125\n",
"0.0\n",
"\n",
"0.0009982585906982422\n",
"0.015099287033081055\n",
"0.0\n",
"\n",
"0.0011451244354248047\n",
"0.01217198371887207\n",
"0.0\n",
"\n",
"0.0\n",
"0.01015615463256836\n",
"0.0\n",
"\n",
"0.0\n",
"0.020394086837768555\n",
"0.0\n",
"\n",
"0.0\n",
"0.022302627563476562\n",
"0.0\n",
"\n",
"0.0009968280792236328\n",
"0.008119821548461914\n",
"0.0\n",
"\n",
"total time: 175.58670043945312 ms\n"
]
}
],
"source": [
2023-07-20 20:34:19 +02:00
"# from opencv import moments\n",
"start = time.time()\n",
"shape = np.shape(cropOD)\n",
"sigma = 0.4\n",
"blurred = gaussian_filter(cropOD, sigma=sigma)\n",
"\n",
"thresh = np.zeros(shape)\n",
"for i in range(0,shape[0]):\n",
" for j in range(0, shape[1]):\n",
" thresh[i,j] = np.where(blurred[i,j] < np.max(blurred[i,j])*0.5,0,1)\n",
"\n",
"center = calc_cen_bulk(thresh)\n",
"\n",
"BEC_width_guess = guess_BEC_width(thresh, center)\n",
"\n",
"X_guess_og = np.zeros((shape[0], shape[1], shape[3]))\n",
"# Y_guess_og = np.zeros((shape[0], shape[1], shape[2]))\n",
"\n",
"for i in range(0, shape[0]):\n",
" for j in range(0, shape[1]):\n",
" X_guess_og[i,j] = np.sum(cropOD[i,j,round(center[i,j,1] - BEC_width_guess[i,j,1]/2) : round(center[i,j,1] + BEC_width_guess[i,j,1]/2) , :], 0) / len(cropOD[i,j,round(center[i,j,1] - BEC_width_guess[i,j,1]/2) : round(center[i,j,1] + BEC_width_guess[i,j,1]/2),0])\n",
"\n",
" # Y_guess_og[i,j] = np.sum(cropOD[i,j, :, round(center[i,j,0] - BEC_width_guess[i,j,0]/2) : round(center[i,j,0] + BEC_width_guess[i,j,0]/2)], 1) / len(cropOD[i,j,0,round(center[i,j,0] - BEC_width_guess[i,j,0]/2) : round(center[i,j,0] + BEC_width_guess[i,j,0]/2)])\n",
"\n",
"#[nr images x, nr images y, X / Y, center / sigma]\n",
"x = np.linspace(0,shape[3],150)\n",
"y = np.linspace(0,shape[2], 150)\n",
"\n",
"popt = np.zeros((shape[0], shape[1], 6))\n",
"\n",
"p0 = np.ones((shape[0], shape[1], 6))\n",
"\n",
"max = np.zeros((shape[0], shape[1]))\n",
"\n",
"for i in range(0, shape[0]):\n",
" max[i] = np.ndarray.max(X_guess_og[i],axis=1)\n",
"\n",
"# Fitting x without math constr\n",
"fitmodel = lmfit.Model(density_1d,independent_vars=['x'])\n",
"\n",
"result_x = []\n",
"\n",
"for i in range(0, shape[0]):\n",
" temp_res = []\n",
" for j in range(0, shape[1]):\n",
2023-07-26 09:41:51 +02:00
" t1 = time.time()\n",
2023-07-20 20:34:19 +02:00
" params = lmfit.Parameters()\n",
" params.add_many(\n",
" ('x0_bec', center[i,j,0], True,0, 200),\n",
" ('x0_th',center[i,j,0], True,0, 200),\n",
" ('amp_bec', 0.7 * max[i,j], True, 0, 1.3 * np.max(X_guess_og[i,j])),\n",
2023-07-26 09:41:51 +02:00
" ('amp_th', 0.3 * max[i,j], True, 0, 1.3 * np.max(X_guess_og[i,j])),\n",
2023-07-20 20:34:19 +02:00
" ('sigma_bec',BEC_width_guess[i,j,0], True, 0, 50),\n",
2023-07-26 09:41:51 +02:00
" ('sigma_th', popt[i,j,5], True, 0, 50)\n",
" )\n",
"\n",
" t2 = time.time()\n",
" res = fitmodel.fit(X_guess_og[i,j], x=x, params=params)\n",
" t3 = time.time()\n",
" temp_res.append(res)\n",
" t4 = time.time()\n",
" print(t2 - t1)\n",
" print(t3 - t2)\n",
" print(t4 - t3)\n",
" print(\"\")\n",
" result_x.append(temp_res)\n",
"stop = time.time()\n",
"\n",
"print(f'total time: {(stop-start)*1e3} ms')"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2023-07-25T13:19:37.207813100Z",
"start_time": "2023-07-25T13:19:37.021761400Z"
}
}
},
{
"cell_type": "code",
"execution_count": 123,
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.0\n",
"0.017198801040649414\n",
"0.0\n",
"\n",
"0.0\n",
"0.012012481689453125\n",
"0.0\n",
"\n",
"0.0010266304016113281\n",
"0.018287181854248047\n",
"0.0\n",
"\n",
"0.0002391338348388672\n",
"0.011229991912841797\n",
"0.0\n",
"\n",
"0.00096893310546875\n",
"0.016185998916625977\n",
"0.0\n",
"\n",
"0.0011882781982421875\n",
"0.011206388473510742\n",
"0.0\n",
"\n",
"0.0\n",
"0.026421308517456055\n",
"0.0\n",
"\n",
"0.0\n",
"0.007258415222167969\n",
"0.0\n",
"\n",
"0.0020270347595214844\n",
"0.07025146484375\n",
"0.0\n",
"\n",
"total time: 206.9249153137207 ms\n"
]
}
],
"source": [
"# from opencv import moments\n",
"start = time.time()\n",
"shape = np.shape(cropOD)\n",
"sigma = 0.4\n",
"blurred = gaussian_filter(cropOD, sigma=sigma)\n",
"\n",
"thresh = np.zeros(shape)\n",
"for i in range(0,shape[0]):\n",
" for j in range(0, shape[1]):\n",
" thresh[i,j] = np.where(blurred[i,j] < np.max(blurred[i,j])*0.5,0,1)\n",
"\n",
"center = calc_cen_bulk(thresh)\n",
"\n",
"BEC_width_guess = guess_BEC_width(thresh, center)\n",
"\n",
"X_guess_og = np.zeros((shape[0], shape[1], shape[3]))\n",
"# Y_guess_og = np.zeros((shape[0], shape[1], shape[2]))\n",
"\n",
"for i in range(0, shape[0]):\n",
" for j in range(0, shape[1]):\n",
" X_guess_og[i,j] = np.sum(cropOD[i,j,round(center[i,j,1] - BEC_width_guess[i,j,1]/2) : round(center[i,j,1] + BEC_width_guess[i,j,1]/2) , :], 0) / len(cropOD[i,j,round(center[i,j,1] - BEC_width_guess[i,j,1]/2) : round(center[i,j,1] + BEC_width_guess[i,j,1]/2),0])\n",
"\n",
" # Y_guess_og[i,j] = np.sum(cropOD[i,j, :, round(center[i,j,0] - BEC_width_guess[i,j,0]/2) : round(center[i,j,0] + BEC_width_guess[i,j,0]/2)], 1) / len(cropOD[i,j,0,round(center[i,j,0] - BEC_width_guess[i,j,0]/2) : round(center[i,j,0] + BEC_width_guess[i,j,0]/2)])\n",
"\n",
"#[nr images x, nr images y, X / Y, center / sigma]\n",
"x = np.linspace(0,shape[3],150)\n",
"y = np.linspace(0,shape[2], 150)\n",
"\n",
"popt = np.zeros((shape[0], shape[1], 6))\n",
"\n",
"p0 = np.ones((shape[0], shape[1], 6))\n",
"\n",
"max = np.zeros((shape[0], shape[1]))\n",
"\n",
"for i in range(0, shape[0]):\n",
" max[i] = np.ndarray.max(X_guess_og[i],axis=1)\n",
"\n",
"# Fitting x without math constr\n",
"fitmodel = lmfit.Model(density_1d,independent_vars=['x'])\n",
"\n",
"result_x = []\n",
"\n",
"for i in range(0, shape[0]):\n",
" temp_res = []\n",
" for j in range(0, shape[1]):\n",
" t1 = time.time()\n",
" params = lmfit.Parameters()\n",
" params.add_many(\n",
" ('x0_bec', center[i,j,0], True,0, 200),\n",
" ('x0_th',center[i,j,0], True,0, 200),\n",
" ('amp_bec', 0.7 * max[i,j], True, 0, 1.3 * np.max(X_guess_og[i,j])),\n",
" ('amp_th', 0.3 * max[i,j], True, 0, 1.3 * np.max(X_guess_og[i,j])),\n",
" ('deltax', 0, True, 0,50),\n",
" ('sigma_bec',BEC_width_guess[i,j,0], True, 0, 50)\n",
2023-07-20 20:34:19 +02:00
" )\n",
2023-07-26 09:41:51 +02:00
" params.add('sigma_th', popt[i,j,5], min=0, expr=f'sigma_bec + deltax')\n",
"\n",
" t2 = time.time()\n",
2023-07-20 20:34:19 +02:00
" res = fitmodel.fit(X_guess_og[i,j], x=x, params=params)\n",
2023-07-26 09:41:51 +02:00
" t3 = time.time()\n",
2023-07-20 20:34:19 +02:00
" temp_res.append(res)\n",
2023-07-26 09:41:51 +02:00
" t4 = time.time()\n",
" print(t2 - t1)\n",
" print(t3 - t2)\n",
" print(t4 - t3)\n",
" print(\"\")\n",
2023-07-20 20:34:19 +02:00
" result_x.append(temp_res)\n",
"stop = time.time()\n",
"\n",
"print(f'total time: {(stop-start)*1e3} ms')"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
2023-07-26 09:41:51 +02:00
"end_time": "2023-07-25T13:19:43.156076600Z",
"start_time": "2023-07-25T13:19:42.942009500Z"
}
}
},
{
"cell_type": "code",
2023-07-26 09:41:51 +02:00
"execution_count": 124,
"outputs": [
{
2023-07-20 20:34:19 +02:00
"data": {
"text/plain": "<Figure size 1500x1000 with 9 Axes>",
2023-07-26 09:41:51 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABMAAAAMpCAYAAADipk9SAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdd3hb1fnA8e/VsCTbkrxHYjvO3mSQsAk0EBJWAgHKLmEGCqWUtuxSSlugA1p+LZRQ0rDKTBhhlL2SEDJJQvZ0vLctybasde/vjys7MUmI7UiWx/t5Hj2JpKt7Xwmio/Oec96jaJqmIYQQQgghhBBCCCFEL2WIdQBCCCGEEEIIIYQQQkSTJMCEEEIIIYQQQgghRK8mCTAhhBBCCCGEEEII0atJAkwIIYQQQgghhBBC9GqSABNCCCGEEEIIIYQQvZokwIQQQgghhBBCCCFEryYJMCGEEEIIIYQQQgjRq5liHUBHqKpKaWkpdrsdRVFiHY4QQvR4mqbh8Xjo168fBoOMiYC0NUIIEWnS1rQl7YwQQkRWe9uZHpUAKy0tJTc3N9ZhCCFEr1NUVEROTk6sw+gWpK0RQojokLZGJ+2MEEJEx+HamR6VALPb7YD+phwOR4yjEUKIns/tdpObm9v6/SqkrRFCiEiTtqYtaWeEECKy2tvO9KgEWMsUYYfDIY2FEEJEkCzB2EfaGiGEiA5pa3TSzgghRHQcrp2RRfhCCCGEEEIIIYQQoleTBJgQQgghhBBCCCGE6NUkASaEEEIIIYQQQgghejVJgAkhhBBCCCGEEEKIXk0SYEIIIYQQQgghhBCiV5MEmBBCCCGEEEIIIYTo1SQBJkS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display_data"
}
],
"source": [
2023-07-20 20:34:19 +02:00
"fig, ax = plt.subplots(shape[0],shape[1],figsize=fsize)\n",
"for i in range(0, shape[0]):\n",
" for j in range(0, shape[1]):\n",
" #lab = f\"A$_{{BEC}}$ = {popt[i,j,0]:.1f} \\n A$_{{th}}$ = {popt[i,j,1]:.1f} \"\n",
" bval = result_x[i][j].best_values\n",
" ax[i,j].plot(x, X_guess_og[i,j])\n",
" ax[i,j].plot(x, density_1d(x, **result_x[i][j].best_values), label = lab)\n",
" ax[i,j].plot(x, thermal(x, bval['x0_th'], bval['amp_th'], bval['sigma_th']))\n",
"\n",
2023-07-20 20:34:19 +02:00
"\n",
"plt.show()"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
2023-07-26 09:41:51 +02:00
"end_time": "2023-07-25T13:19:48.324787200Z",
"start_time": "2023-07-25T13:19:46.834362100Z"
}
}
},
{
"cell_type": "code",
2023-07-26 09:41:51 +02:00
"execution_count": 9,
"outputs": [
2023-07-20 20:34:19 +02:00
{
"name": "stdout",
"output_type": "stream",
"text": [
"[1. 1. 1. 1. 1. 1.]\n",
"[0. 0. 0. 0. 0. 0.]\n"
]
},
{
"data": {
2023-07-20 20:34:19 +02:00
"text/plain": "<Figure size 640x480 with 1 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiIAAAGZCAYAAAC0UVoBAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAADXjElEQVR4nO39f5SmZXXnje5HCptCCqqgBBrp5m7txh8D2qgoEZUykREzo6Imk8moGTLjUvO+jiczWWdGzpmzIuvNwLhWxvdNzPtOnGQOyXkxEw0Sl47BGE0KjPEHJLSgwYQmfUOp1WkLq7oLKDoUPOePour57O9de/uoLVUF+7tWrdrPc1/3dV/39eu5ru/e1969fr/ft0KhUCgUCoUNwFM2ugCFQqF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dj6uZY68ADcns77kKLXj+TNWmLG9UB721058JtjHjIIF6ZDerCOUdVHjErGeOQdqhujnzrFeFP9FkTkiDGLcLGesGNq58+7L8j9HMSKFQqFQKBQ2DLUQKRQKhUKhsGHYQqqZ0cf+SNs1kobXjg9kM8eppsZxgWGaYpaGSIzBgPsXs6qmOkDLEMTrWNZ3IgWG/Mal3O7YJOm5RI1BWn45Me4lQ7ufvPW0Tzc2hQ+orw5lScqdbcEHyZFAlpX0bOdkdjuQT+L3mpDqGJaBdK8Ym9EYejveYVaydnQo2qkTk4PtxHtEhdPHZ6deY18RqtUZ+ybeJPvBWOjE+mEemcFydHQcNLXSwhNo2/lsbMIIchRGkEsZJQ4VYcdjLQ098X70rnu/ePakN08eye8cuWY/4hjW8c32TOZAqrNc/eH
},
"metadata": {},
2023-07-20 20:34:19 +02:00
"output_type": "display_data"
}
],
"source": [
2023-07-20 20:34:19 +02:00
"print(p0[0,0])\n",
"print(popt[0,0])\n",
"\n",
"data = cropOD[0,0]\n",
"plt.pcolormesh(data,cmap='jet')\n",
"plt.show()"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
2023-07-26 09:41:51 +02:00
"end_time": "2023-07-25T07:25:05.902906400Z",
"start_time": "2023-07-25T07:25:05.680454200Z"
}
}
},
{
"cell_type": "code",
2023-07-26 09:41:51 +02:00
"execution_count": 106,
"outputs": [],
"source": [
"\n",
"\n",
2023-07-20 20:34:19 +02:00
"\n"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
2023-07-26 09:41:51 +02:00
"end_time": "2023-07-25T13:10:47.207582500Z",
"start_time": "2023-07-25T13:10:47.169500700Z"
2023-07-20 20:34:19 +02:00
}
}
},
{
"cell_type": "code",
2023-07-26 09:41:51 +02:00
"execution_count": 111,
2023-07-20 20:34:19 +02:00
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2023-07-26 09:41:51 +02:00
"[0. 0. 0. 0. 0. 0.]\n",
"[ 0. 0. nan nan 0. 0.]\n",
"[1. 1. 1. 1. 1. 1.]\n",
"2.657634270170008\n"
2023-07-20 20:34:19 +02:00
]
}
],
"source": [
"popt_0 = popt[0,0]\n",
"print(popt_0)\n",
"S = np.max(blurred[0,0])/(popt_0[2] + popt_0[3])\n",
"popt_0[2] *= S\n",
"popt_0[3] *= S\n",
"print(popt_0)\n",
"print(p0[0,0])\n",
"print(np.max(blurred[0,0]))"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
2023-07-26 09:41:51 +02:00
"end_time": "2023-07-25T13:12:07.279465300Z",
"start_time": "2023-07-25T13:12:07.160965700Z"
2023-07-20 20:34:19 +02:00
}
}
},
{
"cell_type": "code",
2023-07-26 09:41:51 +02:00
"execution_count": 101,
2023-07-20 20:34:19 +02:00
"outputs": [],
"source": [
2023-07-26 09:41:51 +02:00
"import time"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2023-07-25T12:27:35.839077Z",
"start_time": "2023-07-25T12:27:35.780727700Z"
}
}
},
{
"cell_type": "markdown",
"source": [
"## Fitting without mathematical constraint"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 206,
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.333087682723999\n",
"0.3219437599182129\n",
"0.3473355770111084\n",
"0.3120737075805664\n",
"0.3252856731414795\n",
"0.33151793479919434\n",
"1.4408035278320312\n",
"0.42580461502075195\n",
"0.37368178367614746\n",
"fitting time = 0.4679482513003879 +- 0.3664738155004792\n"
]
}
],
"source": [
"result = []\n",
"times = []\n",
"x = np.linspace(0,shape[3],150)\n",
"y = np.linspace(0,shape[2], 150)\n",
"\n",
2023-07-26 09:41:51 +02:00
"for i in range(0,shape[0]):\n",
" temp_res_arr = []\n",
" for j in range(0,shape[1]):\n",
" data = cropOD[i,j]\n",
" fitModel = lmfit.Model(density_profile_BEC_2d, independent_vars=['x','y'])\n",
" #fitModel.set_param_hint('deltax', value=5)\n",
"\n",
" bval = result_x[i][j].best_values\n",
" S = np.max(blurred[i,j])/(bval['amp_bec'] + bval['amp_th'])\n",
"\n",
" params = lmfit.Parameters()\n",
" #print(bval['sigma_th'])\n",
" params.add_many(\n",
" ('amp_bec', S * bval['amp_bec'], True, 0, 1.3 * np.max(data)),\n",
" ('amp_th',S * bval['amp_th'], True, 0, 1.3 * np.max(data)),\n",
" ('x0_bec',center[i,j,0], True, 0, 150),\n",
" ('y0_bec',center[i,j,1], True, 0, 150),\n",
" ('x0_th',center[i,j,0], True, 0, 150),\n",
" ('y0_th',center[i,j,1], True, 0, 150),\n",
" ('sigmax_bec',bval['sigma_bec'], True, 0, 50),\n",
" ('sigmay_bec',BEC_width_guess[i,j,1], True, 0, 50),\n",
" ('sigmax_th',bval['sigma_th'], True, 0, 50),\n",
" ('sigmay_th',bval['sigma_th'],True, 0, 50)\n",
" )\n",
"\n",
" X,Y = np.meshgrid(x, y)\n",
" X_1d = X.flatten()\n",
" Y_1d = Y.flatten()\n",
"\n",
" data1d = data.flatten()\n",
" start = time.time()\n",
" res = fitModel.fit(data1d, x=X_1d, y=Y_1d, params=params)\n",
" stop = time.time()\n",
" print(stop-start)\n",
" times.append(stop-start)\n",
" temp_res_arr.append(res)\n",
" result.append(temp_res_arr)\n",
"times = np.array(times)\n",
"print(f\"fitting time = {np.mean(times)} +- {np.std(times, ddof=1)}\")\n",
2023-07-20 20:34:19 +02:00
"\n"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
2023-07-26 09:41:51 +02:00
"end_time": "2023-07-26T07:27:47.356522500Z",
"start_time": "2023-07-26T07:27:43.110892300Z"
2023-07-20 20:34:19 +02:00
}
}
},
2023-07-26 09:41:51 +02:00
{
"cell_type": "markdown",
"source": [
"## Fitting with mathematical constraint"
],
"metadata": {
"collapsed": false
}
},
2023-07-20 20:34:19 +02:00
{
"cell_type": "code",
2023-07-26 09:41:51 +02:00
"execution_count": 154,
2023-07-20 20:34:19 +02:00
"outputs": [
{
2023-07-26 09:41:51 +02:00
"name": "stdout",
"output_type": "stream",
"text": [
"1.6134850978851318\n",
"1.2167115211486816\n",
"0.908787727355957\n",
"1.138059377670288\n",
"1.0163965225219727\n",
"1.137791395187378\n",
"3.49874210357666\n",
"1.6650748252868652\n",
"1.1551790237426758\n",
"fitting time = 1.48335862159729 +- 0.7966618144547525\n"
]
2023-07-20 20:34:19 +02:00
}
],
"source": [
2023-07-26 09:41:51 +02:00
"result = []\n",
"times = []\n",
"x = np.linspace(0,shape[3],150)\n",
"y = np.linspace(0,shape[2], 150)\n",
"\n",
"for i in range(0,shape[0]):\n",
" temp_res_arr = []\n",
" for j in range(0,shape[1]):\n",
" data = cropOD[i,j]\n",
" fitModel = lmfit.Model(density_profile_BEC_2d, independent_vars=['x','y'])\n",
" #fitModel.set_param_hint('deltax', value=5)\n",
"\n",
" bval = result_x[i][j].best_values\n",
" S = np.max(blurred[i,j])/(bval['amp_bec'] + bval['amp_th'])\n",
"\n",
" params = lmfit.Parameters()\n",
" #print(bval['sigma_th'])\n",
"\n",
" params.add_many(\n",
" ('amp_bec', S * bval['amp_bec'], True, 0, 1.3 * np.max(data)),\n",
" ('amp_th',S * bval['amp_th'], True, 0, 1.3 * np.max(data)),\n",
" ('x0_bec',center[i,j,0], True, 0, 150),\n",
" ('y0_bec',center[i,j,1], True, 0, 150),\n",
" ('x0_th',center[i,j,0], True, 0, 150),\n",
" ('y0_th',center[i,j,1], True, 0, 150),\n",
" ('sigmax_bec',bval['sigma_bec'], True, 0, 50),\n",
" ('sigmay_bec',BEC_width_guess[i,j,1], True, 0, 50),\n",
" ('D_sigX', 1.93*bval['sigma_th'] - 1.22*bval['sigma_bec'], True, 0.1, 50),\n",
" ('D_sig_th', 0, True, -10, 10)\n",
" )\n",
"\n",
" params.add('sigmax_th',bval['sigma_th'], min=0, expr=f'0.632*sigmax_bec + 0.518*D_sigX')\n",
" params.add('sigmay_th',bval['sigma_th'], min=0, expr=f'sigmax_th + D_sig_th')\n",
"\n",
" X,Y = np.meshgrid(x, y)\n",
" X_1d = X.flatten()\n",
" Y_1d = Y.flatten()\n",
"\n",
" data1d = data.flatten()\n",
" start = time.time()\n",
" res = fitModel.fit(data1d, x=X_1d, y=Y_1d, params=params)\n",
" stop = time.time()\n",
" print(stop-start)\n",
" times.append(stop-start)\n",
" temp_res_arr.append(res)\n",
" result.append(temp_res_arr)\n",
"times = np.array(times)\n",
"print(f\"fitting time = {np.mean(times)} +- {np.std(times, ddof=1)}\")\n"
2023-07-20 20:34:19 +02:00
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
2023-07-26 09:41:51 +02:00
"end_time": "2023-07-25T14:21:05.284099300Z",
"start_time": "2023-07-25T14:20:51.892911Z"
2023-07-20 20:34:19 +02:00
}
}
},
{
"cell_type": "markdown",
"source": [
"## Fitting class"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2023-07-26 09:41:51 +02:00
"execution_count": 207,
2023-07-20 20:34:19 +02:00
"outputs": [
{
2023-07-26 09:41:51 +02:00
"data": {
"text/plain": "<Figure size 800x800 with 6 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAqgAAAKvCAYAAACmvT3kAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOyde5xVU//H34upDE2TJqWbookG48lIYWJKoWJQulBSlNLjCeFHCfscHsLjHhKlSCjdFCVCpVColIznqTTpQuliSkY1rN8fa62z197nnC4kU9anV685Z+21122fvdfan/X9fr5CSilxcHBwcHBwcHBwKCU45K9ugIODg4ODg4ODg4MNt0B1cHBwcHBwcHAoVXALVAcHBwcHBwcHh1IFt0B1cHBwcHBwcHAoVXALVAcHBwcHBwcHh1IFt0B1cHBwcHBwcHAoVXALVAcHBwcHBwcHh1IFt0B1cHBwcHBwcHAoVXALVAcHBwcHBwcHh1IFt0B1cHBw+AsghEAIQdOmTf/qpjg4OPzFiEQisW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b9mndDg4ODg5/Lg72ucd52f+1cF78Bzi+++47nn/++dj37t27B45v3LiRkpISAOrWrbvLsqZNm7bb+g45xP/J7G57Y926dYAK02ifF8b06dNdHGcHhxD25l5zcNjfcHPP/sXf8XngFqgHMLZu3UqHDh1iRupZWVm0b98+kOfwww+PfV6+fPkuy3rsscd2W2f58uVjn3e3LWPq/uabb5LeUL/++us+DW/n4HCwYG/uNQeH/Qk39+x//B2fB26BegBCSsnUqVNp2LAhs2fPBqBChQq8/vrrcW+L6enp1KtXD4DPPvssoRTOTz/9RPv27Vm1atVu6z722GNjn+fPn7/LvKeffjqgxJsThZHbuXMn1157LZ999tlu63Vw+Lthb+41B4f9ATf3/HWoVKkS6enpACxcuPBvwaI6G9RSiokTJ8Y+SyljtjILFy5k1qxZrFixIna8Zs2avPrqq3EG6gZ9+vSJxe1t164dnTt3pkmTJqSlpfHll18yYsQI1q5dy1VXXcVLL720y3Y1b96cJ598ElBbOn379qV27doceuihAGRmZpKZmRmr99133wXg5ptvZsaMGVxwwQVkZGSwdOlSXnrpJZYuXUqzZs1YunSp00B1cLDQvHnz2OfbbruNH374gRNOOCFm51ejRg2ys7P/quY5HKRwc0/pxbnnnsuECRNYvnw5HTt2pG3btlSsWDF2PC8vb5fRsw44/DURVh0SASse8p78r1ixorzhhhvk5s2bd1nub7/9Jjt37rzLsi655BL5888/7zY+eElJSSx+caL/4fjD/fv332W9ubm5cv369bJ27doSkLVr194nY+ngsD9g/5Z/77nJ7jUppbziiiuS3jt/l3jcDn8+3Nyzb+Yez/OStmdvzv3ggw8S5lmwYIFMTU1N2qcVK1b84T6UJjgG9QBAmTJlqFChAhUqVKBOnTrk5OTQuHFjLrrooj16WxJC8PLLL3PhhRfy/PPPs2DBAn7++WeqVKlCgwYN6NKlCx06dNijthx66KG8++67PPHEE7zxxht8/fXXbNmyJal23f33388555zDU089xdy5cykqKqJy5cpkZWVxxRVX0K1bt13GaXZw+Dtj5MiRnHPOOYwePZovv/ySH3/8MeZ44uDwZ8PNPaULDRo04PPPP+fRRx/lww8/ZNWqVbsMJHCgQ0j5NzBkcHBwcHBwcHBwOGDgnKQcHBwcHBwcHBxKFdwC1cHBwcHBwcHBoVTBLVAdHBwcHBwcHBxKFdwC1cHBwcHBwcHBoVTBLVAdHBwcHBwcHBxKFdwC1cHBwcHBwcHBoVSh1IuA/fbbb6xdu5a
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": "<Figure size 800x800 with 6 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAqgAAAKvCAYAAACmvT3kAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOydf5xN1frH36sGTZkZje5IaKaMolJIJApRoSglhVu4un7kKtJXfqR9TkK5SVKhm4uKSkpxS4kQpVzJTVEhIyRTZEY1YWp9/1hrnb32nnMGJQ2tz7zmdc5ee+31a5+999qf9TyfR0gpJQ4ODg4ODg4ODg4lBMf80Q1wcHBwcHBwcHBwsOEmqA4ODg4ODg4ODiUKboLq4ODg4ODg4OBQouAmqA4ODg4ODg4ODiUKboLq4ODg4ODg4OBQouAmqA4ODg4ODg4ODiUKboLq4ODg4ODg4OBQouAmqA4ODg4ODg4ODiUKboLq4ODg4ODg4OBQouAmqA4ODg5/AIQQCCFo0qTJH90UBweHPxiRSCR2T1i0aNEf3ZwSgaQ/ugEOPoQQcdNLly5NamoqaWlpZGZmUqdOHerXr8+VV15JcnLyYW3jlClTyMnJAdQF5eDwZ0aiazYRbr/9dh5++OEDyvvyyy+zatUqAPr27Uu5cuUOrnEODgcI9+w5NIhEIkSj0YM65rvvvjuga3vXrl2xe0etWrW45pprDr6BRxjcBPUIwN69e/n222/59ttv2bBhA2+99RYA5cqVo3PnzkSjUdLS0g5LW6ZMmcLixYuBknuTcHA4GvDyyy8zdepUALp06eImqA6HHe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1q1aoBsGLFirhSON9//z3XX389mzdv3m/dp512Wuz7ypUri817wQUXAEq8OV4YuX379vH3v/+dFStW7LdeB4c/Gw7mWnNwOBxwz54/Dunp6aSlpQGwatWqPwWL6mxQSyhefvnl2HcpZcxWZtWqVbz99tts3Lgxtr9y5co8++yzRQzUDfr06ROL29uuXTs6depEo0aNSElJ4eOPP2bKlCl89dVX3HzzzTz11FPFtqtZs2Y88sgjgFrS6devH5mZmRx77LEAZGdnk52dHav3zTffBOCOO+5g0aJFXHHFFZQvX55169bx1FNPsW7dOpo2bcq6deucBqqDg4VmzZrFvg8YMIBvvvmGM888M2bnV6lSJWrWrPlHNc/hKIV79pRcXHrppcyaNYsNGzZwww03cO2111KuXLnY/saNGxcbPeuIwx8TYdUhHrDiIR/If7ly5eRtt90mv/vuu2LL/eWXX2SnTp2KLevqq6+WP/74437jgxcWFsbiF8f7D8cfHjRoULH1NmzYUObm5srMzEwJyMzMzEMylg4OhwP2b/nXHpvoWpNSyg4dOiS8dv4s8bgdfn+4Z8+hefZ4npewPQdz7MKFC+Pm+fDDD2VycnLCPm3cuPE396EkwTGoRwBKlSpFamoqqampZGVlUadOHerXr89VV111QG9LQgieeeYZrrzySv71r3/x4Ycf8uOPP5KRkUGtWrW46aabaN++/QG15dhjj+XNN99k7NixvPLKK3z66afk5+cn1K4bMWIEl1xyCY8++ijvv/8+eXl5nHTSSdSoUYMOHTrQpUuXYuM0Ozj8mfH0009zySWX8Pzzz/Pxxx+za9eumOOJg8PvDffsKVmoVasWH3zwAQ899BBLlixh8+bNxQYSONIhpPwTGDI4ODg4ODg4ODgcMXBOUg4ODg4ODg4ODiUKboLq4ODg4ODg4OBQouAmqA4ODg4ODg4ODiUKboLq4ODg4ODg4OBQouAmqA4ODg4ODg4ODiUKboLq4ODg4ODg4OBQolDiRcB++eUXvvrqK1J
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": "<Figure size 800x800 with 6 Axes>",
"image/png": "iVBORw0KGgoAAAANSU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xC4Eh9Vha1bvXo1jz76KC+//DKffPIJ33zzDd9//33GvMuWLdtqbSsvL2f8+PG8+OKLzJs3jzVr1vDdd9/9z+v18NiW2JRQv7cZ9dgR4d89mbE5Qv07nM3oVoafoO4g+Pbbb1Of69atm3b8qaeeYvDgwZSVlW1WeeXl5VulXdOmTaNPnz6sXLlym9br4bGt4UW5PX6P2JHfPS+//HKVE2mo/p73Qv2/Hn6CugPg559/jqz+9tprr8jx119/nT59+qRWum3btqW4uJj999+fvLw8ateuncrbu3fvVJm/FgsXLuT444+noqICgJYtW9KzZ09atGhB3bp12XXXXVN5zz//fL7++uutUq+Hh4eHx/8eO/q75/zzz2fJkiVV1qN8uOL/KfwEdQfAvHnzUqu83XffPS3kXCKRSD0gHnjgAf785z9nLKeqrY9fipEjR6YeENdccw033HBDlVtAVbXJw8PDw6Nmwr97PP6X8BPUHQCPP/546vORRx4Z8Zj86aefeOONNwBo165dtTdjdSvFX4KSkhJA29lcf/31VT4g1q9fz7p167Zq3R4eHh4e/1vs6O8e72X/28J78W/nWLFiBf/85z9T3wcOHBg5vnbtWiorKwHYf//9qy1r6tSpm6xvp53sT2ZT2xurVq0CdJhG97w4SkpKfBxnD48YtuRe8/DY1vDvnm2L3+PzwE9Qt2OsX7+eM844I2WkXlhYyOmnnx7Js9tuu6U+L168uNqybrvttk3Wuccee6Q+b2pbRur+/PPPq7yhfv75560a3s7DY0fBltxrHh7bEv7ds+3xe3we+AnqdgilFFOmTKFdu3a8+eabAOTm5vLvf/87bbWYl5dHixYtAHj//fczSuH897//5fTTT2fp0qWbrHvfffdNfZ49e3a1eQ8//HBAizdnCiO3YcMG/vznP/P+++9vsl4Pj98btuRe8/DYFvDvnt8OdevWJS8vD4C5c+f+LlhUb4NaQzFp0qTUZ6VUylZm7ty5vP7663zxxRep402aNOGJJ55IM1AXDB06NBW397TTTqNv37506tSJnJwcPv74Yx5++GG++uorzj33XB599NFq29WtWzfuvPNOQG/pDBs2jObNm7PzzjsDUFBQQEFBQareV155BYDLLruM6dOn0717d+rVq8fChQt59NFHWbhwIV27dmXhwoVeA9XDw0G3bt1Sn6+44gq+/vprWrZsmbLza9y4Ma1bt/6tmuexg8K/e2oujj76aCZOnMjixYs588wzOeWUU6hTp07qeOfOnauNnrXd4beJsOqRCTjxkDfnf506ddQll1yivvnmm2rL3bhxo+rbt2+1ZZ100knq+++/32R88MrKylT84kz/4/GHr7rqqmrrLSoqUqtXr1bNmzdXgGrevPlWGUsPj20B97f8S8+t6l5TSqmzzz67ynvn9xKP2+N/D//u2TrvnjAMq2zPlpw7bdq0jHnmzJmjsrOzq+zTF1988av7UJPgGdTtALVq1SI3N5fc3Fzy8/Np27YtHTp04IQTTtis1VIQBDz22GMcf/zx/POf/2TOnDl8//33NGjQgDZt2tCvXz/OOOOMzWrLzjvvzCuvvMIdd9zBc889x4IFCygvL69Su+6mm27iqKOO4u6772bWrFmUlZVRv359CgsLOfvssxkwYEC1cZo9PH7PGDduHEcddRRPPfUUH3/8Md9++23K8cTD438N/+6pWWjTpg0ffPABt956K2+88QZLly6tNpDA9o5Aqd+BIYOHh4eHh4eHh8d2A+8k5eHh4eHh4eHhUaPgJ6geHh4eHh4eHh41Cn6C6uHh4eHh4eHhUaPgJ6geHh4eHh4eHh41Cn6C6uHh4eHh4eH
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": "<Figure size 800x800 with 6 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAqgAAAKvCAYAAACmvT3kAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOydfZxV0/7H3ys9GEyTylQqU5ooTLcHChOFQUVIKdVNkVtCkVzEZZ/Dj3ARQg+3VJLoSiWU1FUUihKlUKkUPehpCiOl9ftjrXX22vvsMxVhGuszr3mds9deez3ts/de+7O+389XSCklDg4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fihIcg3oIoFSpUpQtW5ayZctSo0YNGjZsSJMmTbj44ov3621JCMHzzz/PRRddxH/+8x8+/vhjfvzxRzIzM6lfvz5dunShffv2+9WWww47jLfeeosnnniCyZMn8/nnn7Njx46U2nUPPPAAZ599Nk899RTz5s0jPz+fihUrUrduXTp27Ei3bt0KjdPs4PBXxpgxYzj77LN56aWXWLJkCdu3b084njg4/N5wz56ihfr167NgwQIee+wx3n33XdauXVtoIIFDHULKv4Ahg4ODg4ODg4ODwyED5yTl4ODg4ODg4OBQpOAmqA4ODg4ODg4ODkUKboLq4ODg4ODg4OBQpOAmqA4ODg4ODg4ODkUKboLq4ODg4ODg4OBQpOAmqA4ODg4ODg4ODkUKRV4EbO/evXz77be
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": "<Figure size 800x800 with 6 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAqgAAAKvCAYAAACmvT3kAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOydfZxN1f7H30ukiTGiRp4aMmTUSJP0QEl0UamUVEqIS90ukW55uNnn1C/UTSo9kUpPKjdRKil6pCJJFF0PGXkWalBTkfX7Y6119tr77DMoMab18fKac9Zee+211z777HU+6/P9fIWUUuLg4ODg4ODg4OBQTFDqQHfAwcHBwcHBwcHBwYaboDo4ODg4ODg4OBQruAmqg4ODg4ODg4NDsYKboDo4ODg4ODg4OBQruAmqg4ODg4ODg4NDsYKboDo4ODg4ODg4OBQruAmqg4ODg4ODg4NDsYKboDo4ODg4ODg4OBQruAmqg4ODg4ODg4NDsYKboDo4ODgcAAghEEJw9tlnH+iuODg4HGDEYrHEd8J77713oLtTLFD6QHfAwYcQIrL80EMPpUKFCmRkZJCVlUVeXh6nnnoq559/Pmlpafu1j+PGjSM/Px9QN5SDw18Zqe7ZVLjxxhu577779qju5MmTmT9/PgB9+/alYsWKe9c5B4c9hHv27BvEYjHi8fhe7fP999/v0b39ww8/JL47GjVqxMUXX7z3HTzI4CaoBwF+/fVXNm3axKZNm1i+fDnvvPMOABUrVqRLly7E43EyMjL2S1/GjRvH+++/DxTfLwkHh5KAyZMn89RTTwHQtWtXN0F12O9wz57igx9++CEx+e3SpYuboDocOEyaNCnxWkpJQUEB33//PfPnz+eDDz4gPz+fH374gfvvv5+JEyfy/PPP06xZswPYYweHvzbsezYV6tSpk3gtpfwzu+Pg8Lvgnj37BpdffjlXXHHFbuuVK1cOUJPuv+LEuyi4CWoxRVG/jqSUTJ06lb59+7J06VJWr17NBRdcwKxZszj++OP3XycdHBwS+CswGg4lH+7Zs29Qv359953wB+GCpA5CCCE477zzmDt3buKXa0FBAZdddhm7du06wL1zcHBwcCiJcM8eh/0JN0E9iFGhQgUmTJiQ0KYtXryYF198MbJuYWEhkyZN4oYbbuDUU0+lcuXKlClThoyMDI4//niuv/56vvjii5THOvvssxFCJDRA4Ech2//DSxQ7d+5k2rRp9O/fn2bNmpGZmcmhhx5Keno69erVo2vXrnzwwQd/eCwcHA42pIri79q1K0KIhP4UoHbt2kn3WteuXfdvhx0cNNyzZ98jVRR/fn4+Qghq166dKHvqqacix8AEkZUUuCX+gxxVq1alZ8+e3H333QA88cQTXHnllUn1GjRoEPnh3bp1K4sWLWLRokU8+uijDBw4kKFDh+6z/p177rmRlhk7duxg6dKlLF26lKeeeoouXbowZswYDj300H12bAcHBweHPwfu2ePwZ8NNUEsAOnXqlPiS+Oijj9ixYwdlypQJ1CksLKRSpUqce+65nHTSSVSvXp0yZcqwZs0a5s2bx4QJE9ixYwfDhg0jMzOTvn37Bvb/v//7PzZt2sS///1vvvrqKyA6KKR+/fpJxy1fvjwtW7bk5JNPplatWhx22GGsW7eOr776iueee44ff/yRp556iooVK+6xBY+DQ0lFnz59uPjii3nggQd49913ARg9ejSZmZmBesccc8yB6J6DQwLu2fPnIzMzk0m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LNn/+Kv+H3gJqgHMbZt20bHjh0TIvWcnBwuu+yyQJ3DDz888Xr58uVFtjVy5MjdHrN8+fKJ17tbljHH/uabb1LeUL/99ts+TW/n4FBSsDf3moPD/oR79ux//BW/D9wE9SCElJKpU6fSuHFjZs6cCUCFChX473//m/RrMSMjg7p16wIwd+7cSCuc7du3c9lll7Fq1ardHrt27dqJ1/PmzSuy7imnnAIo8+aoNHI7duzg73//O3Pnzt3tcR0c/mrYm3vNwWF/wD17DhwqVapERkYGAPPnz/9LsKhOg1pMMXny5MRrKWVCKzN//nw++OADVqxYkdheo0YNnn/++SSBukHv3r0TeXs7dOjAVVddRbNmzUhPT+fLL79k3LhxrF27lmuuuYann366yH61bNmSBx54AFBLOv369SMrK4tDDjkEgOzsbLKzsxPHffvttwG46aabeO+992jdujWVK1dm6dKlPP300yxdupQWLVqwdOlS54Hq4GChZcuWide33HIL3333Hccdd1xC51e9enVyc3MPVPccSijcs6f44pxzzmHSpEksX76cyy+/nEsuuYSKFSsmtjdv3rzI7FkHHQ5MhlWHKGDlQ96T/xUrVpR9+vSR33//fZHt7tq1S1511VVFtnXRRRfJn376abf5wXfu3JnIXxz1P5x/eODAgUUet2nTpnLjxo0yKytLAjIrK2ufjKWDw/6A/Vn+vfumuteklPLKK69Mee/8VfJxO/z5cM+effPs8TwvZX/2Zt933303ss7nn38u09LSUp7TihUr/vA5FCc4BvUgQJkyZahQoQIVKlSgVq1a5OXlceqpp3LBBRfs0a8lIQTPPvss559/Po899hiff/45P/30E5mZmTRq1IjOnTvTsWPHPerLIYccwttvv83999/PK6+8wtdff83WrVtTetcNHTqUs846iwcffJDZs2dTUFDAkUceSU5ODldeeSVdu3YtMk+zg8NfGc888wxnnXUWL774Il9++SU//PBDIvDEweHPhnv2FC80atSIzz77jHvvvZcPP/yQVatWFZlI4GCHkPIvIGRwcHBwcHBwcHA4aOCCpBwcHBwcHBwcHIoV3ATVwcHBwcHBwcGhWMFNUB0cHBwcHBwcHIoV3ATVwcHBwcHBwcGhWMFNUB0cHBwcHBwcHIoV3ATVwcHBwcHBwcGhWKHYm4Dt2rW
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": "<Figure size 800x800 with 6 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArUAAAKvCAYAAAB07Te8AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOydf7wN1f7/n6v86FQcl+7xu6McoZsSIj8iOflRKSKFitL1o0JuvkK3Zu+6oT6VpG50E/pBdRNdlUghSgkJpUKO/FbkUJ1E1vePtdaeNbNnHyrpONbTw2OfPXvNmjVr9uxZ85r3er2FlFLicDgcDofD4XAcxRz3ZzfA4XA4HA6Hw+H4vbhBrcPhcDgcDofjqMcNah0Oh8PhcDgcRz1uUOtwOBwOh8PhOOpxg1qHw+FwOBwOx1GPG9Q6HA6Hw+FwOI563KDW4XA4HA6Hw3HU4wa1DofD4XA4HI6jHjeodTgcDofD4XAc9bhBrcPhcBwlCCEQQnDhhRf+2U1xOBx/MrFYLPGbMHfu3D+7OQWCIn92Axy/DyFE5PJixYpRsmRJ0tPTyczMpE6dOjRo0IBLL72UtLS0I9rGCRMmkJOTA6iT0OE4lkl1zqaif//+PPLII4dUdtq0aSxbtgyA2267jVKlSv26xjkch4i79hweYrEY8Xj8V63z3XffHdK5vWvXrsRvR+3atWnXrt2vb+BRhhvUFlJ+/vlnvv32W7799lvWrl3LO++8A0CpUqXo1q0b8Xic9PT0I9KWCRMmMG/ePKDg/rA4HIWBadOmMXHiRAC6d+/uBrWOI4679hQcdu3alRgwd+vWzQ1qHUcXU6dOTfwtpSQ3N5fvvvuOZcuW8e6775KTk8OuXbsYNWoUU6ZMYfLkyTRp0uRPbLHDcWxjn7OpqFq1auJvKeUf2RyH4zfhrj2Hh6uvvpprrrnmoOVOOukkQA3Uj8XBen64QW0hIr+7MCklM2bM4LbbbmP16tVs3LiRyy67jPfee4+//e1vR66RDocjwbGgnDgKP+7ac3ioUaOG+034nbiJYscIQgguueQSFi9enLhDzs3N5aqrruLAgQN/cuscDofDURhx1x7HkcQNao8xSpYsyUsvvZSItVu1ahUvvvhiZNm8vDymTp3KLbfcQoMGDShTpgxFixYlPT2dv/3tb/Tp04dPPvkk5bYuvPBChBCJmCbwZ2/b/8OPT/bv38/MmTO5/fbbadKkCRkZGRQrVowSJUpwxhln0L17d959993f3RcOx9FGKveD7t27I4RIxNMCnHbaaUnnWvfu3Y9sgx0Ojbv2HH5SuR/k5OQghOC0005LLJs4cWJkH5iJdIUFF35wDFK+fHl69uzJAw88AMDTTz9N586dk8qdeeaZkV/43bt389lnn/HZZ58xZswYhgwZwrBhww5b+y6++OJIe5J9+/axevVqVq9ezcSJE+nWrRtPPvkkxYoVO2zbdjgcDscfg7v2OP5o3KD2GKVLly6JH5b333+fffv2UbRo0UCZvLw8SpcuzcUXX8y5555LxYoVKVq0KJs2bWLp0qW89NJL7Nu3j+HDh5ORkcFtt90WWP9f//oX3377Lf/85z/59NNPgeiJMTVq1Eja7sknn0yLFi2oW7cuVapU4YQTTmDLli18+umnPP/88/zwww9MnDiRUqVKHbLdkcNRWOnXrx/t2rXj0UcfZc6cOQCMHTuWjIyMQLlTTz31z2iew5HAXXv+eDIyMpg6dSrbt2+nV69eADRv3px+/fpFli1USMdRDZD4/2vYv3+/POmkkxLrLlu2LKnMjBkz5L59+1LWkZOTI2vUqCEBWaJECbl79+7Ics2aNftVbZw9e7b88ccfU37+7bffyiZNmkhAHnfccfKrr746pHodjoLAbz1n7XWbNWsW+Xm3bt0SZdatW/f7Gupw5IO79hyea4/neYk2ep73m9edM2dO0ufr1q1LfN6tW7ff3dajARdTe4xy/PHHU6lSpcT7b775JqlM69atKVIktZifmZnJv//9bwD27NnDq6++elja1qJFi3xNusuUKZOIHTxw4ADPP//8Ydmuw3GkiYpxczGwjs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ic8rVarE5MmTk4L0DX379k3kie7YsSNdu3alSZMmlChRgpUrVzJhwgQ2b97M9ddfzzPPPJNvu1q0aMGjjz4KqMdNAwYMIDMzk+OPPx6ArKwssrKyEtt96623APjHP/7B3LlzadWqFWXKlGH16tU888wzrF69mubNm7N69WrnUetwWLRo0SLx96BBg/jmm2+oXr16Im6xYsWK1KpV689qnqOQ4q49BZeLLrqIqVOnsnbtWq6++mquvPJKSpUqlfi8WbNm+WZRO+r4c7LzOg4XWPm3D+V/qVKlZL9+/eR3332Xb70HDhyQXbt2zbeuK664Qv74448HzUe/f//+RL7sqP/hfNdDhgzJd7uNGzeW27dvl5mZmRKQmZmZh6UvHY4jgf1d/q3rpjrXpJSyc+fOKc+dYyX/u+OPx117Ds+1x/O8lO35NevOmTMnsszHH38s09LSUu7TunXrfvc+FCScUltIKVq0KCVLlqRkyZJUqVKFOnXq0KBBAy677LJDuisTQvDcc89x6aWX8p///IePP/6YH3/8kYyMDGrXrs11111Hp06dDqktxx9/PG+99RajRo3i1Vdf5fPPP2f37t0pvQWHDRtG06ZNeeyxx/jwww/Jzc3llFNOoWbNmnTu3Jnu3bvnmxfc4TiWefbZZ2natCkvvvgiK1euZNeuXYnJNw7HH4279hQsateuzZIlS3j44YeZP38+GzZsyDc5xNGOkPIYCLJwOBwOh8PhcBRq3EQxh8PhcDgcDsdRjxvUOhwOh8PhcDiOetyg1uFwOBwOh8Nx1OMGtQ6Hw+FwOByOox43qHU4HA6Hw+FwHPW4Qa3D4XA4HA6H46jn6DJcO0QOHDjA5s2bKVGiBEKIP7s5DsdhQepMPRUqVEhKL/ln4c41R2G
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": "<Figure size 800x800 with 6 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAqgAAAKvCAYAAACmvT3kAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pX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cOpH379tSrV4/DDjuM6tWr07x5c3r37s1rr732vc+Fg8PBhnRR/L1798bzPF9/CtC0adOUe613794/boMdHDTcu+fAI10Uf1lZGZ7n0bRpU79s3LhxsefABJFVFbgp/oMcDRo04Oqrr+ZPf/oTAH/729/o3r17ynonn3xy7I93586dLFu2jGXLlvHYY48xaNAghgwZcsDad+6558ZaZuzZs4cVK1awYsUKxo0bR0lJCY8//jiHHXbYAdu3g4ODg8MPA/fucfih4TqoVQA9evTwHxJvvvkme/bsoVq1aqF1du/eTe3atTn33HNp1aoVDRs2pFq1aqxfv55FixYxadIk9uzZw9ChQ6lXrx433nhjaPs//OEPbNmyhdtvv50PPvgAiA8KOemkk1L2e/TRR9O5c2dOP/10srOzOeKII9iwYQMffPABEyZM4LPPPmPcuHHUrFlzvy14HByqKq6//nouvvhiHnzwQWbPng3AyJEjqVevXmi944477qdonoODD/fu+eFRr149pk6dyubNm7nmmmsA6NSpE9dff33sulUK0qHSAPD/fxvs3btXHnXUUf62S5YsSVln5syZcs+ePWnrKCsrkyeddJIEZPXq1eXOnTtj1+vYseO3auOsWbPk559/nnb5li1bZPv27SUgDznkEPnRRx/tV70ODpUB3/Wetbft2LFj7PKSkhJ/ndWrV3+/hjo4VAD37jkw7x4hhN9GIcR33nb27Nkpy1evXu0vLykp+d5tPRjgNKhVAIceeiiNGjXyv//3v/9NWadLly5kZKQnzJs0acKjjz4KwK5du5g+ffoBaVvnzp0rNHSuU6eOr7X75ptvmDBhwgHZr4PDj404TZjTjDpUZbh3T3okk8l9PhOqmmb0QMN1UKsIatWq5X/eunXrd6rjrLPO8j+//fbb37tN+4vjjz+eY4455kffr4ODg4PD94N79zj8UHAa1CoC2+IjXdq6zZs388QTT/Dyyy+zbNkytm/fzueffx677rp16w5Y23bu3MmECRN44YUXWLp0KVu2bOGzzz77wffr4PBjYl9G/U4z6lAV4d498dgfo/4qpxk9wHAd1CqCHTt2+J9r166dsvyZZ57hmmuuoby8fL/q27lz5wFp1+zZs+nRowcb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/81a9aU119/vdy+fXuF9X7zzTeyZ8+eFdZ10UUXyc8//3yf+cH37t3r5y+O+x/NPzxo0KAK99uuXTu5efNm2aRJEwnIJk2aHJBz6eDwY8D+LX/XbdPda1JK2b1797T3zv9KPm6HHx7u3XNg3j1CiLTt+Tbbzp49O3adxYsXy8zMzLTHtHr16u99DJUJjkE9CFCtWjVq1KhBjRo1yM7OJj8/n7Zt2/KrX/1qv0ZLnufx5JNPcsEFF/DXv/6VxYsX8/nnn1OvXj1atmxJr1696Nat23615dBDD+WVV17hgQceYPr06fz73/9m586dab3rhgwZwtlnn83DDz/M22+/TXl5OXXr1iU3N5fu3bvTu3fvCvM0Ozj8L2P8+PGcffbZPPPMM7z//vvs2LHDDzxxcPih4d49lQstW7Zk4cKF/OUvf+H1119n7dq1FSYSONjhSfk/IGRwcHBwcHBwcHA4aOCCpBwcHBwcHBwcHCoVXAfVwcHBwcHBwcGhUsF1UB0cHBwcHBwcHCoVXAfVwcHBwcHBwcGhUsF1UB0cHBwcHBwcHCoVXAfVwcH
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": "<Figure size 800x800 with 6 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAq4AAAKvCAYAAACro02jAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOydf7xVU/7/n0u3cumHfij9covCNWpyNYUijWsqXCNSZNI1NRJq5Gc/fGefY6QYv/NbPgr50aAIiRAVIpUyhaKSJPrhViPpZn3/eK+199r7nBszk9xu69Wjx7lnn7XXXnuds/da+7Ve79dbaa01Hh4eHh4eHh4eHuUce/3aDfDw8PDw8PDw8PD4OfATVw8PDw8PDw8Pj90CfuLq4eHh4eHh4eGxW8BPXD08PDw8PDw8PHYL+Imrh4eHh4eHh4fHbgE/cfXw8PDw8PDw8Ng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1b07t3b3r06PGz2lKpUiVeeeUVbr/9dp599lk++ugjNm7cWKb33vXXX8/xxx/PnXfeyezZsykpKaFu3brk5+dzzjnnUFxcvMM81h4eezIeeeQRjj/+eJ588kk+/PBDvv322zDgxcPjl4Yfe8oXWrduzfvvv88tt9zCjBkzWLly5Q4TJOzuUFrvAYIIDw8PDw8PDw+P3R4+OMvDw8PDw8PDw2O3gJ+4enh4eHh4eHh47BbwE1cPDw8PDw8PD4/dAn7i6uHh4eHh4eHhsVvAT1w9PDw
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": "<Figure size 800x800 with 6 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAq4AAAKvCAYAAACro02jAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOydeXxVxf3+36cGMRUIm2jYEiCIUbFsghgQLHHBijWKqFgkFASXokT9qsDPzr1aQFstKu5iCSKiVARFxQUqqytbRUkRlCCbIAgBlSLg/P6YmXPmnHtvQIsawjy8eOXeOducc+45M/PM83k+npRS4uDg4ODg4ODg4FDB8atfugIODg4ODg4ODg4OBwLXcXVwcHBwcHBwcDgk4DquDg4ODg4ODg4OhwRcx9XBwcHBwcHBweGQgOu4Ojg4ODg4ODg4HBJwHVcHBwcHBwcHB4dDAq7j6uDg4ODg4ODgcEjAdVwdHBwcHBwcHBwOCbiOq4ODg4ODg4ODwyEB13F1cHBwqEDwPA/P8+jatesvXRUHB4dfGLFYzH8nzJ49+5euToVA2i9dAYf9w/O8pOVHHnkkNWrUICMjg6ysLNq0aUOHDh343e9+R3p6+s9ax+LiYkpLSwH1oDk4HM5I9cymwg033MB99913QOtOmzaNpUuXAjBkyBBq1qz5wyrn4HCAcG3PwUEsFiMej/+gbbZt23ZAz/b27dv9d0erVq248MILf3gFDzG4jushjO+++44tW7awZcsWPv30U/71r38BULNmTfr27Us8HicjI+NnqUtxcTFz5swBKu7Lw8GhMmDatGmMHz8egMLCQtdxdfjZ4dqeioPt27f7neK+ffu6jqtDxcPUqVP9z1JKysrK2LZtG0uXLmXu3LmUlpayfft27r//fqZMmcKkSZPo1KnTL1hjB4fDG/YzmwrNmjXzP0spf8rqODj8KLi25+Dg0ksv5bLLLtvvekcffTSgOuOHY4e8PLiO6yGG8kZTUkpmzJjBkCFDWLlyJevWreP8889nwYIFnHTSST9fJR0cHHwcDgyIQ+WHa3sODk444QT3Tvgf4YKzKhE8z+O8885j4cKF/ki3rKyMSy65hO+///4Xrp2Dg4ODQ2WEa3scfk64jmslRI0aNZg8ebKvfSspKeG5555Luu6uXbuYOnUq1113HR06dKBOnTpUqVKFjIwMTjrpJK655hr+/e9/pzxW165d8TzP1xhBEBVt/49Odezdu5fXX3+dm266iU6dOlGvXj2OPPJIqlevzvHHH09hYSFz5879n6+Fg8OhhlSuAoWFhXie5+tbAZo0aZLwrBUWFv68FXZw0HBtz8FHKleB0tJSPM+jSZMmftn48eOTXgMTvFZZ4KQClRSZmZkMHDiQv/71rwD84x//4PLLL09Y78QTT0z6o96xYwfLly9n+fLlPProowwdOpSRI0cetPqdddZZSa099uzZw8qVK1m5ciXjx4+nb9++PP744xx55JEH7dgODg4ODj8NXNvj8FPDdVwrMXr37u2/PN5++2327NlDlSpVQuvs2rWL2rVrc9ZZZ9G6dWsaNGhAlSpVWL9+PYsXL2by5Mns2bOHUaNGUa9ePYYMGRLa/i9/+Qtbtmzh//2//8fHH38MJA9GOeGEExKOW61aNbp160bbtm3Jzs7mqKOOYuPGjXz88cdMnDiRb775hvHjx1OzZs0DtgpycKisuP7667nwwgt54IEHeOuttwB47LHHqFevXmi9xo0b/xLVc3Dw4dqenx716tVj6tSpbN68mUGDBgFw5plncv311yddt1JBOlR4AP7/H4K9e/fKo48+2t926dKlCevMmDFD7tmzJ+U+SktL5QknnCABWb16dbljx46k63Xp0uUH1XH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2023-07-20 20:34:19 +02:00
}
],
"source": [
2023-07-26 09:41:51 +02:00
"for i in range(0,shape[0]):\n",
" for j in range(0,shape[1]):\n",
" bval = result[i][j].best_values\n",
" fit = density_profile_BEC_2d(X,Y, **bval)\n",
" vmax = np.max(fit)\n",
"\n",
" fig, axs = plt.subplots(2, 3, figsize=(8, 8))\n",
"\n",
" ax = axs[ 0,0]\n",
" art = ax.pcolormesh(X, Y, cropOD[i,j], vmin=0, vmax=vmax, cmap='jet', shading='auto')\n",
" #plt.colorbar(art, ax=ax, label='z')\n",
" ax.set_title('Data')\n",
"\n",
" # Plot gaussian 2d Fit + legend including Width parameters\n",
" ax = axs[0,1]\n",
2023-07-20 20:34:19 +02:00
"\n",
2023-07-26 09:41:51 +02:00
" art = ax.pcolormesh(X, Y, fit, vmin=0, vmax=vmax, cmap='jet', shading='auto')\n",
" #plt.colorbar(art, ax=ax, label='z')\n",
" ax.set_title('Fit')\n",
2023-07-20 20:34:19 +02:00
"\n",
2023-07-26 09:41:51 +02:00
" ax = axs[0,2]\n",
2023-07-20 20:34:19 +02:00
"\n",
2023-07-26 09:41:51 +02:00
" art = ax.pcolormesh(X, Y, fit-cropOD[i,j], vmin=0, vmax=0.2, cmap='jet', shading='auto')\n",
" ax.set_title('Data-Fit')\n",
2023-07-20 20:34:19 +02:00
"\n",
2023-07-26 09:41:51 +02:00
" ax = axs[1,0]\n",
"\n",
" art = ax.plot(x, cropOD[i,j, round(center[i,j,1]), :])\n",
" ax.plot(x, fit[round(center[i,j,1]), :])\n",
" ax.plot(x, thermal(x, bval['x0_th'], bval['amp_th'], bval['sigmax_th']))\n",
"\n",
" ax.set_title('cut along x')\n",
"\n",
" ax = axs[1,1]\n",
"\n",
" art = ax.plot(y, cropOD[i,j, :, round(center[i,j,0])])\n",
" ax.plot(y, fit[:, round(center[i,j,0])])\n",
" ax.plot(x, thermal(y, bval['y0_th'], bval['amp_th'], bval['sigmay_th']))\n",
" ax.set_title('cut along y')\n",
"\n",
"\n",
"\n",
" plt.show()"
2023-07-20 20:34:19 +02:00
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
2023-07-26 09:41:51 +02:00
"end_time": "2023-07-26T07:28:03.122325300Z",
"start_time": "2023-07-26T07:27:55.722296100Z"
2023-07-20 20:34:19 +02:00
}
}
},
{
"cell_type": "code",
2023-07-26 09:41:51 +02:00
"execution_count": 208,
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"FWHM_x BEC: 8.88, FWHM_x thermal: 38.18\n",
"FWHM_y BEC: 31.53, FWHM_y thermal: 35.28\n",
"\n",
"FWHM_x BEC: 9.75, FWHM_x thermal: 39.38\n",
"FWHM_y BEC: 32.46, FWHM_y thermal: 34.81\n",
"\n",
"FWHM_x BEC: 10.09, FWHM_x thermal: 37.38\n",
"FWHM_y BEC: 31.75, FWHM_y thermal: 33.83\n",
"\n",
"FWHM_x BEC: 8.57, FWHM_x thermal: 32.57\n",
"FWHM_y BEC: 31.64, FWHM_y thermal: 28.49\n",
"\n",
"FWHM_x BEC: 9.10, FWHM_x thermal: 33.90\n",
"FWHM_y BEC: 30.85, FWHM_y thermal: 29.66\n",
"\n",
"FWHM_x BEC: 9.19, FWHM_x thermal: 27.86\n",
"FWHM_y BEC: 30.24, FWHM_y thermal: 26.64\n",
"\n",
"FWHM_x BEC: 9.40, FWHM_x thermal: 18.84\n",
"FWHM_y BEC: 22.97, FWHM_y thermal: 22.27\n",
"\n",
"FWHM_x BEC: 9.60, FWHM_x thermal: 10.31\n",
"FWHM_y BEC: 25.20, FWHM_y thermal: 16.63\n",
"\n",
"FWHM_x BEC: 9.39, FWHM_x thermal: 13.24\n",
"FWHM_y BEC: 25.24, FWHM_y thermal: 19.14\n",
"\n"
]
}
],
"source": [
"for i in range(0,shape[0]):\n",
" for j in range(0,shape[1]):\n",
" sx = result[i][j].best_values['sigmax_bec']\n",
" sy = result[i][j].best_values['sigmay_bec']\n",
" sx_th = result[i][j].best_values['sigmax_th']\n",
" sy_th = result[i][j].best_values['sigmay_th']\n",
" print(f'FWHM_x BEC: { sx*1.22:.2f}, FWHM_x thermal: { sx_th*1.93:.2f}')\n",
" print(f'FWHM_y BEC: { sy*1.22:.2f}, FWHM_y thermal: { sy_th*1.93:.2f}')\n",
" print('')"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2023-07-26T07:28:08.962590400Z",
"start_time": "2023-07-26T07:28:08.903953900Z"
}
}
},
{
"cell_type": "markdown",
2023-07-20 20:34:19 +02:00
"source": [],
2023-07-26 09:41:51 +02:00
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 152,
"outputs": [
{
"data": {
"text/plain": "<lmfit.model.ModelResult at 0x1f08f1e7d60>",
"text/html": "<h2> Model</h2> Model(density_profile_BEC_2d) <h2>Fit Statistics</h2><table><tr><td>fitting method</td><td>leastsq</td><td></td></tr><tr><td># function evals</td><td>660</td><td></td></tr><tr><td># data points</td><td>22500</td><td></td></tr><tr><td># variables</td><td>10</td><td></td></tr><tr><td>chi-square</td><td> 115.043851</td><td></td></tr><tr><td>reduced chi-square</td><td> 0.00511533</td><td></td></tr><tr><td>Akaike info crit.</td><td>-118689.037</td><td></td></tr><tr><td>Bayesian info crit.</td><td>-118608.825</td><td></td></tr><tr><td>R-squared</td><td> 0.36517195</td><td></td></tr></table><h2>Variables</h2><table><tr><th> name </th><th> value </th><th> standard error </th><th> relative error </th><th> initial value </th><th> min </th><th> max </th><th> vary </th><th> expression </th></tr><tr><td> amp_bec </td><td> 0.43797350 </td><td> 0.04403209 </td><td> (10.05%) </td><td> 0.6412865073706878 </td><td> 0.00000000 </td><td> 1.20759571 </td><td> True </td><td> </td></tr><tr><td> amp_th </td><td> 0.33848251 </td><td> 0.05507434 </td><td> (16.27%) </td><td> 0.2748370745874376 </td><td> 0.00000000 </td><td> 1.20759571 </td><td> True </td><td> </td></tr><tr><td> x0_bec </td><td> 76.9710005 </td><td> 0.14574325 </td><td> (0.19%) </td><td> 76.22058823529412 </td><td> 0.00000000 </td><td> 150.000000 </td><td> True </td><td> </td></tr><tr><td> y0_bec </td><td> 58.6853106 </td><td> 0.32241760 </td><td> (0.55%) </td><td> 58.63970588235293 </td><td> 0.00000000 </td><td> 150.000000 </td><td> True </td><td> </td></tr><tr><td> x0_th </td><td> 77.2286423 </td><td> 0.27255981 </td><td> (0.35%) </td><td> 76.22058823529412 </td><td> 0.00000000 </td><td> 150.000000 </td><td> True </td><td> </td></tr><tr><td> y0_th </td><td> 58.8262204 </td><td> 0.55406928 </td><td> (0.94%) </td><td> 58.63970588235293 </td><td> 0.00000000 </td><td> 150.000000 </td><td> True </td><td> </td></tr><tr><td> sigmax_bec </td><td> 8.19753077 </td><td> 0.18267507 </td><td> (2.23%) </td><td> 9.0 </td><td> 0.00000000 </td><td> 50.0000000 </td><td> True </td><td> </td></tr><tr><td> sigmay_bec </td><td> 17.5376093 </td><td> 0.41011798 </td><td> (2.34%) </td><td> 18.0 </td><td> 0.00000000 </td><td> 50.0000000 </td><td> True </td><td> </td></tr><tr><td> D_sigX </td><td> 0.86059710 </td><td> 0.72666984 </td><td> (84.44%) </td><td> 6.390000000000001 </td><td> 0.00000000 </td><td> 50.0000000 </td><td> True </td><td> </td></tr><tr><td> D_sigY </td><td> 5.4950e-11 </td><td> 0.00362848 </td><td> (6603174582.12%) </td><td> 6.390000000000001 </td><td> 0.00000000 </td><td> 50.0000000 </td><td> True </td><td> </td></tr><tr><td> sigmax_th </td><td> 5.62662875 </td><td> 0.32567851 </td><td> (5.79%) </td><td> 8.99802 </td><td> 0.00000000 </td><td> inf </td><td> False </td><td> 0.632*sigmax_bec + 0.518*D_sigX </td></tr><tr><td> sigmay_th </td><td> 11.0837691 </td><td> 0.25919456 </td><td> (2.34%) </td><td> 14.68602 </td><td> 0.00000000 </td><td> inf </td><td> False </td><td> 0.632*sigmay_bec + 0.518*D_sigY </td></tr></table><h2>Correlations (unreported correlations are < 0.100)</h2><table><tr><td>amp_bec</td><td>amp_th</td><td>-0.9816</td></tr><tr><td>y0_bec</td><td>y0_th</td><td>-0.8732</td></tr><tr><td>x0_bec</td><td>x0_th</td><td>-0.8519</td></tr><tr><td>sigmay_bec</td><td>D_sigY</td><td>+0.7342</td></tr><tr><td>amp_th</td><td>D_sigX</td><td>-0.6601</td></tr><tr><td>amp_bec</td><td>D_sigX</td><td>+0.6570</td></tr><tr><td>amp_th</td><td>D_sigY</td><td>+0.6209</td></tr><tr><td>amp_bec</td><td>D_sigY</td><td>-0.6140</td></tr><tr><td>sigmax_bec</td><td>D_sigX</td><td>-0.5632</td></tr><tr><td>sigmax_bec</td><td>D_sigY</td><td>-0.2750</td></tr><tr><td>sigmax_bec</td><td>sigmay_bec</td><td>-0.2644</td></tr><tr><td>D_sigX</td><td>D_sigY</td><td>-0.2165</td></tr><tr><td>sigmay_bec</td><td>D_sigX</td><td>+0.1629</td></tr><tr><td>amp_th</td><td>sigmax_bec</td><td>-0.1152</td></tr><tr><td>amp_bec</td><td>sigmay_bec</td><td>-0.1117</td></tr></table>"
},
"execution_count": 152,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"for i in range(0, shape[0]):\n",
" for j in range(0, shape[1]):\n"
],
2023-07-20 20:34:19 +02:00
"metadata": {
"collapsed": false,
"ExecuteTime": {
2023-07-26 09:41:51 +02:00
"end_time": "2023-07-25T14:17:00.810233Z",
"start_time": "2023-07-25T14:17:00.767238Z"
}
}
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [],
"metadata": {
"collapsed": false
}
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}