2023-07-20 10:19:32 +02:00
|
|
|
{
|
|
|
|
"cells": [
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-26 09:41:51 +02:00
|
|
|
"execution_count": 1,
|
2023-07-20 10:19:32 +02:00
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"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",
|
2023-07-20 20:34:19 +02:00
|
|
|
"import lmfit\n",
|
2023-07-20 10:19:32 +02:00
|
|
|
"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",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"#dataSet"
|
|
|
|
],
|
|
|
|
"metadata": {
|
2023-07-20 20:34:19 +02:00
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-27 17:16:08 +02:00
|
|
|
"end_time": "2023-07-27T08:59:09.268628700Z",
|
|
|
|
"start_time": "2023-07-27T08:59:06.705558800Z"
|
2023-07-20 20:34:19 +02:00
|
|
|
}
|
2023-07-20 10:19:32 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"source": [
|
|
|
|
"## Some functions"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-27 17:16:08 +02:00
|
|
|
"execution_count": 12,
|
2023-07-20 10:19:32 +02:00
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"# get center of thresholded image\n",
|
|
|
|
"\n",
|
2023-07-27 17:16:08 +02:00
|
|
|
"def calc_thresh(data):\n",
|
|
|
|
" shape = np.shape(data)\n",
|
|
|
|
" thresh = np.zeros(shape)\n",
|
|
|
|
" sigma = 0.4\n",
|
|
|
|
"\n",
|
|
|
|
" if len(shape) == 4:\n",
|
|
|
|
" blurred = gaussian_filter(data, sigma=sigma)\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",
|
|
|
|
" elif len(shape) == 3:\n",
|
|
|
|
" blurred = gaussian_filter(data, sigma=sigma)\n",
|
|
|
|
" for i in range(0,shape[0]):\n",
|
|
|
|
" thresh[i] = np.where(blurred[i] < np.max(blurred[i])*0.5,0,1)\n",
|
|
|
|
"\n",
|
|
|
|
" else:\n",
|
|
|
|
" print(\"Shape of data is wrong, output is empty\")\n",
|
|
|
|
"\n",
|
|
|
|
" return thresh\n",
|
|
|
|
"\n",
|
2023-07-20 10:19:32 +02:00
|
|
|
"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",
|
|
|
|
"\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",
|
2023-07-20 10:19:32 +02:00
|
|
|
"\n",
|
2023-07-26 09:41:51 +02:00
|
|
|
"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",
|
2023-07-20 10:19:32 +02:00
|
|
|
"\n",
|
|
|
|
"def thermal(x, x0, amp, sigma, order = 15):\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, order)\n",
|
2023-07-20 10:19:32 +02:00
|
|
|
"\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",
|
2023-07-20 10:19:32 +02:00
|
|
|
" 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",
|
|
|
|
" return thermal(x, x0_th, amp_th, sigma_th, order=15) + Thomas_Fermi_1d(x, x0_bec, amp_bec, sigma_bec)\n"
|
2023-07-20 10:19:32 +02:00
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-27 17:16:08 +02:00
|
|
|
"end_time": "2023-07-27T09:14:13.365949100Z",
|
|
|
|
"start_time": "2023-07-27T09:14:13.270705500Z"
|
2023-07-20 10:19:32 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-20 20:34:19 +02:00
|
|
|
"execution_count": 3,
|
2023-07-20 10:19:32 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": "<Figure size 640x480 with 1 Axes>",
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAh8AAAGZCAYAAAApXFOJAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAA7a0lEQVR4nO3de3jUd533/9cckklCkgkBAgmZECAEyikhJdjS1mrd1v6qtm5Z23pvrWhbcKvrent7t8tv9fLu3q6t1666bt1a1C6r4nb7s1TLtura2nNpLedDgJIEQiYkEE7J5DjJZL6/P2a+A5QAmTAz3zk8H9eV6+LwzeT9zSSZVz6f9+fzsRmGYQgAACBB7FYXAAAAMgvhAwAAJBThAwAAJBThAwAAJBThAwAAJBThAwAAJBThAwAAJBThAwAAJJTT6gLeLxgMqr29XQUFBbLZbFaXAwAAxsAwDPX09KisrEx2+8XHNpIufLS3t8vj8VhdBgAAGAev16vy8vKLXpN04aOgoEBSqPjCwkKLqwEAAGPh8/nk8Xgir+MXk3Thw5xqKSwsJHwAAJBixtIyQcMpAABIKMIHAABIKMIHAABIKMIHAABIKMIHAABIKMIHAAB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suQWSFqEDwB6K7zK5ZrZqT3qYfpgeLUO4QNIToQPIMMZhqFNzaGRj+VVkyyuJjauCd+HuXQYQHIhfAAZrrGzV8d7/MrJsquuYqLV5cTEspmT5LDbdPhkv9pO91tdDoD3IXwAGe6t8NREfWWxcrIcFlcTG/kup2rK3ZLO9LMASB6EDyDDvRV+cV6eJv0
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"x = np.linspace(-1,3, 1000)\n",
|
|
|
|
"plt.plot(x, Thomas_Fermi_1d(x, 1, 1, 1))\n",
|
|
|
|
"plt.show()"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-26 09:41:51 +02:00
|
|
|
"end_time": "2023-07-25T10:28:41.148813400Z",
|
|
|
|
"start_time": "2023-07-25T10:28:40.941625100Z"
|
2023-07-20 10:19:32 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"source": [
|
|
|
|
"## Import Data"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-27 17:16:08 +02:00
|
|
|
"execution_count": 3,
|
2023-07-20 10:19:32 +02:00
|
|
|
"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 + \"/*.h5\"\n",
|
|
|
|
"filePath = folderPath + \"/\" + shotNum + \"/2023-04-24_0009_Evaporative_Cooling_*0.h5\"\n",
|
|
|
|
"\n",
|
|
|
|
"# # load the data from HDF5 files\n",
|
|
|
|
"# dataSetDict = {\n",
|
|
|
|
"# dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
|
|
|
|
"# for i in [0] # range(len(groupList))\n",
|
|
|
|
"# }\n",
|
|
|
|
"\n",
|
|
|
|
"# selecte the data for centain camera\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",
|
|
|
|
"# rechunck the data for parallel computing\n",
|
|
|
|
"dataSet = auto_rechunk(dataSet)\n",
|
|
|
|
"\n",
|
|
|
|
"# calculate the absorption imaging\n",
|
|
|
|
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
|
|
|
|
"\n",
|
|
|
|
"dataSet\n",
|
|
|
|
"\n",
|
|
|
|
"OD = dataSet[\"OD\"]\n",
|
|
|
|
"\n",
|
|
|
|
"OD_np = OD.to_numpy()"
|
|
|
|
],
|
|
|
|
"metadata": {
|
2023-07-20 20:34:19 +02:00
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-27 17:16:08 +02:00
|
|
|
"end_time": "2023-07-27T08:59:16.033976200Z",
|
|
|
|
"start_time": "2023-07-27T08:59:09.275760300Z"
|
2023-07-20 20:34:19 +02:00
|
|
|
}
|
2023-07-20 10:19:32 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-27 17:16:08 +02:00
|
|
|
"execution_count": 4,
|
2023-07-20 10:19:32 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": "<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gxhFKCwoKCgoKCgoKCgoKDiIUYTCgoKCgoKCgoKCgoKCgxhFKCwoKCgoKCgoKCgoKDiIUYTCgoKCgoKCgoKCgoKCgxhFKCwoKCgoKCgoKCgoKDiIUYTCgoKCgoKCgoKCgoKCgxhFKCwoKCgoKCgoKCgoKDiIUYTCgoKCgoKCgoKCgoKCgxid+7sBBQUFBQUFBQUFBQV7DxdddBG9vb37uxkFTyB0TE9PT+/vRhQUFBQUFBQUFBQUFBTsHxRLYUFBQUFBQUFBQcFBgMsuu2yv1XXhhRfutboK9j+KpbCgoKCgoKCgoKDgIMD8+fPZW6z/zp0790o9BQcGiqWwoKCgoKCgoKCg4CDA4ODgrELh+Pg4o6OjAHR3d7Nw4cK5alrBfkaxFBYUFBQUFBQUFBQUAHDbbbfxN3/zN1x++eX87//9vzn//PP3d5MK5gBFKCwoKCgoKCgoKCgoyPCWt7yFT33qU/zrv/4rz3nOc/Z3cwr2MYpQWFBQUFBQUFBQUFCQYWRkhJNPPplXv/rVfOELX9jfzSnYxyiH1xcUPAY8+uijfOhDH+J5z3seRx11FEceeSTLli3jPe95D+Pj44+7/vHxcS6++GKWLVvGkUceyVFHHcXznvc8/v7v/55HH310L7xBQcHBgampKb71rW/xgQ98gN/6rd/i1FNPZd68eXR0dHDRRRftteeUNVtQ8Pjx4IMP8vnPf57/8l/+C7/0S79ET08PhxxyCE95ylM455xzuPTSS5mamnrcz9nXe/iTBQMDAxx11FF897vf3d9NKZgDFEthQcEeYtu2bbzkJS/h5ptvBuDQQw9l/vz5PPzwwwAsWrSIG264gUW
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"imageAnalyser.center = (960, 890)\n",
|
|
|
|
"imageAnalyser.span = (150, 200)\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[1], row=scanAxis[0])\n",
|
|
|
|
"plt.show()"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-27 17:16:08 +02:00
|
|
|
"end_time": "2023-07-26T14:14:53.382898300Z",
|
|
|
|
"start_time": "2023-07-26T14:14:47.878441800Z"
|
2023-07-20 10:19:32 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"source": [
|
|
|
|
"## Guess center\n",
|
|
|
|
"\n",
|
|
|
|
"ToDo: Crop from center guess"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-27 17:16:08 +02:00
|
|
|
"execution_count": 4,
|
2023-07-20 10:19:32 +02:00
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"# from opencv import moments\n",
|
2023-07-27 17:16:08 +02:00
|
|
|
"data = OD_np\n",
|
2023-07-20 10:19:32 +02:00
|
|
|
"\n",
|
2023-07-27 17:16:08 +02:00
|
|
|
"thresh = OD_\n",
|
2023-07-20 10:19:32 +02:00
|
|
|
"\n",
|
|
|
|
"# thresh = gaussian_filter(thresh, sigma=0.1)\n",
|
|
|
|
"# thresh = np.where(thresh<0.1,0,1)\n",
|
|
|
|
"\n",
|
2023-07-27 17:16:08 +02:00
|
|
|
"\n",
|
2023-07-20 10:19:32 +02:00
|
|
|
"#M = moments(thresh)"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-27 17:16:08 +02:00
|
|
|
"end_time": "2023-07-27T08:56:07.983013300Z",
|
|
|
|
"start_time": "2023-07-27T08:56:06.995037700Z"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 15,
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"thresh = calc_thresh(OD_np)\n",
|
|
|
|
"center = calc_cen_bulk(thresh)\n",
|
|
|
|
"\n",
|
|
|
|
"shape = np.shape(OD_np)\n",
|
|
|
|
"cropOD = np.zeros((shape[0], shape[1], 150, 150))\n",
|
|
|
|
"\n",
|
|
|
|
"for i in range(0,shape[0]):\n",
|
|
|
|
" for j in range(0, shape[1]):\n",
|
|
|
|
" cropOD[i,j] = OD_np[i,j, round(center[i,j,1]-75):round(center[i,j,1]+75), round(center[i,j,0]-75):round(center[i,j,0]+75)]\n",
|
|
|
|
"\n",
|
|
|
|
"thresh = calc_thresh(cropOD)\n",
|
|
|
|
"center = calc_cen_bulk(thresh)"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
|
|
|
"end_time": "2023-07-27T09:15:01.128146800Z",
|
|
|
|
"start_time": "2023-07-27T09:14:59.438557900Z"
|
2023-07-20 10:19:32 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-27 17:16:08 +02:00
|
|
|
"execution_count": 36,
|
2023-07-20 10:19:32 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
2023-07-27 17:16:08 +02:00
|
|
|
"145\n",
|
|
|
|
"145\n",
|
|
|
|
"\n",
|
|
|
|
"216\n",
|
|
|
|
"216\n",
|
|
|
|
"\n",
|
|
|
|
"170\n",
|
|
|
|
"170\n",
|
|
|
|
"\n",
|
|
|
|
"116\n",
|
|
|
|
"116\n",
|
2023-07-20 10:19:32 +02:00
|
|
|
"\n",
|
2023-07-27 17:16:08 +02:00
|
|
|
"124\n",
|
|
|
|
"124\n",
|
2023-07-20 10:19:32 +02:00
|
|
|
"\n",
|
2023-07-27 17:16:08 +02:00
|
|
|
"174\n",
|
|
|
|
"174\n",
|
|
|
|
"\n",
|
|
|
|
"148\n",
|
|
|
|
"150\n",
|
|
|
|
"\n",
|
|
|
|
"98\n",
|
|
|
|
"99\n",
|
|
|
|
"\n",
|
|
|
|
"127\n",
|
|
|
|
"131\n",
|
|
|
|
"\n"
|
2023-07-20 10:19:32 +02:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
2023-07-27 17:16:08 +02:00
|
|
|
"for i in range(0, shape[0]):\n",
|
|
|
|
" for j in range(0,shape[1]):\n",
|
|
|
|
" print(np.count_nonzero(thresh[i,j, 815:965, 885:1035]))\n",
|
|
|
|
" print(np.count_nonzero(thresh[i,j]))\n",
|
|
|
|
" print()"
|
2023-07-20 10:19:32 +02:00
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-27 17:16:08 +02:00
|
|
|
"end_time": "2023-07-26T14:39:38.163745700Z",
|
|
|
|
"start_time": "2023-07-26T14:39:38.083533200Z"
|
2023-07-20 10:19:32 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-27 17:16:08 +02:00
|
|
|
"execution_count": 16,
|
2023-07-20 10:19:32 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": "<Figure size 1200x800 with 9 Axes>",
|
2023-07-27 17:16:08 +02:00
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA9QAAAKPCAYAAACM6oIEAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0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AyTfi0LA+QElQR36C51kPOa5+19h7QXhGi8UTYQWcf+QtawFw6OBd0jjq8K1QNt7uskXXqkt0eoc/y7BEiUeGQVkFK/7rb1Eqe8oN+BKTqkfCNee5K6d7Ar1ejWNdx56cbYAJccHsFRJXkG+inMJrtygNB/wQeSNnDEd/orsmpNzo6G6DaKSzLvpJ3TuFndsaWhHrB1VXpHyv9uA50HnvLGetdtt7HPQTR701/QiT0PXUNJmqB7rI01mXE9/czSBd0FnmXe+2xsF25wZUjXXQ5l3SAkH4Sm7lGhfHGvoiNdTovJJH45x5+N8T8Q4G8FHecJv4OnwPM/HYr8irpGOdZgS/nANMjvyb87A6eX0SalQew8MHwsy9uJ9K3laemXeTEZUIDnuGdaY/Q/ioiRFguC9SNGykiNCJWuMt5L2qvAvVVpQMFcQzRPzaC0asnbMWpB9qZJgfY610er6SEFOcZsIIwEgOnz3Onec5/GOG6wllGrIWk88ELggioyHt9AeZ/+vdsekTs9WzHUB4vEhJYG9GxEbVnNseDdMPSf4xegF4ATXH3v3gDGU8ZxyHJkLVtyolEvlefHz7r0wHMvB5BQWpW4eaqndQwCUjH3RwOPpBfdAd3hum0BKXwi32humKzXXPngAY20T3mJkj5SUr5LH1vOHksI/kfoc/nnvsPZia3M43M1
|
2023-07-20 10:19:32 +02:00
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"fsize = (12,8)\n",
|
|
|
|
"\n",
|
|
|
|
"nr_plots = 3\n",
|
|
|
|
"\n",
|
2023-07-27 17:16:08 +02:00
|
|
|
"# %matplotlib notebook\n",
|
|
|
|
"# fig, ax = plt.subplots(nr_plots,nr_plots,figsize=fsize)\n",
|
|
|
|
"\n",
|
|
|
|
"# for i in range(0,nr_plots):\n",
|
|
|
|
"# for j in range(0,nr_plots):\n",
|
|
|
|
"# # ax[i][j].pcolormesh(blurred[i][j], cmap='jet', vmin=0, vmax=1.5, alpha=1)\n",
|
|
|
|
"# #ax[i][j].pcolormesh(thresh[i,j, 815:965, 885:1035], cmap='jet', vmin=0, vmax=1.5, alpha=1)\n",
|
|
|
|
"# ax[i][j].pcolormesh(thresh[i,j], cmap='jet', vmin=0, vmax=1.5, alpha=1)\n",
|
|
|
|
"# #ax[i][j].pcolormesh(cropOD[i][j], cmap='hot', vmin=0, vmax=1, alpha=1)\n",
|
|
|
|
"# ax[i][j].plot(center[i,j,0],center[i,j,1], marker='x', markersize=12)\n",
|
|
|
|
"# plt.show()\n",
|
|
|
|
"\n",
|
|
|
|
"# fig, ax = plt.subplots(nr_plots,nr_plots,figsize=fsize)\n",
|
|
|
|
"# for i in range(0,nr_plots):\n",
|
|
|
|
"# for j in range(0,nr_plots):\n",
|
|
|
|
"# ax[i][j].pcolormesh(blurred[i][j], cmap='jet', vmin=0, vmax=1.5, alpha=1)\n",
|
|
|
|
"# #ax[i][j].pcolormesh(thresh[i][j], cmap='jet', vmin=0, vmax=1.5, alpha=1)\n",
|
|
|
|
"# #ax[i][j].pcolormesh(cropOD[i][j], cmap='hot', vmin=0, vmax=1, alpha=1)\n",
|
|
|
|
"# ax[i][j].plot(center[i,j,0],center[i,j,1], marker='x', markersize=12)\n",
|
|
|
|
"# plt.show()\n",
|
|
|
|
"#\n",
|
2023-07-20 10:19:32 +02:00
|
|
|
"fig, ax = plt.subplots(nr_plots,nr_plots,figsize=fsize)\n",
|
|
|
|
"for i in range(0,nr_plots):\n",
|
|
|
|
" for j in range(0,nr_plots):\n",
|
|
|
|
" ax[i][j].pcolormesh(cropOD[i][j], cmap='jet', vmin=0, vmax=1.5)\n",
|
|
|
|
" #ax[i][j].plot(max[i,j,1],max[i,j,0], marker='x', markersize=12)\n",
|
|
|
|
" ax[i][j].plot(center[i,j,0],center[i,j,1], marker='x', color='g', markersize=12)\n",
|
|
|
|
"plt.show()"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-27 17:16:08 +02:00
|
|
|
"end_time": "2023-07-27T09:16:10.257586100Z",
|
|
|
|
"start_time": "2023-07-27T09:16:08.375571100Z"
|
2023-07-20 10:19:32 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"source": [
|
|
|
|
"## Guess width"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-27 17:16:08 +02:00
|
|
|
"execution_count": 17,
|
2023-07-20 10:19:32 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
2023-07-27 17:16:08 +02:00
|
|
|
"[[[ 7. 25.]\n",
|
2023-07-20 10:19:32 +02:00
|
|
|
" [ 8. 26.]\n",
|
|
|
|
" [ 8. 26.]]\n",
|
|
|
|
"\n",
|
|
|
|
" [[ 8. 20.]\n",
|
2023-07-27 17:16:08 +02:00
|
|
|
" [ 7. 21.]\n",
|
|
|
|
" [ 7. 28.]]\n",
|
|
|
|
"\n",
|
|
|
|
" [[10. 19.]\n",
|
2023-07-20 10:19:32 +02:00
|
|
|
" [ 9. 18.]\n",
|
2023-07-27 17:16:08 +02:00
|
|
|
" [ 9. 18.]]]\n"
|
2023-07-20 10:19:32 +02:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"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",
|
|
|
|
"BEC_width_guess = guess_BEC_width(thresh, center)\n",
|
|
|
|
"\n",
|
|
|
|
"print(BEC_width_guess)"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-27 17:16:08 +02:00
|
|
|
"end_time": "2023-07-27T09:16:12.879369800Z",
|
|
|
|
"start_time": "2023-07-27T09:16:12.803068500Z"
|
2023-07-20 10:19:32 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-20 20:34:19 +02:00
|
|
|
"execution_count": 10,
|
2023-07-20 10:19:32 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": "<Figure size 1200x800 with 9 Axes>",
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA9QAAAKTCAYAAAD4/kDkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAABiR0lEQVR4nO3db3CU9b3//9fStZuhZhcJAwayIdAQHYc0EY2lqfz72oxWnJIjdHBaKulRkzsM9c/v1HDnqGc6CeccSgZr/3CDyai0mNagw5nUmSoeQQ6VwmhgioMmRsiKCXGC7KKVlcDndwOzTcJusnvlyl7Xbp6Pmb2xf683m4vXXK+9rr3WY4wxAgAAAAAAKZni9AAAAAAAAGQiCjUAAAAAABZQqAEAAAAAsIBCDQAAAACABRRqAAAAAAAsoFADAAAAAGABhRoAAAAAA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+++qqmTZsWu31gYEBnzpyJXW9tbdWsWbOUl5dnx2IBwPXIRwBIjIwEkOm8qTy4rq5ObW1t6u3t1Z133qnc3Fy98cYbeuyxxzR//nytWLFC0pVPCQ8dOqRoNKqVK1cqGo1qypQpmjFjhvbs2TMh/xAAcBL5CACJkZEAspXHGGOcHmI0kUhEgUBAUr2kHKfHAZBxLkjarHA4nHWHAJKPAMYvOzOSfAQwfsnlo+1n+QYAAAAAYDKgUAMAAAAAYAGFGgAAAAAACyjUAAAAAABYQKEGAAAAAMACCjUAAAAAABZQqAEAAAAAsIBCDQAAAACABRRqAAAAAAAsoFADAAAAAGABhRoAAAAAAAso1AAAAAA
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"# %matplotlib notebook\n",
|
|
|
|
"fig, ax = plt.subplots(nr_plots,nr_plots,figsize=fsize)\n",
|
|
|
|
"\n",
|
|
|
|
"for i in range(0,nr_plots):\n",
|
|
|
|
" for j in range(0,nr_plots):\n",
|
|
|
|
" # ax[i][j].pcolormesh(blurred[i][j], cmap='jet', vmin=0, vmax=1.5, alpha=1)\n",
|
|
|
|
" ax[i][j].pcolormesh(thresh[i][j], cmap='jet', vmin=0, vmax=1.5, alpha=1)\n",
|
|
|
|
" #ax[i][j].pcolormesh(cropOD[i][j], cmap='hot', vmin=0, vmax=1, alpha=1)\n",
|
|
|
|
" ax[i][j].plot(center[i,j,0],center[i,j,1], marker='x', markersize=12)\n",
|
|
|
|
"plt.show()\n"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-26 09:41:51 +02:00
|
|
|
"end_time": "2023-07-25T10:28:56.450487400Z",
|
|
|
|
"start_time": "2023-07-25T10:28:55.296612200Z"
|
2023-07-20 10:19:32 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"source": [
|
|
|
|
"## Mask array"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-20 20:34:19 +02:00
|
|
|
"execution_count": 11,
|
2023-07-20 10:19:32 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": "(3, 3, 200, 150)"
|
|
|
|
},
|
2023-07-20 20:34:19 +02:00
|
|
|
"execution_count": 11,
|
2023-07-20 10:19:32 +02:00
|
|
|
"metadata": {},
|
|
|
|
"output_type": "execute_result"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"masked = np.where(thresh==0, cropOD, np.nan)\n",
|
|
|
|
"np.shape(masked)"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-26 09:41:51 +02:00
|
|
|
"end_time": "2023-07-25T10:28:56.553864600Z",
|
|
|
|
"start_time": "2023-07-25T10:28:56.442739600Z"
|
2023-07-20 10:19:32 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-26 09:41:51 +02:00
|
|
|
"execution_count": 12,
|
2023-07-20 10:19:32 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": "<Figure size 1100x1100 with 9 Axes>",
|
2023-07-20 20:34:19 +02:00
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA4cAAAN2CAYAAABKI/wqAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOxdebyV0/r/7nP2mU+TElE5UeiSW2QIUW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J5hh92RVK4Tu2XIxLdmz6rk365y2YR9DpXU9001zV3vS9cdY5IXzfZRzk1C6I+rmi3K8LI7TSSWmSror1MGaO6QCuA7d50mIjSVY3eXgF1iRxyNKTQFC0ochgwh9hO6FyDo8QyPvsR1XiSY5wMkns9jmxWK7EnK1LZCR3v/6E6Hcj0nu0grKdF/OxPl5KjRHr8Y6lOxxZHsZLBFU1yRQ45tCkRyHZk9JdqlMtel2j6pTg/8RgQr8ZjOBcxZMCyo1zHwOfmePa6mP1FE1U4/8v+AIDHsA/ZOI1GEstikES5xvG9UbvEtkP3zWNirONYXWv1ZNsoXY+Y3mO+D3oNKeIanLprfswMsmTRThdc7QptVRt5RpbfTe14fwrXc6Z9u54pV50Dw+haDR2GDWE7/OHXHHpsWchEDKPEaI/FkCSTqg3pzxifsfE7zY9DDw8Pj02ITFRhFG4B0FB2rAqjRChiLB40Pw49PDw8UiATlRgVN4I8Y/FX+XHYAP0mKjEKr0u/Xett4zwaF/wbyGOzohppeA7d5HP9F/Kb/oxiVXXEGy8PD49Nj2qk4zmJQjSMHUv
|
2023-07-20 10:19:32 +02:00
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"fig, ax = plt.subplots(nr_plots,nr_plots,figsize=(11,11))\n",
|
|
|
|
"\n",
|
|
|
|
"cut_factor = 1\n",
|
|
|
|
"\n",
|
|
|
|
"for i in range(0,nr_plots):\n",
|
|
|
|
" for j in range(0,nr_plots):\n",
|
|
|
|
" #print(np.nanmax(masked[i,j]))\n",
|
|
|
|
" # ax[i][j].pcolormesh(blurred[i][j], cmap='jet', vmin=0, vmax=1.5, alpha=1)\n",
|
|
|
|
" #ax[i][j].pcolormesh(masked[i][j], cmap='jet', vmin=0, vmax=0.5, alpha=1)\n",
|
2023-07-20 20:34:19 +02:00
|
|
|
" ax[i][j].pcolormesh(cropOD[i][j], cmap='jet', vmin=0, vmax=0.7, alpha=1)\n",
|
2023-07-20 10:19:32 +02:00
|
|
|
" #ax[i][j].pcolormesh(thresh[i][j], cmap='jet', vmin=0, vmax=1.5, alpha=1)\n",
|
|
|
|
" #ax[i][j].pcolormesh(cropOD[i][j], cmap='hot', vmin=0, vmax=1, alpha=1)\n",
|
|
|
|
" ax[i][j].plot(center[i,j,0],center[i,j,1], marker='x', markersize=12)\n",
|
|
|
|
" alpha=1\n",
|
|
|
|
" ax[i][j].hlines(center[i,j,1] - cut_factor * BEC_width_guess[i,j,1]/2, 0, 150, color='r',alpha=alpha,linestyles='dotted')\n",
|
|
|
|
" ax[i][j].hlines(center[i,j,1] + cut_factor * BEC_width_guess[i,j,1]/2, 0, 150, color='r',alpha=alpha,linestyles='dotted')\n",
|
|
|
|
"\n",
|
|
|
|
" ax[i][j].vlines(center[i,j,0] - cut_factor * BEC_width_guess[i,j,0]/2, 0, 200, color='r',alpha=alpha,linestyles='dotted')\n",
|
|
|
|
" ax[i][j].vlines(center[i,j,0] + cut_factor * BEC_width_guess[i,j,0]/2, 0, 200, color='r',alpha=alpha,linestyles='dotted')\n",
|
|
|
|
"\n",
|
|
|
|
" ax[i][j].set_xlim(25,125)\n",
|
|
|
|
" ax[i][j].set_ylim(45,145)\n",
|
|
|
|
"plt.show()"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-26 09:41:51 +02:00
|
|
|
"end_time": "2023-07-25T10:28:57.597197600Z",
|
|
|
|
"start_time": "2023-07-25T10:28:56.497285Z"
|
2023-07-20 10:19:32 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"source": [
|
|
|
|
"## Cut out region of interest for thermal fitting guess"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-20 20:34:19 +02:00
|
|
|
"execution_count": 13,
|
2023-07-20 10:19:32 +02:00
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"shape = np.shape(masked)\n",
|
|
|
|
"\n",
|
|
|
|
"X_guess = np.zeros((shape[0], shape[1], shape[3]))\n",
|
|
|
|
"Y_guess = np.zeros((shape[0], shape[1], shape[2]))\n",
|
|
|
|
"for i in range(0, shape[0]):\n",
|
|
|
|
" for j in range(0, shape[1]):\n",
|
|
|
|
" X_guess[i,j] = np.sum(masked[i,j,round(center[i,j,1] - cut_factor * BEC_width_guess[i,j,1]/2) : round(center[i,j,1] + cut_factor * BEC_width_guess[i,j,1]/2) , :], 0) / len(masked[i,j,round(center[i,j,1] - cut_factor * BEC_width_guess[i,j,1]/2) : round(center[i,j,1] + cut_factor * BEC_width_guess[i,j,1]/2),0])\n",
|
|
|
|
"\n",
|
|
|
|
" Y_guess[i,j] = np.sum(masked[i,j, :, round(center[i,j,0] - cut_factor * BEC_width_guess[i,j,0]/2) : round(center[i,j,0] + cut_factor * BEC_width_guess[i,j,0]/2)], 1) / len(masked[i,j,0,round(center[i,j,0] - cut_factor * BEC_width_guess[i,j,0]/2) : round(center[i,j,0] + cut_factor * BEC_width_guess[i,j,0]/2)])\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"#print(X_guess)"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-26 09:41:51 +02:00
|
|
|
"end_time": "2023-07-25T10:28:57.612204400Z",
|
|
|
|
"start_time": "2023-07-25T10:28:57.602187Z"
|
2023-07-20 10:19:32 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-20 20:34:19 +02:00
|
|
|
"execution_count": 14,
|
2023-07-20 10:19:32 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": "<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AOvvPIKffv2JTg4mGuuuYbq6mq3/bZs2UJZWRlGo5Hs7GwSExMbPJ7JZOKHH37g559/5vvvv+f111/niSee4JdffqFXr14eOU9BENoHYh8VYh+Fzogjot2eHG09ot0BcrQ7kn2Ermsj25FeQ+jIVDQkHT+4TD0mDPOvkw0QHA3YV7jK8/06lI5IdXU106ZN4/rrr+fZZ59lxowZ5ObmnvJzq1atYvr06Vx11VUMHTqUhIQEDh8+7LZPfn4+06dP54knnmD69OncdNNNVFRUNHpMg8HAmWeeyTPPPMOmTZsIDAzkiy++aOspCoIgtAqxj4LQchzF0NqVdNxeDE2k4x6lK9vIdnR1Cx2Z8oaKoR1Yqh77nOuHEdXBaLI720D5Sf+OpQPyxBNPUFRUxN///nceffRR0tPTuf3220/5uX79+jF//nw2b97Mli1buPHGG7HZbG773H333aSkpPDkk0/y6quvUltby8MPP9zg8X755RdmzZrF+vXrycjIYP78+eTl5TFw4ECPnKcgeITZ58A/ToMT+/w9EsEHiH0UhJZTaW2HEe0OJB3vSHRlGymOtuARKuu297LZnBHt3u3A0QYIjVWP5Sf8O44OxrJly/jb3/7G+++/T0REBEajkffff5+VK1fy73//u8nPvvrqq0RHRzN+/Hguv/xyJk+ezKhRoxzvz507l0WLFvH+++9jNpsJDQ1l3rx5vPXWW3zzzTf1jhcREcGKFSu45JJLSE9P58knn+Qvf/kLF198scfPWxBazcn9cGKPWuATOjViHwWhdTirjrcjV6QDtffqKHR1G2nQOmj
|
2023-07-20 10:19:32 +02:00
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"fig, ax = plt.subplots(nr_plots,nr_plots,figsize=fsize)\n",
|
|
|
|
"\n",
|
|
|
|
"for i in range(0, shape[0]):\n",
|
|
|
|
" for j in range(0, shape[1]):\n",
|
|
|
|
" ax[i,j].plot(X_guess[i,j], label = 'x_axis')\n",
|
|
|
|
" ax[i,j].plot(Y_guess[i,j], label = 'y_axis')\n",
|
|
|
|
" ax[i,j].legend(fontsize=10)\n",
|
|
|
|
"plt.show()\n"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-26 09:41:51 +02:00
|
|
|
"end_time": "2023-07-25T10:28:58.656642600Z",
|
|
|
|
"start_time": "2023-07-25T10:28:57.615406200Z"
|
2023-07-20 10:19:32 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"source": [
|
|
|
|
"## Fitting 1D gaussian"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-20 20:34:19 +02:00
|
|
|
"execution_count": 15,
|
2023-07-20 10:19:32 +02:00
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"#[nr images x, nr images y, X / Y, center / sigma]\n",
|
|
|
|
"x = np.linspace(0,149,150)\n",
|
|
|
|
"y = np.linspace(0,199, 200)\n",
|
|
|
|
"\n",
|
|
|
|
"popt = np.zeros((shape[0], shape[1], 2, 3))\n",
|
|
|
|
"\n",
|
|
|
|
"p0 = np.ones((shape[0], shape[1], 2, 3))\n",
|
|
|
|
"\n",
|
|
|
|
"p0[:, :, :, 0] = center\n",
|
|
|
|
"p0[:, :, :, 1] = BEC_width_guess / 2.355\n",
|
|
|
|
"p0[:, :, :, 2] = 0.1\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"for i in range(0, shape[0]):\n",
|
|
|
|
" for j in range(0, shape[1]):\n",
|
|
|
|
" popt[i,j, 0], pcov = curve_fit(gaussian, x, X_guess[i,j] , p0[i, j, 0], nan_policy='omit')\n",
|
|
|
|
" popt[i,j, 1], pcov = curve_fit(gaussian, y, Y_guess[i,j] , p0[i, j, 1], nan_policy='omit')"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-26 09:41:51 +02:00
|
|
|
"end_time": "2023-07-25T10:28:58.831141900Z",
|
|
|
|
"start_time": "2023-07-25T10:28:58.664738400Z"
|
2023-07-20 10:19:32 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-20 20:34:19 +02:00
|
|
|
"execution_count": 16,
|
2023-07-20 10:19:32 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": "<Figure size 1200x800 with 9 Axes>",
|
2023-07-20 20:34:19 +02:00
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA9EAAAKPCAYAAABqw0lAAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdd3hUxdfA8e/d3eymF0IS0kMInVClV0UBkapgL6goiIj1p6+9iwWxKyh2REUQRYrSpSO9twRCeu91233/WAgioQR2synn8zx5JLt3Z85GmOy5M3NGUVVVRQghhBBCCCGEEBekcXYAQgghhBBCCCFEXSFJtBBCCCGEEEIIcZEkiRZCCCGEEEIIIS6SJNFCCCGEEEIIIcRFkiRaCCGEEEIIIYS4SJJECyGEEEIIIYQQF0mSaCGEEEIIIYQQ4iLpnB3Af1mtVlJTU/Hy8kJRFGeHI4Sog1RVpaioiJCQEDSa+nWvUMZIIcTlkPFRCCGqVp3xsdYl0ampqYSHhzs7DCFEPZCUlERYWJizw7ArGSOFEPYg46MQQlTtYsbHWpdEe3l5Abbgvb29nRyNEKIuKiwsJDw8vHI8qU9kjBRCXA4ZH4UQomrVGR9rXRJ9avmNt7e3DIBCiMtSH5fzyRgphLAHGR+FEKJqFzM+1q/NMEIIIYQQQgghhANJEi2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WLVu20LRpU7u8TyGcRdFoCH3n7YvepmJKSaFk/XoUg6FeJtF1aYyU8VEIx9M3jca1TZuLusnoOaA/WMx49utbA5HVPBkfbWr7+Fg3/g+JOqt0yxby5syhdOtWvK6++qJeYy0rI/+
|
2023-07-20 10:19:32 +02:00
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"fig, ax = plt.subplots(nr_plots,nr_plots,figsize=fsize)\n",
|
|
|
|
"for i in range(0, shape[0]):\n",
|
|
|
|
" for j in range(0, shape[1]):\n",
|
|
|
|
" ax[i,j].plot(x, X_guess[i,j], label = 'x_axis')\n",
|
|
|
|
" ax[i,j].plot(x, gaussian(x, *popt[i,j,0]), linestyle='dotted')\n",
|
|
|
|
"\n",
|
|
|
|
" ax[i,j].plot(y, Y_guess[i,j], label = 'y_axis')\n",
|
|
|
|
" ax[i,j].plot(y, gaussian(y, *popt[i,j,1]), linestyle='dotted')\n",
|
|
|
|
" ax[i,j].legend(fontsize=10)\n",
|
|
|
|
" ax[i,j].set_facecolor('#FFFFFF')\n",
|
|
|
|
"plt.show()"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-26 09:41:51 +02:00
|
|
|
"end_time": "2023-07-25T10:28:59.763890800Z",
|
|
|
|
"start_time": "2023-07-25T10:28:58.705502800Z"
|
2023-07-20 10:19:32 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"source": [
|
|
|
|
"## Try with not masked array\n"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-20 20:34:19 +02:00
|
|
|
"execution_count": 17,
|
2023-07-20 10:19:32 +02:00
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"shape = np.shape(masked)\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(masked[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(masked[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)])"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-26 09:41:51 +02:00
|
|
|
"end_time": "2023-07-25T10:28:59.792176200Z",
|
|
|
|
"start_time": "2023-07-25T10:28:59.769873600Z"
|
2023-07-20 10:19:32 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-20 20:34:19 +02:00
|
|
|
"execution_count": 18,
|
2023-07-20 10:19:32 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": "<Figure size 1200x800 with 9 Axes>",
|
2023-07-20 20:34:19 +02:00
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA9EAAAKPCAYAAABqw0lAAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGli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AND4+KFYrtuyWG6WR+CjxUQivO3UqN7jXRCuKQtHixfj26EHAsGGt0LEzkxgpMbI2Mp1btApbdjacMgXF6eU10W2F3W5n9+7dhIeHc/z48XqPtVqtXHvttcyYMYPdu3ezZs0aACwWi/uYHTt2EBUVVefWcCNHjiQ1NZXhw4ezZMkShg4disNR+96Mfn5+7q91Op37e41Gg0ajwW63s27dOt58802+//57du/ezcyZMzGbzWe8Vnx8PDExMfzyyy/uayiKwq233kpqaqr7Izs7G6PRWKNvslejaI8UUzmWMvXGKyC8BDQasNtxFBZiPXwYUCtyOysrKV+p/tsIGDMGOPumc4PER4mPokMrdv07DIpTP5epMc6ybx85/36erMefaKWOtR8SI9tWjJQkWrSK0yvPOsrOjiT6iSeeICUlhbVr1/LYY49x6NChOo81m81YrVY6deoEwKxZs6q9P3v2bIqKiti5cydz587lt99+q9FGWloagYGBTJ48mVmzZnHgwAHKy8ub3P+ioiKCgoKIiIjAarUyd+7cBl0rLCyMFStW8PXXX7uLEF555ZUsWrSIY8fUAnNOp5OtW7cCcNFFF7Fo0SJsNhtWq5UFCxY0uc9CtBbrvlRwatDonRgCHegiwgGw5+a6a0LYTmRTvOQrHMXFGJKSCLtBfZpvzzr71gtKfJT4KDowc4n6OaaP+rk0CxQF61H
|
2023-07-20 10:19:32 +02:00
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"fig, ax = plt.subplots(nr_plots,nr_plots,figsize=fsize)\n",
|
|
|
|
"\n",
|
|
|
|
"for i in range(0, shape[0]):\n",
|
|
|
|
" for j in range(0, shape[1]):\n",
|
|
|
|
" ax[i,j].plot(x, X_guess[i,j], label = 'x_axis masked',zorder=5)\n",
|
|
|
|
" ax[i,j].plot(x, X_guess_og[i,j], label = 'x_axis original')\n",
|
|
|
|
"# ax[i,j].legend(fontsize=10)\n",
|
|
|
|
"# plt.show()\n",
|
|
|
|
"#\n",
|
|
|
|
"# fig, ax = plt.subplots(nr_plots,nr_plots,figsize=fsize)\n",
|
|
|
|
"#\n",
|
|
|
|
"# for i in range(0, shape[0]):\n",
|
|
|
|
"# for j in range(0, shape[1]):\n",
|
|
|
|
" ax[i,j].plot(y, Y_guess[i,j], label = 'y_axis masked',zorder=5)\n",
|
|
|
|
" ax[i,j].plot(y, Y_guess_og[i,j], label = 'y_axis original')\n",
|
|
|
|
" ax[i,j].legend(fontsize=8)\n",
|
|
|
|
"plt.show()"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-26 09:41:51 +02:00
|
|
|
"end_time": "2023-07-25T10:29:00.992680400Z",
|
|
|
|
"start_time": "2023-07-25T10:28:59.782041400Z"
|
2023-07-20 10:19:32 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"source": [
|
|
|
|
"## Bimodal 1d Fit"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-26 09:41:51 +02:00
|
|
|
"execution_count": 19,
|
2023-07-20 10:19:32 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
2023-07-26 09:41:51 +02:00
|
|
|
"fitting time: 106.31179809570312 ms\n"
|
2023-07-20 10:19:32 +02:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"#[nr images x, nr images y, X / Y, center / sigma]\n",
|
|
|
|
"x = np.linspace(0,149,150)\n",
|
|
|
|
"y = np.linspace(0,199, 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",
|
2023-07-20 20:34:19 +02:00
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
2023-07-20 10:19:32 +02:00
|
|
|
"print(f'fitting time: {(stop-start)*1e3} ms')\n",
|
|
|
|
" #popt[i,j, 1], pcov = curve_fit(density_1d, y, Y_guess_og[i,j] , p0[i, j, 1], nan_policy='omit')"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-26 09:41:51 +02:00
|
|
|
"end_time": "2023-07-25T10:29:01.123984600Z",
|
|
|
|
"start_time": "2023-07-25T10:29:00.997834600Z"
|
2023-07-20 10:19:32 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-26 09:41:51 +02:00
|
|
|
"execution_count": 20,
|
2023-07-20 20:34:19 +02:00
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"# Fitting x without math constr\n",
|
|
|
|
"fitmodel = lmfit.Model(density_1d,independent_vars=['x'])\n",
|
|
|
|
"\n",
|
|
|
|
"result_x = []\n",
|
|
|
|
"start = time.time()\n",
|
|
|
|
"for i in range(0, shape[0]):\n",
|
|
|
|
" temp_res = []\n",
|
|
|
|
" for j in range(0, shape[1]):\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",
|
|
|
|
" ('sigma_bec',BEC_width_guess[i,j,0], True, 0, 50),\n",
|
|
|
|
" ('sigma_th', 3*BEC_width_guess[i,j,0], True, 0, 50)\n",
|
|
|
|
" )\n",
|
|
|
|
" res = fitmodel.fit(X_guess_og[i,j], x=x, params=params)\n",
|
|
|
|
" temp_res.append(res)\n",
|
|
|
|
" result_x.append(temp_res)\n",
|
|
|
|
"stop = time.time()"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-26 09:41:51 +02:00
|
|
|
"end_time": "2023-07-25T10:29:04.899029200Z",
|
|
|
|
"start_time": "2023-07-25T10:29:04.583135300Z"
|
2023-07-20 20:34:19 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-26 09:41:51 +02:00
|
|
|
"execution_count": 21,
|
2023-07-20 20:34:19 +02:00
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"# Fitting x with math constraint on width\n",
|
|
|
|
"fitmodel = lmfit.Model(density_1d,independent_vars=['x'])\n",
|
|
|
|
"\n",
|
|
|
|
"result_x = []\n",
|
|
|
|
"start = time.time()\n",
|
|
|
|
"for i in range(0, shape[0]):\n",
|
|
|
|
" temp_res = []\n",
|
|
|
|
" for j in range(0, shape[1]):\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(Y_guess_og[i,j])),\n",
|
|
|
|
" ('amp_th', 0.3 * max[i,j], True, 0, 1.3*np.max(Y_guess_og[i,j])),\n",
|
|
|
|
" ('deltax', 2* BEC_width_guess[i,j,0], True,0,50),\n",
|
|
|
|
" ('sigma_bec',BEC_width_guess[i,j,0], True, 0, 50)\n",
|
|
|
|
" )\n",
|
|
|
|
" params.add('sigma_th', min=0, expr=f'sigma_bec+deltax'\n",
|
|
|
|
" )\n",
|
|
|
|
" res = fitmodel.fit(X_guess_og[i,j], x=x, params=params)\n",
|
|
|
|
" temp_res.append(res)\n",
|
|
|
|
" result_x.append(temp_res)\n",
|
|
|
|
"stop = time.time()"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-26 09:41:51 +02:00
|
|
|
"end_time": "2023-07-25T10:29:20.291311900Z",
|
|
|
|
"start_time": "2023-07-25T10:29:19.914352200Z"
|
2023-07-20 20:34:19 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 142,
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
|
|
|
"[[0.69218233 0.66625539 0.61833837]\n",
|
|
|
|
" [0.58760028 0.5772473 0.61120507]\n",
|
|
|
|
" [0.69197339 0.7760333 0.6094938 ]]\n"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"S = np.zeros((shape[0], shape[1]))\n",
|
|
|
|
"for i in range(0, shape[0]):\n",
|
|
|
|
" for j in range(0, shape[1]):\n",
|
|
|
|
" S[i,j] = np.max(Y_guess_og[i,j])/(popt[i,j,2] + popt[i,j,3])\n",
|
|
|
|
"print(S)\n"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
|
|
|
"end_time": "2023-07-20T12:19:14.076672600Z",
|
|
|
|
"start_time": "2023-07-20T12:19:14.026039900Z"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 202,
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"#fitting Y on popt\n",
|
|
|
|
"# math constr\n",
|
|
|
|
"\n",
|
|
|
|
"fitmodel = lmfit.Model(density_1d,independent_vars=['x'])\n",
|
|
|
|
"\n",
|
|
|
|
"p0_y = np.ones((shape[0], shape[1], 6))\n",
|
|
|
|
"popt_y = np.zeros((shape[0], shape[1], 6))\n",
|
|
|
|
"\n",
|
|
|
|
"result_y = []\n",
|
|
|
|
"start = time.time()\n",
|
|
|
|
"for i in range(0, shape[0]):\n",
|
|
|
|
" temp_res = []\n",
|
|
|
|
" for j in range(0, shape[1]):\n",
|
|
|
|
" params = lmfit.Parameters()\n",
|
|
|
|
" params.add_many(\n",
|
|
|
|
" ('x0_bec', center[i,j,1], True,0, 200),\n",
|
|
|
|
" ('x0_th',center[i,j,1], True,0, 200),\n",
|
|
|
|
" ('amp_bec', S[i,j]* popt[i,j,2], True, 0, 1.3 * np.max(Y_guess_og[i,j])),\n",
|
|
|
|
" ('amp_th', S[i,j]* popt[i,j,3], True, 0, 1.3*np.max(Y_guess_og[i,j])),\n",
|
|
|
|
" ('deltax', 0, True, 0,50),\n",
|
|
|
|
" ('sigma_bec',BEC_width_guess[i,j,0], True, 0, 15)\n",
|
|
|
|
" )\n",
|
|
|
|
" params.add('sigma_th',popt[i,j,5], min=0, expr=f'sigma_bec + deltax'\n",
|
|
|
|
" )\n",
|
|
|
|
" res = fitmodel.fit(Y_guess_og[i,j], x=y, params=params)\n",
|
|
|
|
" temp_res.append(res)\n",
|
|
|
|
" result_y.append(temp_res)\n",
|
|
|
|
"stop = time.time()"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
|
|
|
"end_time": "2023-07-20T13:19:22.545609300Z",
|
|
|
|
"start_time": "2023-07-20T13:19:22.258075800Z"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 227,
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"ename": "type",
|
|
|
|
"evalue": "list indices must be integers or slices, not tuple",
|
|
|
|
"output_type": "error",
|
|
|
|
"traceback": [
|
|
|
|
"\u001B[1;31m---------------------------------------------------------------------------\u001B[0m",
|
|
|
|
"\u001B[1;31mTypeError\u001B[0m Traceback (most recent call last)",
|
|
|
|
"Cell \u001B[1;32mIn[227], line 12\u001B[0m\n\u001B[0;32m 10\u001B[0m \u001B[38;5;28;01mfor\u001B[39;00m i \u001B[38;5;129;01min\u001B[39;00m \u001B[38;5;28mrange\u001B[39m(\u001B[38;5;241m0\u001B[39m, shape[\u001B[38;5;241m0\u001B[39m]):\n\u001B[0;32m 11\u001B[0m \u001B[38;5;28;01mfor\u001B[39;00m j \u001B[38;5;129;01min\u001B[39;00m \u001B[38;5;28mrange\u001B[39m(\u001B[38;5;241m0\u001B[39m, shape[\u001B[38;5;241m1\u001B[39m]):\n\u001B[1;32m---> 12\u001B[0m S[i,j] \u001B[38;5;241m=\u001B[39m np\u001B[38;5;241m.\u001B[39mmax(Y_guess_og[i,j])\u001B[38;5;241m/\u001B[39m(\u001B[43mresult_x\u001B[49m\u001B[43m[\u001B[49m\u001B[43mi\u001B[49m\u001B[43m,\u001B[49m\u001B[43mj\u001B[49m\u001B[43m]\u001B[49m\u001B[38;5;241m.\u001B[39mbest_values[\u001B[38;5;124m'\u001B[39m\u001B[38;5;124mamp_bec\u001B[39m\u001B[38;5;124m'\u001B[39m] \u001B[38;5;241m+\u001B[39m result_x[i,j]\u001B[38;5;241m.\u001B[39mbest_values[\u001B[38;5;124m'\u001B[39m\u001B[38;5;124mamp_th\u001B[39m\u001B[38;5;124m'\u001B[39m])\n\u001B[0;32m 13\u001B[0m \u001B[38;5;28mprint\u001B[39m(S[\u001B[38;5;241m0\u001B[39m,\u001B[38;5;241m0\u001B[39m]\u001B[38;5;241m*\u001B[39m popt[\u001B[38;5;241m0\u001B[39m,\u001B[38;5;241m0\u001B[39m,\u001B[38;5;241m3\u001B[39m]\u001B[38;5;241m+\u001B[39mS[\u001B[38;5;241m0\u001B[39m,\u001B[38;5;241m0\u001B[39m]\u001B[38;5;241m*\u001B[39m popt[\u001B[38;5;241m0\u001B[39m,\u001B[38;5;241m0\u001B[39m,\u001B[38;5;241m2\u001B[39m])\n\u001B[0;32m 15\u001B[0m result_y \u001B[38;5;241m=\u001B[39m []\n",
|
|
|
|
"\u001B[1;31mTypeError\u001B[0m: list indices must be integers or slices, not tuple"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"# Fitting Y\n",
|
|
|
|
"# without mathematical constraint\n",
|
|
|
|
"# Fix most\n",
|
|
|
|
"fitmodel = lmfit.Model(density_1d,independent_vars=['x'])\n",
|
|
|
|
"\n",
|
|
|
|
"p0_y = np.ones((shape[0], shape[1], 6))\n",
|
|
|
|
"popt_y = np.zeros((shape[0], shape[1], 6))\n",
|
|
|
|
"\n",
|
|
|
|
"S = np.zeros((shape[0], shape[1]))\n",
|
|
|
|
"for i in range(0, shape[0]):\n",
|
|
|
|
" for j in range(0, shape[1]):\n",
|
|
|
|
" S[i,j] = np.max(Y_guess_og[i,j])/(result_x[i,j].best_values['amp_bec'] + result_x[i,j].best_values['amp_th'])\n",
|
|
|
|
"print(S[0,0]* popt[0,0,3]+S[0,0]* popt[0,0,2])\n",
|
|
|
|
"\n",
|
|
|
|
"result_y = []\n",
|
|
|
|
"start = time.time()\n",
|
|
|
|
"for i in range(0, shape[0]):\n",
|
|
|
|
" temp_res = []\n",
|
|
|
|
" for j in range(0, shape[1]):\n",
|
|
|
|
" params = lmfit.Parameters()\n",
|
|
|
|
"\n",
|
|
|
|
" bval = result_x[i][j].best_values\n",
|
|
|
|
" params.add_many(\n",
|
|
|
|
" ('x0_bec', center[i,j,1], False,0, 200),\n",
|
|
|
|
" ('x0_th',center[i,j,1], False,0, 200),\n",
|
|
|
|
" ('amp_bec', S[i,j]* bval['amp_bec'], True, 0, 1.3 * np.max(Y_guess_og[i,j])),\n",
|
|
|
|
" ('amp_th', S[i,j]* bval['amp_th'], False),\n",
|
|
|
|
" ('sigma_bec',BEC_width_guess[i,j,1], True, 0, 50),\n",
|
|
|
|
" ('sigma_th',bval['sigma_th'], False)\n",
|
|
|
|
" )\n",
|
|
|
|
" res = fitmodel.fit(Y_guess_og[i,j], x=y, params=params)\n",
|
|
|
|
" temp_res.append(res)\n",
|
|
|
|
" result_y.append(temp_res)\n",
|
|
|
|
"stop = time.time()"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
|
|
|
"end_time": "2023-07-20T13:57:46.171454600Z",
|
|
|
|
"start_time": "2023-07-20T13:57:46.075934300Z"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-26 09:41:51 +02:00
|
|
|
"execution_count": 24,
|
2023-07-20 20:34:19 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
|
|
|
"[75.41570333 77.33388115 2.56706786 0.32435386 9.02534473 21.78913789]\n",
|
|
|
|
"{'x0_bec': 75.41570631345125, 'x0_th': 77.33387669882647, 'amp_bec': 2.5670677717602537, 'amp_th': 0.32435362458962513, 'sigma_bec': 9.025351656015761, 'sigma_th': 21.789148834558127}\n",
|
|
|
|
"25.0\n",
|
|
|
|
"\n",
|
|
|
|
"[77.87651631 81.11230043 2.46976259 0.33019881 9.77967464 21.30093181]\n",
|
|
|
|
"{'x0_bec': 77.87414667926795, 'x0_th': 81.00942140743041, 'amp_bec': 2.4251361988169013, 'amp_th': 0.336733100911304, 'sigma_bec': 9.771032230037038, 'sigma_th': 21.0114608336347}\n",
|
|
|
|
"26.0\n",
|
|
|
|
"\n",
|
|
|
|
"[73.89357632 76.27664646 2.4312179 0.27440553 9.98643754 20.45775545]\n",
|
|
|
|
"{'x0_bec': 73.87690614810727, 'x0_th': 75.75396443024098, 'amp_bec': 2.1748880271879374, 'amp_th': 0.32117568442009115, 'sigma_bec': 9.814809230807409, 'sigma_th': 18.256517221101156}\n",
|
|
|
|
"26.0\n",
|
|
|
|
"\n",
|
|
|
|
"[77.11393592 81.40236184 2.88921236 0.26104054 8.62447632 18.73504104]\n",
|
|
|
|
"{'x0_bec': 77.08861286232403, 'x0_th': 79.69001135621787, 'amp_bec': 2.4064163373141456, 'amp_th': 0.34799624740698715, 'sigma_bec': 8.351489369586584, 'sigma_th': 15.16726157787356}\n",
|
|
|
|
"19.0\n",
|
|
|
|
"\n",
|
|
|
|
"[74.59729659 78.58410424 2.78343705 0.22861603 9.03257479 18.55393163]\n",
|
|
|
|
"{'x0_bec': 74.56347324160527, 'x0_th': 76.67698294957175, 'amp_bec': 2.2603093432491317, 'amp_th': 0.338441239554665, 'sigma_bec': 8.542756926651688, 'sigma_th': 13.927244795040806}\n",
|
|
|
|
"21.0\n",
|
|
|
|
"\n",
|
|
|
|
"[78.50292483 82.40258606 2.35517079 0.20782915 9.17053985 15.99073945]\n",
|
|
|
|
"{'x0_bec': 78.4482746738924, 'x0_th': 81.06222964804594, 'amp_bec': 2.0364741307301464, 'amp_th': 0.27923725023708695, 'sigma_bec': 8.802233429669542, 'sigma_th': 13.147732761193325}\n",
|
|
|
|
"26.0\n",
|
|
|
|
"\n",
|
|
|
|
"[75.51767384 76.75506578 0.87440112 0.14660177 8.96571527 5.96931421]\n",
|
|
|
|
"{'x0_bec': 75.74475709382901, 'x0_th': 76.32144038563793, 'amp_bec': 0.9184588823685144, 'amp_th': 0.12427203265282463, 'sigma_bec': 8.275865193835182, 'sigma_th': 8.275865193840495}\n",
|
|
|
|
"20.0\n",
|
|
|
|
"\n",
|
|
|
|
"[76.17323785 76.98707429 0.61643944 0.23667638 9.4043337 5.34970959]\n",
|
|
|
|
"{'x0_bec': 76.46913757414158, 'x0_th': 76.83078679310978, 'amp_bec': 0.8606601665782735, 'amp_th': 0.1553960250745048, 'sigma_bec': 8.072403404223405, 'sigma_th': 8.072403404877084}\n",
|
|
|
|
"18.0\n",
|
|
|
|
"\n",
|
|
|
|
"[74.88995354 73.93092826 0.90810872 0.09114657 9.42569183 7.98461584]\n",
|
|
|
|
"{'x0_bec': 74.84814609706852, 'x0_th': 74.34947866579368, 'amp_bec': 0.7917518736101876, 'amp_th': 0.12935441772036824, 'sigma_bec': 8.30427046215347, 'sigma_th': 8.304270463041027}\n",
|
|
|
|
"20.0\n",
|
|
|
|
"\n"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"\n",
|
|
|
|
"for i in range(0, shape[0]):\n",
|
|
|
|
" for j in range(0, shape[1]):\n",
|
|
|
|
" print(popt[i,j])\n",
|
|
|
|
" print(result_x[i][j].best_values)\n",
|
2023-07-26 09:41:51 +02:00
|
|
|
" #print(result_y[i][j].best_values)\n",
|
2023-07-20 20:34:19 +02:00
|
|
|
" print(BEC_width_guess[i,j,1])\n",
|
|
|
|
" print(\"\")\n",
|
|
|
|
"\n"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-26 09:41:51 +02:00
|
|
|
"end_time": "2023-07-25T10:29:51.620810400Z",
|
|
|
|
"start_time": "2023-07-25T10:29:51.571566300Z"
|
2023-07-20 20:34:19 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-26 09:41:51 +02:00
|
|
|
"execution_count": 22,
|
2023-07-20 10:19:32 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": "<Figure size 1200x800 with 9 Axes>",
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA9EAAAKPCAYAAABqw0lAAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdd3zU9f3A8df39iW5XPaAJAQIGwSCKC5cdStatdZdVBCr1rbW2vKztmpbsXW0WgeoqHXUhdriqHuBVgQRRJARIHvPu6xb3+/vj28SQBLIuORG3s/H4x5yd9/73vvO483n/f0sRdM0DSGEEEIIIYQQQhyUIdQBCCGEEEIIIYQQkUKKaCGEEEIIIYQQopekiBZCCCGEEEIIIXpJimghhBBCCCGEEKKXpIgWQgghhBBCCCF6SYpoIYQQQgghhBCil6SIFkIIIYQQQggheskU6gC+T1VVysvLcTgcKIoS6nCEEBFI0zTcbjcjRozAYIiua4WSI4UQAyH5UQghuteX/Bh2RXR5eTnZ2dmhDkMIEQVKSkrIysoKdRhBJTlSCBEMkh+FEKJ7vcmPYVdEOxwOQA8+Pj4+xNEIISKRy+UiOzu7K59EE8mRQoiBkPwohBDd60t+DLsiunP4TXx8vCRAIcSARONwPsmRQohgkPwohBDd601+jK7JMEIIIYQQQgghxCCSIloIIYQQ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on+kiBaRQQ1gb9eH5FiTsvd72pqk/6Pt8FYPaVhC7G2gvTBCBIOmaST66wCwJu1fRAM0mfRemeZq6YkWQ2/nzp3k5+cze/ZsHn744a7Hi4uL98mfubm5FBf
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"fig, ax = plt.subplots(nr_plots,nr_plots,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)\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()"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-26 09:41:51 +02:00
|
|
|
"end_time": "2023-07-25T10:29:32.565187100Z",
|
|
|
|
"start_time": "2023-07-25T10:29:31.085329400Z"
|
2023-07-20 20:34:19 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-26 09:41:51 +02:00
|
|
|
"execution_count": 28,
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
|
|
|
"22.774\n",
|
|
|
|
"22.814\n"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"print(11.8*1.93)\n",
|
|
|
|
"print(18.7*1.22)"
|
|
|
|
],
|
2023-07-20 20:34:19 +02:00
|
|
|
"metadata": {
|
2023-07-26 09:41:51 +02:00
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
|
|
|
"end_time": "2023-07-25T13:42:22.372434400Z",
|
|
|
|
"start_time": "2023-07-25T13:42:22.299475700Z"
|
|
|
|
}
|
2023-07-20 20:34:19 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"plt.show()"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 216,
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": "<Figure size 1200x800 with 9 Axes>",
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA9EAAAKPCAYAAABqw0lAAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdeXwU9fnA8c/skd1cu7kPSMIVbhAIoiiKJ4oX+lPrXUVF8aptbWtFa6u2Fa21rT0UrBS1tt7Y4tFab8EDQQggKBIg5L6PzW72nvn9MUkkkkDuPfK8X69t2d3Z2WfG5WGe+V6KpmkaQgghhBBCCCGEOCxDqAMQQgghhBBCCCEihRTRQgghhBBCCCFED0kRLYQQQgghhBBC9JAU0UIIIYQQQgghRA9JES2EEEIIIYQQQvSQFNFCCCGEEEIIIUQPSREthBBCCCGEEEL0kCnUAXybqqpUVFSQmJiIoiihDkcIEYE0TaOlpYURI0ZgMETXvULJkUKI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jUmIAw1EK4wQAyHBVwuAwT7ioPcM8Sl40XvzNFSVDGlcIrrNnz+fnJycPn/+pZdeYtGiRWRlZaEoCjfccAPPPvvsAEYohhNvIMhYdR8Ahuzp+ouWBBot+nWkuf7LUIUmooAU0SIyqEFiPfpFoSUl96C3LSn6P9qJPrmrKEKnv60wQgwETdNIDuj50pzSRUGjKDQY0wBort4/lKEJAcCePXsoKChgzpw5PProox2vl5SUdMqfo0ePpqSk+xs9Xq8Xh8PR6SFEu6ZWP1MU/fdjyTmi4/Vm2wQ
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"fig, ax = plt.subplots(nr_plots,nr_plots,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",
|
|
|
|
"\n",
|
|
|
|
"plt.show()"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
|
|
|
"end_time": "2023-07-20T13:30:21.491998700Z",
|
|
|
|
"start_time": "2023-07-20T13:30:19.773425Z"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 221,
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": "<Figure size 1200x800 with 9 Axes>",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52JdFVja38deUhAI5UNXW6HrkQQgwUhyoaAL0nGmBIkA8AOwvrsDvbt3HRQT4E+3phNCgMH6Lvn13e0IfRCiFE32qbEx0d7Iuft4npI/SaEONjg3n/vil89vNpXDQqCm+jgbOHhZMW70qii+vlOlF4nCTRwiMqG/Xh3G3zW35M5kgLIQa6tuHcI9w90XoS/ePCOYA7cT52/+wySaLFwPLwww+TlJSEoihkZWV1uM+aNWvw9fUlPT3d/WhpOVoD4I033mD48OGkpKQwd+5c7HYpPDpYHTsnGuC5a8bx3LXj+GDeOUxJDmdcbDBv3jmZXU9fRlp8CGNigjEaFCobbO6RPkJ4iiTRwiPahnMnhPvT0ZS/mh/NmRZCiIFEVTVyq/XK3Knunmh9OHfb8O1jpUQen0S//E02Gc+u4KAk02KAuO6661i/fj2JiYkn3G/kyJFkZWW5H76+vgDk5uby1FNPsW7dOg4fPkx5eTmvvfZaX4QuPKDM3ROtJ9HxYX7cenYivt7Gdvv5eOmvfb2NXDJanwv9j9WH+zBSIY4nSbTwiLYkOjLAm0Afr+Per2mS5QuEEANXVaONVoeK0aC4e1naeqI7cmxP9MhjCivWNttZsq2w9wIVogdNnz6duLi40/78kiVLmDVrFtHR0SiKwv333897773X6f42mw2LxdLuIQYGTdPcw7nb2shT8fDFwwH4dFeJTHkRHiVJtOhTrQ6V4roWdxIdEWCmwXp0qNaYmCAAqhulJ1oIMXAV1urDU6ODfDAZ9T+1P06iY0N83c+HRx1
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"fig, ax = plt.subplots(nr_plots,nr_plots,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_y[i][j].best_values\n",
|
|
|
|
" ax[i,j].plot(y, Y_guess_og[i,j])\n",
|
|
|
|
" ax[i,j].plot(y, density_1d(y, **result_y[i][j].best_values), label = lab)\n",
|
|
|
|
" ax[i,j].plot(y, thermal(y, bval['x0_th'], bval['amp_th'], bval['sigma_th']))\n",
|
|
|
|
" #ax[i,j].plot(y, thermal(y, **result[i][j].best_values))\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
" #ax[i,j].legend(fontsize=10)\n",
|
|
|
|
" ax[i,j].set_facecolor('#FFFFFF')\n",
|
|
|
|
"plt.show()"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
|
|
|
"end_time": "2023-07-20T13:32:23.044548800Z",
|
|
|
|
"start_time": "2023-07-20T13:32:21.525149900Z"
|
2023-07-20 10:19:32 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-07-20 20:34:19 +02:00
|
|
|
"execution_count": 63,
|
2023-07-20 10:19:32 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
2023-07-20 20:34:19 +02:00
|
|
|
"[88.5 88.5 2.36427288 0.29873033 25. 21.78913789]\n",
|
|
|
|
"[0. 0. 0. 0. 0. 0.]\n",
|
2023-07-20 10:19:32 +02:00
|
|
|
"\n",
|
2023-07-20 20:34:19 +02:00
|
|
|
"[83.31944444 83.31944444 2.00635046 0.26824219 26. 21.30093181]\n",
|
|
|
|
"[0. 0. 0. 0. 0. 0.]\n",
|
2023-07-20 10:19:32 +02:00
|
|
|
"\n",
|
2023-07-20 20:34:19 +02:00
|
|
|
"[83.28654971 83.28654971 2.14473074 0.24207043 26. 20.45775545]\n",
|
|
|
|
"[0. 0. 0. 0. 0. 0.]\n",
|
2023-07-20 10:19:32 +02:00
|
|
|
"\n",
|
2023-07-20 20:34:19 +02:00
|
|
|
"[84.52136752 84.52136752 2.35846552 0.21308753 19. 18.73504104]\n",
|
|
|
|
"[0. 0. 0. 0. 0. 0.]\n",
|
2023-07-20 10:19:32 +02:00
|
|
|
"\n",
|
2023-07-20 20:34:19 +02:00
|
|
|
"[84.98387097 84.98387097 2.21373578 0.18182394 21. 18.55393163]\n",
|
|
|
|
"[0. 0. 0. 0. 0. 0.]\n",
|
2023-07-20 10:19:32 +02:00
|
|
|
"\n",
|
2023-07-20 20:34:19 +02:00
|
|
|
"[90.42528736 90.42528736 1.79170364 0.15810669 26. 15.99073945]\n",
|
|
|
|
"[0. 0. 0. 0. 0. 0.]\n",
|
2023-07-20 10:19:32 +02:00
|
|
|
"\n",
|
2023-07-20 20:34:19 +02:00
|
|
|
"[84.00684932 84.00684932 0.76816174 0.12878971 20. 5.96931421]\n",
|
|
|
|
"[0. 0. 0. 0. 0. 0.]\n",
|
2023-07-20 10:19:32 +02:00
|
|
|
"\n",
|
2023-07-20 20:34:19 +02:00
|
|
|
"[83.63970588 83.63970588 0.66093309 0.25375932 18. 5.34970959]\n",
|
|
|
|
"[0. 0. 0. 0. 0. 0.]\n",
|
2023-07-20 10:19:32 +02:00
|
|
|
"\n",
|
2023-07-20 20:34:19 +02:00
|
|
|
"[8.47401575e+01 8.47401575e+01 7.75240700e-01 7.78106534e-02\n",
|
|
|
|
" 2.00000000e+01 7.98461584e+00]\n",
|
|
|
|
"[0. 0. 0. 0. 0. 0.]\n",
|
2023-07-20 10:19:32 +02:00
|
|
|
"\n"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"for i in range(0,3):\n",
|
|
|
|
" for j in range(0,3):\n",
|
2023-07-20 20:34:19 +02:00
|
|
|
" print(p0_y[i,j])\n",
|
|
|
|
" print(popt_y[i,j])\n",
|
2023-07-20 10:19:32 +02:00
|
|
|
" print(\"\")"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
2023-07-20 20:34:19 +02:00
|
|
|
"end_time": "2023-07-20T09:38:31.270317900Z",
|
|
|
|
"start_time": "2023-07-20T09:38:31.227819Z"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 134,
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
|
|
|
"{'x0_bec': 88.71878723899935, 'x0_th': 87.86994848219054, 'amp_bec': 2.601808340467902, 'amp_th': 0.29982321034674164, 'sigma_bec': 28.01890078868497, 'sigma_th': 28.018901081653368}\n"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"print(result[0][0].best_values)"
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false,
|
|
|
|
"ExecuteTime": {
|
|
|
|
"end_time": "2023-07-20T12:06:33.767462300Z",
|
|
|
|
"start_time": "2023-07-20T12:06:33.710814Z"
|
2023-07-20 10:19:32 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"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
|
|
|
|
}
|