2023-04-24 13:03:23 +02:00
{
"cells": [
2023-06-16 11:23:43 +02:00
{
"cell_type": "code",
"execution_count": 42,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiwAAAGdCAYAAAAxCSikAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABFTUlEQVR4nO3deVxVdeLG8c9ldwPXEFNxyX1FVBYFqQzTNpsaqSmzps2y1GjTzCWnX2SlpaWmZpplRIVbM1raFKKCG4HmrmniAhkuXHBhPb8/KCZy4xJw7oXn/XrdPzh+7/G5J/M+fs8532MxDMNARERExI45mR1ARERE5GpUWERERMTuqbCIiIiI3VNhEREREbunwiIiIiJ2T4VFRERE7J4Ki4iIiNg9FRYRERGxey5mBygvhYWFHD9+nDp16mCxWMyOIyIiIqVgGAZZWVk0adIEJ6fLz6NUmcJy/PhxmjVrZnYMERERKYMjR47QtGnTy/56lSksderUAYo+sKenp8lpREREpDSsVivNmjUr/h6/nCpTWH4/DeTp6anCIiIi4mCudjmHLroVERERu6fCIiIiInZPhUVERETsngqLiIiI2D0VFhEREbF7KiwiIiJi91RYRERExO6psIiIiIjdU2ERERERu6fCIiIiInZPhUVERETsngqLiIiI2L0q8/BDERERqRhRUZCdDU89BT4+5mRQYREREZHLys6GN96AM2cgIABuv92cHDolJCIiIpe1cGFRWbmu/klu7XvGtBwqLCIiInJJBQXwzrRCAJ45NR6nNd+YlkWFRURERC7pq6/gp0NO1OMUw9puhLvvNi2LCouIiIhc0rQ3CwAYzvvUmvAsODublkUX3YqIiMhFtmyBdQnOuJLLU61WwT1xpubRDIuIiIhc5O038wG4h89oMvFRU2dXQDMsIiIi8idHjsDnsUVzGs9c+wX8Y6nJiTTDIiIiIn/y7rQ8CgqduJ7v8Jt8J7iYP7+hwiIiIiLFsrJg7vtFtzJHXr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4PYTczd2q1Kr2V6JCouIiIiDmHDDer4/40ctsomNhdqNa5sdqdKosIiIiDiAFeM2EZUYBsD8kdvpcGtrcwNVMhUWERERO3cwLpUHXmsPwMhua4mYHmxyosqnwiIiImLHzp86z12DzpGJF0G1f+TN9UFmRzKFCouIiIgdezpoKynn29PQksHn3zXErbab2ZFMocIiIiJipz58aB3z94VgoZDo11Np2svH7EimUWERERGxQykxexmxsCcAk2+Mp/8LPUxOZC4VFhERETtz5nAmd93vwQVqMKjRFl76umo/J6g0VFhERETsSGF+IcMC93Aw35cWLkf4OPE6nFz0da0jICIiYkdeDo1nRXoAbuTwxfws6reuZ3Yku6DCIiIiYic+Hr7+f4vDDd9Kzwc6mhvIjqiwiIiI2IHEuT/yyJxeAIwNiuP+2X1MTmRfVFhERERMdnjDUQYPb0wu7gz22cir8brI9s9UWEREREyUnZ7N7f3PcsJoRDePvXz8Q2ddZHsJOiIiIiImKcwv5H6/nWy/0A5vpxOs+K52tXoCsy1UWEREREwyLiSe5ekBuHOBZXNO0DzoWrMj2S0VFhERERN8PHw9r28MA2D+E0kEPtLZ3EB2ToVFRESkkiXM+d8dQS8Fx3HfLN0RdDUqLCIiIpXo8Iaj3PlE0R1Bd/ps5F9rdUdQaaiwiIiIVJLM1Exu63+OE0YjutfYw8cpXXRHUCnpKImIiFSCHGsOd3Y7yI8X2tLY6RdWfO9JrWtqmR3LYaiwiIiIVLDC/EIe6rqV78/4UZssVn5ymmYBTcyO5VBUWERERCrYmOB4og/3wYU8lkTtw+/e9mZHcjgqLCIiIhVo+t/W8uaWMAA
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import numpy as np\n",
"import mpmath as mp\n",
"import matplotlib.pyplot as plt\n",
"\n",
"def polylog(power, numerator):\n",
" \n",
" order = 100\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",
"x = np.linspace(0, 1, 51)\n",
"y1 = polylog(2, x)\n",
"y2 = [float(mp.polylog(2, i).real) for i in x]\n",
"\n",
"plt.figure()\n",
"\n",
"plt.plot(x, y1, 'r')\n",
"plt.plot(x, y2, 'b')\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 104,
"metadata": {},
"outputs": [],
"source": [
"from lmfit.lineshapes import (not_zero, breit_wigner, damped_oscillator, dho, doniach,\n",
" expgaussian, exponential, gaussian, gaussian2d,\n",
" linear, lognormal, lorentzian, moffat, parabolic,\n",
" pearson7, powerlaw, pvoigt, rectangle, sine,\n",
" skewed_gaussian, skewed_voigt, split_lorentzian, step,\n",
" students_t, thermal_distribution, tiny, voigt)\n",
"\n",
"def polylog(power, numerator):\n",
" \n",
" order = 100\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",
"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 / 2 / 5.403642092095097 / max(tiny, sigmax * sigmay) * polylog(2, np.exp( -((x-centerx)**2/(2 * (sigmax)**2))-((y-centery)**2/( 2 * (sigmay)**2)) ))\n"
]
},
{
"cell_type": "code",
"execution_count": 95,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"5.403642092095097\n"
]
}
],
"source": [
"from scipy import special\n",
"\n",
"sum = 0\n",
"for i in range(1,20000):\n",
" sum += 1/i**4 * special.gamma(1/2/i)**2\n",
" \n",
"print(sum)"
]
},
{
"cell_type": "code",
"execution_count": 98,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"4.0"
]
},
"execution_count": 98,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"x[1] - x[0] "
]
},
{
"cell_type": "code",
"execution_count": 105,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.8405962721688879"
]
},
"execution_count": 105,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"x = np.linspace(-100, 100, 101)\n",
"y = np.linspace(-100, 100, 101)\n",
"\n",
"X, Y = np.meshgrid(x, y)\n",
"X = X.flatten()\n",
"Y = Y.flatten()\n",
"Z = polylog2_2d(x=X, y=Y).reshape(101, 101)\n",
"\n",
"np.sum(Z)"
]
},
2023-05-04 13:47:33 +02:00
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Import supporting package"
]
},
2023-04-24 13:03:23 +02:00
{
"cell_type": "code",
2023-06-29 11:54:10 +02:00
"execution_count": 1,
2023-04-24 13:03:23 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-05-04 13:47:33 +02:00
"import xarray as xr\n",
2023-05-19 18:52:33 +02:00
"import pandas as pd\n",
2023-05-04 13:47:33 +02:00
"import numpy as np\n",
2023-05-19 18:52:33 +02:00
"import copy\n",
"\n",
"import glob\n",
"\n",
"import xrft\n",
"import finufft\n",
2023-05-04 13:47:33 +02:00
"\n",
2023-05-05 18:25:03 +02:00
"from uncertainties import ufloat\n",
"from uncertainties import unumpy as unp\n",
"from uncertainties import umath\n",
"\n",
2023-05-19 18:52:33 +02:00
"from datetime import datetime\n",
"\n",
2023-05-04 13:47:33 +02:00
"import matplotlib.pyplot as plt\n",
2023-05-19 18:52:33 +02:00
"plt.rcParams['font.size'] = 18\n",
2023-05-04 13:47:33 +02:00
"\n",
2023-05-24 16:54:29 +02:00
"from DataContainer.ReadData import read_hdf5_file, read_hdf5_global, read_hdf5_run_time, read_csv_file\n",
2023-05-04 13:47:33 +02:00
"from Analyser.ImagingAnalyser import ImageAnalyser\n",
"from Analyser.FitAnalyser import FitAnalyser\n",
2023-05-24 19:59:04 +02:00
"from Analyser.FitAnalyser import ThomasFermi2dModel, DensityProfileBEC2dModel, Polylog22dModel\n",
2023-05-19 18:52:33 +02:00
"from Analyser.FFTAnalyser import fft, ifft, fft_nutou\n",
2023-05-05 18:25:03 +02:00
"from ToolFunction.ToolFunction import *\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",
2023-05-04 13:47:33 +02:00
"\n",
"imageAnalyser = ImageAnalyser()"
]
},
2023-05-24 16:54:29 +02:00
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Import supporting package"
]
},
{
"cell_type": "code",
2023-07-23 17:12:41 +02:00
"execution_count": 2,
2023-05-24 16:54:29 +02:00
"metadata": {},
"outputs": [],
"source": [
"import xarray as xr\n",
"import numpy as np\n",
"\n",
"from uncertainties import ufloat\n",
"from uncertainties import unumpy as unp\n",
"from uncertainties import umath\n",
"\n",
"import matplotlib.pyplot as plt\n",
"\n",
"from DataContainer.ReadData import read_hdf5_file\n",
"from Analyser.ImagingAnalyser import ImageAnalyser\n",
"from Analyser.FitAnalyser import FitAnalyser\n",
"from Analyser.FitAnalyser import ThomasFermi2dModel, DensityProfileBEC2dModel, Polylog22dModel\n",
"from Analyser.FitAnalyser import NewFitModel\n",
"from ToolFunction.ToolFunction import *\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()"
]
},
2023-05-04 13:47:33 +02:00
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Start a client for parallel computing"
2023-04-24 13:03:23 +02:00
]
},
{
"cell_type": "code",
2023-07-23 17:12:41 +02:00
"execution_count": 3,
2023-05-04 13:47:33 +02:00
"metadata": {},
2023-05-04 19:16:35 +02:00
"outputs": [
2023-07-23 17:12:41 +02:00
{
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\data\\AppData\\Roaming\\Python\\Python39\\site-packages\\distributed\\node.py:182: UserWarning: Port 8787 is already in use.\n",
"Perhaps you already have a cluster running?\n",
"Hosting the HTTP server on port 52475 instead\n",
" warnings.warn(\n"
]
},
2023-05-04 19:16:35 +02:00
{
"data": {
"text/html": [
"<div>\n",
" <div style=\"width: 24px; height: 24px; background-color: #e1e1e1; border: 3px solid #9D9D9D; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <h3 style=\"margin-bottom: 0px;\">Client</h3>\n",
2023-07-23 17:12:41 +02:00
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">Client-5ac7f000-261b-11ee-9f6c-80e82ce2fa8e</p>\n",
2023-05-04 19:16:35 +02:00
" <table style=\"width: 100%; text-align: left;\">\n",
"\n",
" <tr>\n",
" \n",
" <td style=\"text-align: left;\"><strong>Connection method:</strong> Cluster object</td>\n",
" <td style=\"text-align: left;\"><strong>Cluster type:</strong> distributed.LocalCluster</td>\n",
" \n",
" </tr>\n",
"\n",
" \n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:52475/status\" target=\"_blank\">http://127.0.0.1:52475/status</a>\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" \n",
"\n",
" </table>\n",
"\n",
" \n",
"\n",
" \n",
" <details>\n",
" <summary style=\"margin-bottom: 20px;\"><h3 style=\"display: inline;\">Cluster Info</h3></summary>\n",
" <div class=\"jp-RenderedHTMLCommon jp-RenderedHTML jp-mod-trusted jp-OutputArea-output\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #e1e1e1; border: 3px solid #9D9D9D; border-radius: 5px; position: absolute;\">\n",
" </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <h3 style=\"margin-bottom: 0px; margin-top: 0px;\">LocalCluster</h3>\n",
2023-07-23 17:12:41 +02:00
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">c80cced4</p>\n",
2023-05-04 19:16:35 +02:00
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Dashboard:</strong> <a href=\"http://127.0.0.1:52475/status\" target=\"_blank\">http://127.0.0.1:52475/status</a>\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Workers:</strong> 6\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads:</strong> 60\n",
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total memory:</strong> 55.88 GiB\n",
" </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <td style=\"text-align: left;\"><strong>Status:</strong> running</td>\n",
" <td style=\"text-align: left;\"><strong>Using processes:</strong> True</td>\n",
"</tr>\n",
"\n",
" \n",
" </table>\n",
"\n",
" <details>\n",
" <summary style=\"margin-bottom: 20px;\">\n",
" <h3 style=\"display: inline;\">Scheduler Info</h3>\n",
" </summary>\n",
"\n",
" <div style=\"\">\n",
" <div>\n",
" <div style=\"width: 24px; height: 24px; background-color: #FFF7E5; border: 3px solid #FF6132; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <h3 style=\"margin-bottom: 0px;\">Scheduler</h3>\n",
2023-07-23 17:12:41 +02:00
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">Scheduler-0363aa80-9ca7-4bd2-8096-e563f44991c3</p>\n",
2023-05-04 19:16:35 +02:00
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Comm:</strong> tcp://127.0.0.1:52478\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Workers:</strong> 6\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Dashboard:</strong> <a href=\"http://127.0.0.1:52475/status\" target=\"_blank\">http://127.0.0.1:52475/status</a>\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads:</strong> 60\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Started:</strong> Just now\n",
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total memory:</strong> 55.88 GiB\n",
" </td>\n",
" </tr>\n",
" </table>\n",
" </div>\n",
" </div>\n",
"\n",
" <details style=\"margin-left: 48px;\">\n",
" <summary style=\"margin-bottom: 20px;\">\n",
" <h3 style=\"display: inline;\">Workers</h3>\n",
" </summary>\n",
"\n",
" \n",
" <div style=\"margin-bottom: 20px;\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <details>\n",
" <summary>\n",
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 0</h4>\n",
" </summary>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:52506\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads: </strong> 10\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:52509/status\" target=\"_blank\">http://127.0.0.1:52509/status</a>\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Memory: </strong> 9.31 GiB\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:52481\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-bwtzfry2\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" </tr>\n",
"\n",
" \n",
"\n",
" \n",
"\n",
" </table>\n",
" </details>\n",
" </div>\n",
" </div>\n",
" \n",
" <div style=\"margin-bottom: 20px;\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <details>\n",
" <summary>\n",
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 1</h4>\n",
" </summary>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:52512\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads: </strong> 10\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:52513/status\" target=\"_blank\">http://127.0.0.1:52513/status</a>\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Memory: </strong> 9.31 GiB\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:52482\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-mp7n6m76\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" </tr>\n",
"\n",
" \n",
"\n",
" \n",
"\n",
" </table>\n",
" </details>\n",
" </div>\n",
" </div>\n",
" \n",
" <div style=\"margin-bottom: 20px;\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <details>\n",
" <summary>\n",
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 2</h4>\n",
" </summary>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:52515\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads: </strong> 10\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:52516/status\" target=\"_blank\">http://127.0.0.1:52516/status</a>\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Memory: </strong> 9.31 GiB\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:52483\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-co90qahq\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" </tr>\n",
"\n",
" \n",
"\n",
" \n",
"\n",
" </table>\n",
" </details>\n",
" </div>\n",
" </div>\n",
" \n",
" <div style=\"margin-bottom: 20px;\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <details>\n",
" <summary>\n",
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 3</h4>\n",
" </summary>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:52518\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads: </strong> 10\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:52519/status\" target=\"_blank\">http://127.0.0.1:52519/status</a>\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Memory: </strong> 9.31 GiB\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:52484\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-4p3qclmm\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" </tr>\n",
"\n",
" \n",
"\n",
" \n",
"\n",
" </table>\n",
" </details>\n",
" </div>\n",
" </div>\n",
" \n",
" <div style=\"margin-bottom: 20px;\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <details>\n",
" <summary>\n",
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 4</h4>\n",
" </summary>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:52521\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads: </strong> 10\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:52522/status\" target=\"_blank\">http://127.0.0.1:52522/status</a>\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Memory: </strong> 9.31 GiB\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:52485\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-jl88pafx\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" </tr>\n",
"\n",
" \n",
"\n",
" \n",
"\n",
" </table>\n",
" </details>\n",
" </div>\n",
" </div>\n",
" \n",
" <div style=\"margin-bottom: 20px;\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <details>\n",
" <summary>\n",
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 5</h4>\n",
" </summary>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:52507\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads: </strong> 10\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:52508/status\" target=\"_blank\">http://127.0.0.1:52508/status</a>\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Memory: </strong> 9.31 GiB\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:52486\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-07-23 17:12:41 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-lczd_jce\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" </tr>\n",
"\n",
" \n",
"\n",
" \n",
"\n",
" </table>\n",
" </details>\n",
" </div>\n",
" </div>\n",
" \n",
"\n",
" </details>\n",
"</div>\n",
"\n",
" </details>\n",
" </div>\n",
"</div>\n",
" </details>\n",
" \n",
"\n",
" </div>\n",
"</div>"
],
"text/plain": [
2023-07-23 17:12:41 +02:00
"<Client: 'tcp://127.0.0.1:52478' processes=6 threads=60, memory=55.88 GiB>"
2023-05-04 19:16:35 +02:00
]
},
2023-07-23 17:12:41 +02:00
"execution_count": 3,
2023-05-04 19:16:35 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
2023-05-04 13:47:33 +02:00
"source": [
"from dask.distributed import Client\n",
"client = Client(n_workers=6, threads_per_worker=10, processes=True, memory_limit='10GB')\n",
"client"
]
},
2023-05-19 18:52:33 +02:00
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Set global path for experiment"
]
},
{
"cell_type": "code",
2023-07-23 17:12:41 +02:00
"execution_count": 4,
2023-04-24 13:03:23 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-05-04 18:32:17 +02:00
"# filepath = \"//DyLabNAS/Data/Evaporative_Cooling/2023/05/03/0043/*.h5\"\n",
2023-04-24 13:03:23 +02:00
"# filepath = \"//DyLabNAS/Data/Evaporative_Cooling/2023/04/18/0003/2023-04-18_0003_Evaporative_Cooling_000.h5\"\n",
"\n",
2023-05-05 18:25:03 +02:00
"# filepath = \"//DyLabNAS/Data/Repetition_scan/2023/04/21/0002/*.h5\"\n",
2023-05-04 13:47:33 +02:00
"\n",
2023-05-24 16:54:29 +02:00
"# filepath = r\"./testData/0002/*.h5\"\n",
2023-04-24 13:03:23 +02:00
"\n",
2023-05-07 00:38:52 +02:00
"# filepath = r\"./testData/0002/2023-04-21_0002_Evaporative_Cooling_0.h5\"\n",
"\n",
"# filepath = r'd:/Jianshun Gao/Simulations/analyseScripts/testData/0002/2023-04-21_0002_Evaporative_Cooling_0.h5'\n",
"\n",
2023-05-05 18:25:03 +02:00
"# filepath = \"//DyLabNAS/Data/Evaporative_Cooling/2023/04/18/0003/*.h5\"\n",
"\n",
2023-06-16 11:23:43 +02:00
"filepath = \"//DyLabNAS/Data/Evaporative_Cooling/2023/05/04/0000/*.h5\"\n",
2023-05-24 16:54:29 +02:00
"\n",
2023-06-16 11:23:43 +02:00
"# filepath = './result_from_experiment/2023-04-24/0013/2023-04-24_0013_Evaporative_Cooling_13.h5'"
2023-05-04 13:47:33 +02:00
]
},
{
"cell_type": "code",
2023-07-23 17:12:41 +02:00
"execution_count": 5,
2023-05-04 13:47:33 +02:00
"metadata": {},
2023-05-07 23:41:31 +02:00
"outputs": [],
2023-05-04 13:47:33 +02:00
"source": [
2023-04-24 13:03:23 +02:00
"groupList = [\n",
" \"images/MOT_3D_Camera/in_situ_absorption\",\n",
2023-05-24 16:54:29 +02:00
" \"images/ODT_1_Axis_Camera/in_situ_absorption\",\n",
" \"images/ODT_2_Axis_Camera/in_situ_absorption\",\n",
2023-04-24 13:03:23 +02:00
"]\n",
"\n",
"dskey = {\n",
" \"images/MOT_3D_Camera/in_situ_absorption\": \"camera_1\",\n",
2023-05-24 16:54:29 +02:00
" \"images/ODT_1_Axis_Camera/in_situ_absorption\": \"camera_2\",\n",
" \"images/ODT_2_Axis_Camera/in_situ_absorption\": \"camera_3\",\n",
"}\n"
2023-05-04 13:47:33 +02:00
]
},
2023-04-24 13:03:23 +02:00
{
"cell_type": "code",
2023-07-23 17:12:41 +02:00
"execution_count": 6,
2023-05-04 13:47:33 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-05-24 16:54:29 +02:00
"img_dir = '//DyLabNAS/Data/'\n",
"SequenceName = \"Evaporative_Cooling\" + \"/\"\n",
"folderPath = img_dir + SequenceName + '2023/05/23'# get_date()"
2023-05-04 13:47:33 +02:00
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
2023-05-24 16:54:29 +02:00
"# An example for one experimental run"
2023-05-04 13:47:33 +02:00
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
2023-05-24 16:54:29 +02:00
"## Load the data"
2023-05-04 13:47:33 +02:00
]
},
{
"cell_type": "code",
2023-07-23 17:12:41 +02:00
"execution_count": 7,
2023-04-24 13:03:23 +02:00
"metadata": {},
2023-05-04 19:16:35 +02:00
"outputs": [
2023-05-24 19:59:04 +02:00
{
"name": "stderr",
"output_type": "stream",
"text": [
2023-07-23 17:12:41 +02:00
"f:\\Jianshun\\analyseScript\\DataContainer\\ReadData.py:234: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison\n",
2023-05-24 19:59:04 +02:00
" if not key in datesetOfGlobal.scanAxis\n"
]
},
2023-05-04 19:16:35 +02:00
{
"data": {
"text/html": [
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
"<defs>\n",
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
"<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"</symbol>\n",
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
"<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"</symbol>\n",
"</defs>\n",
"</svg>\n",
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
" *\n",
" */\n",
"\n",
":root {\n",
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
" --xr-background-color: var(--jp-layout-color0, white);\n",
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
"}\n",
"\n",
"html[theme=dark],\n",
"body[data-theme=dark],\n",
"body.vscode-dark {\n",
" --xr-font-color0: rgba(255, 255, 255, 1);\n",
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
" --xr-border-color: #1F1F1F;\n",
" --xr-disabled-color: #515151;\n",
" --xr-background-color: #111111;\n",
" --xr-background-color-row-even: #111111;\n",
" --xr-background-color-row-odd: #313131;\n",
"}\n",
"\n",
".xr-wrap {\n",
" display: block !important;\n",
" min-width: 300px;\n",
" max-width: 700px;\n",
"}\n",
"\n",
".xr-text-repr-fallback {\n",
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
" display: none;\n",
"}\n",
"\n",
".xr-header {\n",
" padding-top: 6px;\n",
" padding-bottom: 6px;\n",
" margin-bottom: 4px;\n",
" border-bottom: solid 1px var(--xr-border-color);\n",
"}\n",
"\n",
".xr-header > div,\n",
".xr-header > ul {\n",
" display: inline;\n",
" margin-top: 0;\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-obj-type,\n",
".xr-array-name {\n",
" margin-left: 2px;\n",
" margin-right: 10px;\n",
"}\n",
"\n",
".xr-obj-type {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-sections {\n",
" padding-left: 0 !important;\n",
" display: grid;\n",
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-item input + label {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label {\n",
" cursor: pointer;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label:hover {\n",
" color: var(--xr-font-color0);\n",
"}\n",
"\n",
".xr-section-summary {\n",
" grid-column: 1;\n",
" color: var(--xr-font-color2);\n",
" font-weight: 500;\n",
"}\n",
"\n",
".xr-section-summary > span {\n",
" display: inline-block;\n",
" padding-left: 0.5em;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-summary-in + label:before {\n",
" display: inline-block;\n",
" content: 'â–º';\n",
" font-size: 11px;\n",
" width: 15px;\n",
" text-align: center;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label:before {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label:before {\n",
" content: 'â–¼';\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label > span {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-summary,\n",
".xr-section-inline-details {\n",
" padding-top: 4px;\n",
" padding-bottom: 4px;\n",
"}\n",
"\n",
".xr-section-inline-details {\n",
" grid-column: 2 / -1;\n",
"}\n",
"\n",
".xr-section-details {\n",
" display: none;\n",
" grid-column: 1 / -1;\n",
" margin-bottom: 5px;\n",
"}\n",
"\n",
".xr-section-summary-in:checked ~ .xr-section-details {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-array-wrap {\n",
" grid-column: 1 / -1;\n",
" display: grid;\n",
" grid-template-columns: 20px auto;\n",
"}\n",
"\n",
".xr-array-wrap > label {\n",
" grid-column: 1;\n",
" vertical-align: top;\n",
"}\n",
"\n",
".xr-preview {\n",
" color: var(--xr-font-color3);\n",
"}\n",
"\n",
".xr-array-preview,\n",
".xr-array-data {\n",
" padding: 0 5px !important;\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-array-data,\n",
".xr-array-in:checked ~ .xr-array-preview {\n",
" display: none;\n",
"}\n",
"\n",
".xr-array-in:checked ~ .xr-array-data,\n",
".xr-array-preview {\n",
" display: inline-block;\n",
"}\n",
"\n",
".xr-dim-list {\n",
" display: inline-block !important;\n",
" list-style: none;\n",
" padding: 0 !important;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list li {\n",
" display: inline-block;\n",
" padding: 0;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list:before {\n",
" content: '(';\n",
"}\n",
"\n",
".xr-dim-list:after {\n",
" content: ')';\n",
"}\n",
"\n",
".xr-dim-list li:not(:last-child):after {\n",
" content: ',';\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-has-index {\n",
" font-weight: bold;\n",
"}\n",
"\n",
".xr-var-list,\n",
".xr-var-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-var-item > div,\n",
".xr-var-item label,\n",
".xr-var-item > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-even);\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-var-item > .xr-var-name:hover span {\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-var-list > li:nth-child(odd) > div,\n",
".xr-var-list > li:nth-child(odd) > label,\n",
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-odd);\n",
"}\n",
"\n",
".xr-var-name {\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-var-dims {\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-var-dtype {\n",
" grid-column: 3;\n",
" text-align: right;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-preview {\n",
" grid-column: 4;\n",
"}\n",
"\n",
".xr-index-preview {\n",
" grid-column: 2 / 5;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-name,\n",
".xr-var-dims,\n",
".xr-var-dtype,\n",
".xr-preview,\n",
".xr-attrs dt {\n",
" white-space: nowrap;\n",
" overflow: hidden;\n",
" text-overflow: ellipsis;\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-var-name:hover,\n",
".xr-var-dims:hover,\n",
".xr-var-dtype:hover,\n",
".xr-attrs dt:hover {\n",
" overflow: visible;\n",
" width: auto;\n",
" z-index: 1;\n",
"}\n",
"\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-data {\n",
" display: none;\n",
" background-color: var(--xr-background-color) !important;\n",
" padding-bottom: 5px !important;\n",
"}\n",
"\n",
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
".xr-var-data-in:checked ~ .xr-var-data,\n",
".xr-index-data-in:checked ~ .xr-index-data {\n",
" display: block;\n",
"}\n",
"\n",
".xr-var-data > table {\n",
" float: right;\n",
"}\n",
"\n",
".xr-var-name span,\n",
".xr-var-data,\n",
".xr-index-name div,\n",
".xr-index-data,\n",
".xr-attrs {\n",
" padding-left: 25px !important;\n",
"}\n",
"\n",
".xr-attrs,\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-data {\n",
" grid-column: 1 / -1;\n",
"}\n",
"\n",
"dl.xr-attrs {\n",
" padding: 0;\n",
" margin: 0;\n",
" display: grid;\n",
" grid-template-columns: 125px auto;\n",
"}\n",
"\n",
".xr-attrs dt,\n",
".xr-attrs dd {\n",
" padding: 0;\n",
" margin: 0;\n",
" float: left;\n",
" padding-right: 10px;\n",
" width: auto;\n",
"}\n",
"\n",
".xr-attrs dt {\n",
" font-weight: normal;\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-attrs dt:hover span {\n",
" display: inline-block;\n",
" background: var(--xr-background-color);\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-attrs dd {\n",
" grid-column: 2;\n",
" white-space: pre-wrap;\n",
" word-break: break-all;\n",
"}\n",
"\n",
".xr-icon-database,\n",
".xr-icon-file-text2,\n",
".xr-no-icon {\n",
" display: inline-block;\n",
" vertical-align: middle;\n",
" width: 1em;\n",
" height: 1.5em !important;\n",
" stroke-width: 0;\n",
" stroke: currentColor;\n",
" fill: currentColor;\n",
"}\n",
"</style><pre class='xr-text-repr-fallback'><xarray.Dataset>\n",
2023-05-24 19:59:04 +02:00
"Dimensions: (y: 1200, x: 1920)\n",
2023-05-24 16:54:29 +02:00
"Dimensions without coordinates: y, x\n",
2023-05-04 19:16:35 +02:00
"Data variables:\n",
2023-05-24 19:59:04 +02:00
" atoms (y, x) uint16 dask.array<chunksize=(1200, 1920), meta=np.ndarray>\n",
" background (y, x) uint16 dask.array<chunksize=(1200, 1920), meta=np.ndarray>\n",
" dark (y, x) uint16 dask.array<chunksize=(1200, 1920), meta=np.ndarray>\n",
2023-06-16 11:23:43 +02:00
" shotNum <U2 '11'\n",
2023-05-24 19:59:04 +02:00
" OD (y, x) float64 dask.array<chunksize=(1200, 1920), meta=np.ndarray>\n",
"Attributes: (12/96)\n",
" TOF_free: 0.02\n",
2023-05-04 19:16:35 +02:00
" abs_img_freq: 110.858\n",
" absorption_imaging_flag: True\n",
" backup_data: True\n",
2023-05-24 19:59:04 +02:00
" blink_off_time: nan\n",
" blink_on_time: nan\n",
2023-05-04 19:16:35 +02:00
" ... ...\n",
2023-05-24 19:59:04 +02:00
" y_offset: 0\n",
" y_offset_img: 0\n",
2023-05-04 19:16:35 +02:00
" z_offset: 0.189\n",
" z_offset_img: 0.189\n",
2023-05-24 19:59:04 +02:00
" scanAxis: []\n",
2023-07-23 17:12:41 +02:00
" scanAxisLength: []</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-ec5b96ec-3fbd-41ed-93ff-44307cde3390' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-ec5b96ec-3fbd-41ed-93ff-44307cde3390' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span>y</span>: 1200</li><li><span>x</span>: 1920</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-baf349f6-ffc6-4810-a176-13e9f16ba25b' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-baf349f6-ffc6-4810-a176-13e9f16ba25b' class='xr-section-summary' title='Expand/collapse section'>Coordinates: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'></ul></div></li><li class='xr-section-item'><input id='section-61a52fcb-e121-4c08-b890-1be565dbae2f' class='xr-section-summary-in' type='checkbox' checked><label for='section-61a52fcb-e121-4c08-b890-1be565dbae2f' class='xr-section-summary' >Data variables: <span>(5)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>atoms</span></div><div class='xr-var-dims'>(y, x)</div><div class='xr-var-dtype'>uint16</div><div class='xr-var-preview xr-preview'>dask.array<chunksize=(1200, 1920), meta=np.ndarray></div><input id='attrs-25c95ac6-37ef-4466-8fba-b9d0998dec05' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-25c95ac6-37ef-4466-8fba-b9d0998dec05' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-13ef18e5-221b-48af-93de-6c0a04ad61e5' class='xr-var-data-in' type='checkbox'><label for='data-13ef18e5-221b-48af-93de-6c0a04ad61e5' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>IMAGE_SUBCLASS :</span></dt><dd>IMAGE_GRAYSCALE</dd><dt><span>IMAGE_VERSION :</span></dt><dd>1.2</dd><dt><span>IMAGE_WHITE_IS_ZERO :</span></dt><dd>0</dd></dl></div><div class='xr-var-data'><table>\n",
2023-05-04 19:16:35 +02:00
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
2023-05-24 19:59:04 +02:00
" <td> 4.39 MiB </td>\n",
" <td> 4.39 MiB </td>\n",
2023-05-04 19:16:35 +02:00
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
2023-05-24 19:59:04 +02:00
" <td> (1200, 1920) </td>\n",
" <td> (1200, 1920) </td>\n",
2023-05-04 19:16:35 +02:00
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
2023-05-24 19:59:04 +02:00
" <td colspan=\"2\"> 1 chunks in 2 graph layers </td>\n",
2023-05-04 19:16:35 +02:00
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> uint16 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
2023-05-24 19:59:04 +02:00
" <svg width=\"170\" height=\"125\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Horizontal lines -->\n",
2023-05-24 19:59:04 +02:00
" <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"0\" y1=\"75\" x2=\"120\" y2=\"75\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Vertical lines -->\n",
2023-05-24 19:59:04 +02:00
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"75\" style=\"stroke-width:2\" />\n",
" <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"75\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Colored Rectangle -->\n",
2023-05-24 19:59:04 +02:00
" <polygon points=\"0.0,0.0 120.0,0.0 120.0,75.0 0.0,75.0\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Text -->\n",
2023-05-24 19:59:04 +02:00
" <text x=\"60.000000\" y=\"95.000000\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >1920</text>\n",
" <text x=\"140.000000\" y=\"37.500000\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,140.000000,37.500000)\">1200</text>\n",
2023-05-04 19:16:35 +02:00
"</svg>\n",
" </td>\n",
" </tr>\n",
2023-07-23 17:12:41 +02:00
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>background</span></div><div class='xr-var-dims'>(y, x)</div><div class='xr-var-dtype'>uint16</div><div class='xr-var-preview xr-preview'>dask.array<chunksize=(1200, 1920), meta=np.ndarray></div><input id='attrs-d2313912-491a-48a5-8d85-3992f8816257' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-d2313912-491a-48a5-8d85-3992f8816257' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-14c4d7f0-6ed5-43f8-ac87-7dade8ec08b2' class='xr-var-data-in' type='checkbox'><label for='data-14c4d7f0-6ed5-43f8-ac87-7dade8ec08b2' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>IMAGE_SUBCLASS :</span></dt><dd>IMAGE_GRAYSCALE</dd><dt><span>IMAGE_VERSION :</span></dt><dd>1.2</dd><dt><span>IMAGE_WHITE_IS_ZERO :</span></dt><dd>0</dd></dl></div><div class='xr-var-data'><table>\n",
2023-05-04 19:16:35 +02:00
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
2023-05-24 19:59:04 +02:00
" <td> 4.39 MiB </td>\n",
" <td> 4.39 MiB </td>\n",
2023-05-04 19:16:35 +02:00
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
2023-05-24 19:59:04 +02:00
" <td> (1200, 1920) </td>\n",
" <td> (1200, 1920) </td>\n",
2023-05-04 19:16:35 +02:00
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
2023-05-24 19:59:04 +02:00
" <td colspan=\"2\"> 1 chunks in 2 graph layers </td>\n",
2023-05-04 19:16:35 +02:00
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> uint16 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
2023-05-24 19:59:04 +02:00
" <svg width=\"170\" height=\"125\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Horizontal lines -->\n",
2023-05-24 19:59:04 +02:00
" <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"0\" y1=\"75\" x2=\"120\" y2=\"75\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Vertical lines -->\n",
2023-05-24 19:59:04 +02:00
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"75\" style=\"stroke-width:2\" />\n",
" <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"75\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Colored Rectangle -->\n",
2023-05-24 19:59:04 +02:00
" <polygon points=\"0.0,0.0 120.0,0.0 120.0,75.0 0.0,75.0\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Text -->\n",
2023-05-24 19:59:04 +02:00
" <text x=\"60.000000\" y=\"95.000000\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >1920</text>\n",
" <text x=\"140.000000\" y=\"37.500000\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,140.000000,37.500000)\">1200</text>\n",
2023-05-04 19:16:35 +02:00
"</svg>\n",
" </td>\n",
" </tr>\n",
2023-07-23 17:12:41 +02:00
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>dark</span></div><div class='xr-var-dims'>(y, x)</div><div class='xr-var-dtype'>uint16</div><div class='xr-var-preview xr-preview'>dask.array<chunksize=(1200, 1920), meta=np.ndarray></div><input id='attrs-ffd44c81-646b-4564-b1fe-05a154f3a96b' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-ffd44c81-646b-4564-b1fe-05a154f3a96b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-eade5bec-ce4b-4846-8277-603280226d6f' class='xr-var-data-in' type='checkbox'><label for='data-eade5bec-ce4b-4846-8277-603280226d6f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>IMAGE_SUBCLASS :</span></dt><dd>IMAGE_GRAYSCALE</dd><dt><span>IMAGE_VERSION :</span></dt><dd>1.2</dd><dt><span>IMAGE_WHITE_IS_ZERO :</span></dt><dd>0</dd></dl></div><div class='xr-var-data'><table>\n",
2023-05-04 19:16:35 +02:00
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
2023-05-24 19:59:04 +02:00
" <td> 4.39 MiB </td>\n",
" <td> 4.39 MiB </td>\n",
2023-05-04 19:16:35 +02:00
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
2023-05-24 19:59:04 +02:00
" <td> (1200, 1920) </td>\n",
" <td> (1200, 1920) </td>\n",
2023-05-04 19:16:35 +02:00
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
2023-05-24 19:59:04 +02:00
" <td colspan=\"2\"> 1 chunks in 2 graph layers </td>\n",
2023-05-04 19:16:35 +02:00
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> uint16 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
2023-05-24 19:59:04 +02:00
" <svg width=\"170\" height=\"125\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Horizontal lines -->\n",
2023-05-24 19:59:04 +02:00
" <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"0\" y1=\"75\" x2=\"120\" y2=\"75\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Vertical lines -->\n",
2023-05-24 19:59:04 +02:00
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"75\" style=\"stroke-width:2\" />\n",
" <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"75\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Colored Rectangle -->\n",
2023-05-24 19:59:04 +02:00
" <polygon points=\"0.0,0.0 120.0,0.0 120.0,75.0 0.0,75.0\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Text -->\n",
2023-05-24 19:59:04 +02:00
" <text x=\"60.000000\" y=\"95.000000\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >1920</text>\n",
" <text x=\"140.000000\" y=\"37.500000\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,140.000000,37.500000)\">1200</text>\n",
2023-05-04 19:16:35 +02:00
"</svg>\n",
" </td>\n",
" </tr>\n",
2023-07-23 17:12:41 +02:00
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>shotNum</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'><U2</div><div class='xr-var-preview xr-preview'>'11'</div><input id='attrs-c809af6a-bccf-45f5-bbe1-aa233c8fcfab' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-c809af6a-bccf-45f5-bbe1-aa233c8fcfab' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9f84c873-2e2c-466f-8ba9-0b2fdde93380' class='xr-var-data-in' type='checkbox'><label for='data-9f84c873-2e2c-466f-8ba9-0b2fdde93380' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array('11', dtype='<U2')</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>OD</span></div><div class='xr-var-dims'>(y, x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array<chunksize=(1200, 1920), meta=np.ndarray></div><input id='attrs-7f76e601-6ec1-48c3-b28a-de60fb1da3a6' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-7f76e601-6ec1-48c3-b28a-de60fb1da3a6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-80ae0948-0fc2-4a48-8232-d9376f5ac77b' class='xr-var-data-in' type='checkbox'><label for='data-80ae0948-0fc2-4a48-8232-d9376f5ac77b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>IMAGE_SUBCLASS :</span></dt><dd>IMAGE_GRAYSCALE</dd><dt><span>IMAGE_VERSION :</span></dt><dd>1.2</dd><dt><span>IMAGE_WHITE_IS_ZERO :</span></dt><dd>0</dd></dl></div><div class='xr-var-data'><table>\n",
2023-05-04 19:16:35 +02:00
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
2023-05-24 19:59:04 +02:00
" <td> 17.58 MiB </td>\n",
" <td> 17.58 MiB </td>\n",
2023-05-04 19:16:35 +02:00
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
2023-05-24 19:59:04 +02:00
" <td> (1200, 1920) </td>\n",
" <td> (1200, 1920) </td>\n",
2023-05-04 19:16:35 +02:00
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
2023-05-24 19:59:04 +02:00
" <td colspan=\"2\"> 1 chunks in 16 graph layers </td>\n",
2023-05-04 19:16:35 +02:00
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float64 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
2023-05-24 19:59:04 +02:00
" <svg width=\"170\" height=\"125\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Horizontal lines -->\n",
2023-05-24 19:59:04 +02:00
" <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"0\" y1=\"75\" x2=\"120\" y2=\"75\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Vertical lines -->\n",
2023-05-24 19:59:04 +02:00
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"75\" style=\"stroke-width:2\" />\n",
" <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"75\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Colored Rectangle -->\n",
2023-05-24 19:59:04 +02:00
" <polygon points=\"0.0,0.0 120.0,0.0 120.0,75.0 0.0,75.0\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Text -->\n",
2023-05-24 19:59:04 +02:00
" <text x=\"60.000000\" y=\"95.000000\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >1920</text>\n",
" <text x=\"140.000000\" y=\"37.500000\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,140.000000,37.500000)\">1200</text>\n",
2023-05-04 19:16:35 +02:00
"</svg>\n",
" </td>\n",
" </tr>\n",
2023-07-23 17:12:41 +02:00
"</table></div></li></ul></div></li><li class='xr-section-item'><input id='section-af699151-4f5c-49c7-bb0d-93998f824fa5' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-af699151-4f5c-49c7-bb0d-93998f824fa5' class='xr-section-summary' title='Expand/collapse section'>Indexes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'></ul></div></li><li class='xr-section-item'><input id='section-6a5d30f7-7f90-46f2-b6a2-e6898a477881' class='xr-section-summary-in' type='checkbox' ><label for='section-6a5d30f7-7f90-46f2-b6a2-e6898a477881' class='xr-section-summary' >Attributes: <span>(96)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>TOF_free :</span></dt><dd>0.02</dd><dt><span>abs_img_freq :</span></dt><dd>110.858</dd><dt><span>absorption_imaging_flag :</span></dt><dd>True</dd><dt><span>backup_data :</span></dt><dd>True</dd><dt><span>blink_off_time :</span></dt><dd>nan</dd><dt><span>blink_on_time :</span></dt><dd>nan</dd><dt><span>c_duration :</span></dt><dd>0.2</dd><dt><span>cmot_final_current :</span></dt><dd>0.65</dd><dt><span>cmot_hold :</span></dt><dd>0.06</dd><dt><span>cmot_initial_current :</span></dt><dd>0.18</dd><dt><span>compX_current :</span></dt><dd>0.005</dd><dt><span>compX_current_sg :</span></dt><dd>0</dd><dt><span>compX_final_current :</span></dt><dd>0.005</dd><dt><span>compX_initial_current :</span></dt><dd>0.005</dd><dt><span>compY_current :</span></dt><dd>0</dd><dt><span>compY_current_sg :</span></dt><dd>0</dd><dt><span>compY_final_current :</span></dt><dd>0.0</dd><dt><span>compY_initial_current :</span></dt><dd>0</dd><dt><span>compZ_current :</span></dt><dd>0</dd><dt><span>compZ_current_sg :</span></dt><dd>0.189</dd><dt><span>compZ_final_current :</span></dt><dd>0.2812</dd><dt><span>compZ_initial_current :</span></dt><dd>0</dd><dt><span>default_camera :</span></dt><dd>0</dd><dt><span>evap_1_arm_1_final_pow :</span></dt><dd>0.35</dd><dt><span>evap_1_arm_1_mod_depth_final :</span></dt><dd>0</dd><dt><span>evap_1_arm_1_mod_depth_initial :</span></dt><dd>1.0</dd><dt><span>evap_1_arm_1_mod_ramp_duration :</span></dt><dd>1.15</dd><dt><span>evap_1_arm_1_pow_ramp_duration :</span></dt><dd>1.65</dd><dt><span>evap_1_arm_1_start_pow :</span></dt><dd>7</dd><dt><span>evap_1_arm_2_final_pow :</span></dt><dd>5</dd><dt><span>evap_1_arm_2_ramp_duration :</span></dt><dd>0.5</dd><dt><span>evap_1_arm_2_start_pow :</span></dt><dd>0</dd><dt><span>evap_1_mod_ramp_trunc_value :</span></dt><dd>1</dd><dt><span>evap_1_pow_ramp_trunc_value :</span></dt><dd>1.0</dd><dt><span>evap_1_rate_constant_1 :</span></dt><dd>0.525</dd><dt><span>evap_1_rate_constant_2 :</span></dt><dd>0.51</dd><dt><span>evap_2_arm_1_final_pow :</span></dt><dd>0.037</dd><dt><span>evap_2_arm_1_start_pow :</span></dt><dd>0.35</dd><dt><span>evap_2_arm_2_final_pow :</span></dt><dd>0.09</dd><dt><span>evap_2_arm_2_start_pow :</span></dt><dd>5</dd><dt><span>evap_2_ramp_duration :</span></dt><dd>1.0</dd><dt><span>evap_2_ramp_trunc_value :</span></dt><dd>1</dd><dt><span>evap_2_rate_constant_1 :</span></dt><dd>0.37</dd><dt><span>evap_2_rate_constant_2 :</span></dt><dd>0.71</dd><dt><span>evap_3_arm_1_final_pow :</span></dt><dd>0.1038</dd><dt><span>evap_3_arm_1_mod_depth_final :</span></dt><dd>0.43</dd><dt><span>evap_3_arm_1_mod_depth_initial :</span></dt><dd>0</dd><dt><span>evap_3_arm_1_start_pow :</span></dt><dd>0.037</dd><dt><span>evap_3_ramp_duration :</span></dt><dd>0.1</dd><dt><span>evap_3_ramp_trunc_value :</span></dt><dd>1</dd><dt><span>evap_3_rate_constant_1 :</span></dt><dd>-0.879</dd><dt><span>evap_3_rate_constant_2 :</span></dt><dd>-0.297</dd><dt><span>final_amp :</span></dt><dd>8e-05</dd><dt><span>final_freq :</span></dt><dd>104.0</dd><dt><span>gradCoil_current :</span></dt><dd>0.18</dd><dt><span>gradCoil_current_sg :</span></dt><dd>0</dd><dt><span>imaging_method :</span></dt><dd>in_situ_absorption</dd><dt><span>imaging_pulse_duration :</span></dt><dd>2.5e-05</dd><dt><span>imaging_wavel
2023-05-04 19:16:35 +02:00
],
"text/plain": [
"<xarray.Dataset>\n",
2023-05-24 19:59:04 +02:00
"Dimensions: (y: 1200, x: 1920)\n",
2023-05-24 16:54:29 +02:00
"Dimensions without coordinates: y, x\n",
2023-05-04 19:16:35 +02:00
"Data variables:\n",
2023-05-24 19:59:04 +02:00
" atoms (y, x) uint16 dask.array<chunksize=(1200, 1920), meta=np.ndarray>\n",
" background (y, x) uint16 dask.array<chunksize=(1200, 1920), meta=np.ndarray>\n",
" dark (y, x) uint16 dask.array<chunksize=(1200, 1920), meta=np.ndarray>\n",
2023-06-16 11:23:43 +02:00
" shotNum <U2 '11'\n",
2023-05-24 19:59:04 +02:00
" OD (y, x) float64 dask.array<chunksize=(1200, 1920), meta=np.ndarray>\n",
"Attributes: (12/96)\n",
" TOF_free: 0.02\n",
2023-05-04 19:16:35 +02:00
" abs_img_freq: 110.858\n",
" absorption_imaging_flag: True\n",
" backup_data: True\n",
2023-05-24 19:59:04 +02:00
" blink_off_time: nan\n",
" blink_on_time: nan\n",
2023-05-04 19:16:35 +02:00
" ... ...\n",
2023-05-24 19:59:04 +02:00
" y_offset: 0\n",
" y_offset_img: 0\n",
2023-05-04 19:16:35 +02:00
" z_offset: 0.189\n",
" z_offset_img: 0.189\n",
2023-05-24 19:59:04 +02:00
" scanAxis: []\n",
" scanAxisLength: []"
2023-05-04 19:16:35 +02:00
]
},
2023-07-23 17:12:41 +02:00
"execution_count": 7,
2023-05-04 19:16:35 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
2023-05-24 16:54:29 +02:00
"shotNum = \"0069\"\n",
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"# filePath = \"//DyLabNAS/Data/Evaporative_Cooling/2023/05/12/0065/*.h5\"\n",
2023-06-16 11:23:43 +02:00
"filePath = './result_from_experiment/2023-04-24/0013/2023-04-24_0013_Evaporative_Cooling_11.h5'\n",
2023-05-24 16:54:29 +02:00
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
" for i in [0] # range(len(groupList))\n",
"}\n",
"\n",
"dataSet = dataSetDict[\"camera_1\"]\n",
"dataSet = swap_xy(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
2023-05-04 19:16:35 +02:00
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"dataSet"
]
},
2023-07-23 17:12:41 +02:00
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"selected = np.zeros((2, 2))\n",
"a = xr.DataArray(\n",
" data=selected,\n",
" dims=[\"x\", \"y\"],\n",
" coords=dict(\n",
" x=np.arange(np.shape(selected)[0]),\n",
" y=np.arange(np.shape(selected)[1]),\n",
" )\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
"<defs>\n",
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
"<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"</symbol>\n",
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
"<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"</symbol>\n",
"</defs>\n",
"</svg>\n",
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
" *\n",
" */\n",
"\n",
":root {\n",
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
" --xr-background-color: var(--jp-layout-color0, white);\n",
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
"}\n",
"\n",
"html[theme=dark],\n",
"body[data-theme=dark],\n",
"body.vscode-dark {\n",
" --xr-font-color0: rgba(255, 255, 255, 1);\n",
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
" --xr-border-color: #1F1F1F;\n",
" --xr-disabled-color: #515151;\n",
" --xr-background-color: #111111;\n",
" --xr-background-color-row-even: #111111;\n",
" --xr-background-color-row-odd: #313131;\n",
"}\n",
"\n",
".xr-wrap {\n",
" display: block !important;\n",
" min-width: 300px;\n",
" max-width: 700px;\n",
"}\n",
"\n",
".xr-text-repr-fallback {\n",
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
" display: none;\n",
"}\n",
"\n",
".xr-header {\n",
" padding-top: 6px;\n",
" padding-bottom: 6px;\n",
" margin-bottom: 4px;\n",
" border-bottom: solid 1px var(--xr-border-color);\n",
"}\n",
"\n",
".xr-header > div,\n",
".xr-header > ul {\n",
" display: inline;\n",
" margin-top: 0;\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-obj-type,\n",
".xr-array-name {\n",
" margin-left: 2px;\n",
" margin-right: 10px;\n",
"}\n",
"\n",
".xr-obj-type {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-sections {\n",
" padding-left: 0 !important;\n",
" display: grid;\n",
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-item input + label {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label {\n",
" cursor: pointer;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label:hover {\n",
" color: var(--xr-font-color0);\n",
"}\n",
"\n",
".xr-section-summary {\n",
" grid-column: 1;\n",
" color: var(--xr-font-color2);\n",
" font-weight: 500;\n",
"}\n",
"\n",
".xr-section-summary > span {\n",
" display: inline-block;\n",
" padding-left: 0.5em;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-summary-in + label:before {\n",
" display: inline-block;\n",
" content: 'â–º';\n",
" font-size: 11px;\n",
" width: 15px;\n",
" text-align: center;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label:before {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label:before {\n",
" content: 'â–¼';\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label > span {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-summary,\n",
".xr-section-inline-details {\n",
" padding-top: 4px;\n",
" padding-bottom: 4px;\n",
"}\n",
"\n",
".xr-section-inline-details {\n",
" grid-column: 2 / -1;\n",
"}\n",
"\n",
".xr-section-details {\n",
" display: none;\n",
" grid-column: 1 / -1;\n",
" margin-bottom: 5px;\n",
"}\n",
"\n",
".xr-section-summary-in:checked ~ .xr-section-details {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-array-wrap {\n",
" grid-column: 1 / -1;\n",
" display: grid;\n",
" grid-template-columns: 20px auto;\n",
"}\n",
"\n",
".xr-array-wrap > label {\n",
" grid-column: 1;\n",
" vertical-align: top;\n",
"}\n",
"\n",
".xr-preview {\n",
" color: var(--xr-font-color3);\n",
"}\n",
"\n",
".xr-array-preview,\n",
".xr-array-data {\n",
" padding: 0 5px !important;\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-array-data,\n",
".xr-array-in:checked ~ .xr-array-preview {\n",
" display: none;\n",
"}\n",
"\n",
".xr-array-in:checked ~ .xr-array-data,\n",
".xr-array-preview {\n",
" display: inline-block;\n",
"}\n",
"\n",
".xr-dim-list {\n",
" display: inline-block !important;\n",
" list-style: none;\n",
" padding: 0 !important;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list li {\n",
" display: inline-block;\n",
" padding: 0;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list:before {\n",
" content: '(';\n",
"}\n",
"\n",
".xr-dim-list:after {\n",
" content: ')';\n",
"}\n",
"\n",
".xr-dim-list li:not(:last-child):after {\n",
" content: ',';\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-has-index {\n",
" font-weight: bold;\n",
"}\n",
"\n",
".xr-var-list,\n",
".xr-var-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-var-item > div,\n",
".xr-var-item label,\n",
".xr-var-item > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-even);\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-var-item > .xr-var-name:hover span {\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-var-list > li:nth-child(odd) > div,\n",
".xr-var-list > li:nth-child(odd) > label,\n",
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-odd);\n",
"}\n",
"\n",
".xr-var-name {\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-var-dims {\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-var-dtype {\n",
" grid-column: 3;\n",
" text-align: right;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-preview {\n",
" grid-column: 4;\n",
"}\n",
"\n",
".xr-index-preview {\n",
" grid-column: 2 / 5;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-name,\n",
".xr-var-dims,\n",
".xr-var-dtype,\n",
".xr-preview,\n",
".xr-attrs dt {\n",
" white-space: nowrap;\n",
" overflow: hidden;\n",
" text-overflow: ellipsis;\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-var-name:hover,\n",
".xr-var-dims:hover,\n",
".xr-var-dtype:hover,\n",
".xr-attrs dt:hover {\n",
" overflow: visible;\n",
" width: auto;\n",
" z-index: 1;\n",
"}\n",
"\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-data {\n",
" display: none;\n",
" background-color: var(--xr-background-color) !important;\n",
" padding-bottom: 5px !important;\n",
"}\n",
"\n",
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
".xr-var-data-in:checked ~ .xr-var-data,\n",
".xr-index-data-in:checked ~ .xr-index-data {\n",
" display: block;\n",
"}\n",
"\n",
".xr-var-data > table {\n",
" float: right;\n",
"}\n",
"\n",
".xr-var-name span,\n",
".xr-var-data,\n",
".xr-index-name div,\n",
".xr-index-data,\n",
".xr-attrs {\n",
" padding-left: 25px !important;\n",
"}\n",
"\n",
".xr-attrs,\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-data {\n",
" grid-column: 1 / -1;\n",
"}\n",
"\n",
"dl.xr-attrs {\n",
" padding: 0;\n",
" margin: 0;\n",
" display: grid;\n",
" grid-template-columns: 125px auto;\n",
"}\n",
"\n",
".xr-attrs dt,\n",
".xr-attrs dd {\n",
" padding: 0;\n",
" margin: 0;\n",
" float: left;\n",
" padding-right: 10px;\n",
" width: auto;\n",
"}\n",
"\n",
".xr-attrs dt {\n",
" font-weight: normal;\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-attrs dt:hover span {\n",
" display: inline-block;\n",
" background: var(--xr-background-color);\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-attrs dd {\n",
" grid-column: 2;\n",
" white-space: pre-wrap;\n",
" word-break: break-all;\n",
"}\n",
"\n",
".xr-icon-database,\n",
".xr-icon-file-text2,\n",
".xr-no-icon {\n",
" display: inline-block;\n",
" vertical-align: middle;\n",
" width: 1em;\n",
" height: 1.5em !important;\n",
" stroke-width: 0;\n",
" stroke: currentColor;\n",
" fill: currentColor;\n",
"}\n",
"</style><pre class='xr-text-repr-fallback'><xarray.Dataset>\n",
"Dimensions: (fileNum: 1, phony_dim_0: 59, phony_dim_1: 0)\n",
"Dimensions without coordinates: fileNum, phony_dim_0, phony_dim_1\n",
"Data variables:\n",
" connection table (fileNum, phony_dim_0) [('name', 'S256'), ('class', 'S256'), ('parent', 'S256'), ('parent port', 'S256'), ('unit conversion class', 'S256'), ('unit conversion params', 'O'), ('BLACS_connection', 'S9'), ('properties', 'O')] dask.array<chunksize=(1, 59), meta=np.ndarray>\n",
" script (fileNum) <U7544 'from labscript import *\\nfrom labscri...\n",
" time_markers (fileNum, phony_dim_1) [('label', 'S256'), ('time', '<f8'), ('color', '<i4', (1, 3))] dask.array<chunksize=(1, 0), meta=np.ndarray>\n",
" waits (fileNum, phony_dim_1) [('label', 'S256'), ('time', '<f8'), ('timeout', '<f8')] dask.array<chunksize=(1, 0), meta=np.ndarray>\n",
"Attributes:\n",
" n_runs: 12\n",
" run number: 11\n",
" run time: 20230424T183333\n",
" script_basename: Evaporative_Cooling\n",
" sequence_date: 2023-04-24\n",
" sequence_id: 20230424T183145_Evaporative_Cooling\n",
" sequence_index: 13</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-df0fb99b-2e32-443a-8abc-37d1cfce576a' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-df0fb99b-2e32-443a-8abc-37d1cfce576a' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span>fileNum</span>: 1</li><li><span>phony_dim_0</span>: 59</li><li><span>phony_dim_1</span>: 0</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-d7da5bd2-8200-4a86-bebc-3bdd2d5c29d0' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-d7da5bd2-8200-4a86-bebc-3bdd2d5c29d0' class='xr-section-summary' title='Expand/collapse section'>Coordinates: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'></ul></div></li><li class='xr-section-item'><input id='section-90f2bb5c-fcfd-431e-8352-bce55b32b20d' class='xr-section-summary-in' type='checkbox' checked><label for='section-90f2bb5c-fcfd-431e-8352-bce55b32b20d' class='xr-section-summary' >Data variables: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>connection table</span></div><div class='xr-var-dims'>(fileNum, phony_dim_0)</div><div class='xr-var-dtype'>[('name', 'S256'), ('class', 'S256'), ('parent', 'S256'), ('parent port', 'S256'), ('unit conversion class', 'S256'), ('unit conversion params', 'O'), ('BLACS_connection', 'S9'), ('properties', 'O')]</div><div class='xr-var-preview xr-preview'>dask.array<chunksize=(1, 59), meta=np.ndarray></div><input id='attrs-3ab7a604-2517-460d-a0e1-481bd0381665' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-3ab7a604-2517-460d-a0e1-481bd0381665' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5c5dbfe0-052d-42b1-9858-b77b261205b8' class='xr-var-data-in' type='checkbox'><label for='data-5c5dbfe0-052d-42b1-9858-b77b261205b8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>master_pseudoclock :</span></dt><dd>prawn</dd></dl></div><div class='xr-var-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 75.19 kiB </td>\n",
" <td> 75.19 kiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (1, 59) </td>\n",
" <td> (1, 59) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 1 chunks in 3 graph layers </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> [('name', 'S256'), ('class', 'S256'), ('parent', 'S256'), ('parent port', 'S256'), ('unit conversion class', 'S256'), ('unit conversion params', 'O'), ('BLACS_connection', 'S9'), ('properties', 'O')] numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"170\" height=\"78\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"0\" y1=\"28\" x2=\"120\" y2=\"28\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"28\" style=\"stroke-width:2\" />\n",
" <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"28\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"0.0,0.0 120.0,0.0 120.0,28.11425155255148 0.0,28.11425155255148\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"60.000000\" y=\"48.114252\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >59</text>\n",
" <text x=\"140.000000\" y=\"14.057126\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,140.000000,14.057126)\">1</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>script</span></div><div class='xr-var-dims'>(fileNum)</div><div class='xr-var-dtype'><U7544</div><div class='xr-var-preview xr-preview'>'from labscript import *\\nfrom l...</div><input id='attrs-a5f506c9-a282-44ca-b34b-38a5510ec73d' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-a5f506c9-a282-44ca-b34b-38a5510ec73d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ea2e991d-94bd-40ca-a7e9-8724e449bc2b' class='xr-var-data-in' type='checkbox'><label for='data-ea2e991d-94bd-40ca-a7e9-8724e449bc2b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>name :</span></dt><dd>Evaporative_Cooling.py</dd><dt><span>path :</span></dt><dd>C:\\Users\\control\\labscript-suite\\userlib\\labscriptlib\\DyBEC\\Sequences</dd></dl></div><div class='xr-var-data'><pre>array(['from labscript import *\\nfrom labscript_utils import import_or_reload\\nimport_or_reload(\\'labscriptlib.DyBEC.connection_table\\')\\n\\nfrom labscriptlib.DyBEC.Subsequences.MOT import *\\nfrom labscriptlib.DyBEC.Subsequences.ODT import *\\nfrom labscriptlib.DyBEC.Subsequences.SequenceControl import *\\nfrom labscriptlib.DyBEC.Subsequences.Manipulations import *\\n\\n"""\\ndifferent parameters:\\nTOF: Duration of time-of-flight\\nimaging_pulse_duration: Duration of imaging pulse (controlled by the RF switch)\\nmot_3d_camera_trigger_duration: trigger duration for the camera\\nwait_time_between_images: lapsed time between taking two successive images (e.g. \\'with atoms\\' and \\'without atoms\\')\\npulse_delay: delay for the imaging pulse (with respect to the exposure trigger)\\n"""\\n\\nstart()\\n\\nt0 = 1e-3\\n\\nt = reinitialise(t0)\\n\\n"""Switch on the 2D MOT, 3D MOT and push beam"""\\nMOT_2D_Shutter.go_high(t)\\nMOT_3D_Shutter.go_high(t)\\nPush_Beam_Red_Shutter.go_high(t) ## red push shutter on \\n\\nMOT_Grad_Coil_Switch.go_high(t)\\nMOT_CompX_Coil_Switch.go_high(t)\\nMOT_CompY_Coil_Switch.go_high(t)\\nMOT_CompZ_Coil_Switch.go_high(t)\\n\\nt += 5e-3\\n\\n"""Load 3D MOT from 2D MOT with push"""\\nMOT_3D_RF_Switch.go_high(t) \\nPush_Beam_Red_Switch.go_high(t) ## red push switch on\\n\\nt += load_mot3d(t)\\n\\n"""Switch off the 2D MOT and the push beam"""\\nPush_Beam_Red_Switch.go_low(t) ## red push switch off\\nPush_Beam_Red_Shutter.go_low(t) ## red push shutter off\\nMOT_2D_Shutter.go_low(t)\\n\\n"""Set power ODT1, ODT2, and modulation of ODT1"""\\nset_ODT_power(t)\\nset_modulation(t)\\n\\n"""MOT Compression"""\\nt += compress_mot3d(t)\\n\\n"""Switch on ODT1"""\\nCDT1_Switch.go_high(t)\\n\\nt += cmot_hold\\n\\nMOT_3D_RF_Switch.go_low(t)\\nMOT_3D_Shutter.go_low(t)\\nMOT_Grad_Coil_Switch.go_low(t)\\n\\n"""Set the offset magnetic field in x, y and z directions"""\\nt += odt_hold_time_1\\nset_offset_mag_field(t, x_offset, y_offset, z_offset)\\nt += odt_hold_time_2\\n\\n"""EVAPORATION 1"""\\n"""Ramp down modulation and power of ODT1, switch on and ramp up power of ODT2"""\\nCDT2_Switch.go_high(t)\\nramp_on_arm_2(t + 1, evap_1_arm_2_ramp_duration, evap_1_arm_2_start_pow, evap_1_arm_2_final_pow)\\nt += ramp_modulation_and_power(t, evap_1_arm_1_mod_ramp_duration, evap_1_arm_1_pow_ramp_duration, evap_1_arm_1_mod_depth_initial,\\n evap_1_arm_1_mod_depth_final, evap_1_arm_1_start_pow, evap_1_arm_1_final_pow, evap_1_rate_constant_1, \\n evap_1_rate_constant_2, evap_1_mod_ramp_trunc_value, evap_1_pow_ramp_trunc_value)\\n\\n"""EVAPORATION 2"""\\n""&
" dtype='<U7544')</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>time_markers</span></div><div class='xr-var-dims'>(fileNum, phony_dim_1)</div><div class='xr-var-dtype'>[('label', 'S256'), ('time', '<f8'), ('color', '<i4', (1, 3))]</div><div class='xr-var-preview xr-preview'>dask.array<chunksize=(1, 0), meta=np.ndarray></div><input id='attrs-96366a15-b8a7-4819-a1af-91c14a407a87' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-96366a15-b8a7-4819-a1af-91c14a407a87' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d986513c-da4d-44ce-8e39-d31ef1e1f487' class='xr-var-data-in' type='checkbox'><label for='data-d986513c-da4d-44ce-8e39-d31ef1e1f487' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 0 B </td>\n",
" <td> 0 B </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (1, 0) </td>\n",
" <td> (1, 0) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 1 chunks in 3 graph layers </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> [('label', 'S256'), ('time', '<f8'), ('color', '<i4', (1, 3))] numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" \n",
" </td>\n",
" </tr>\n",
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>waits</span></div><div class='xr-var-dims'>(fileNum, phony_dim_1)</div><div class='xr-var-dtype'>[('label', 'S256'), ('time', '<f8'), ('timeout', '<f8')]</div><div class='xr-var-preview xr-preview'>dask.array<chunksize=(1, 0), meta=np.ndarray></div><input id='attrs-229d9531-b917-48a2-8c2c-d33d13f0c3aa' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-229d9531-b917-48a2-8c2c-d33d13f0c3aa' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7a30f2d1-a3a8-4f41-9e11-d9480b1e4980' class='xr-var-data-in' type='checkbox'><label for='data-7a30f2d1-a3a8-4f41-9e11-d9480b1e4980' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>wait_monitor_acquisition_connection :</span></dt><dd>internal</dd><dt><span>wait_monitor_acquisition_device :</span></dt><dd>prawn_internal_wait_monitor_outputs</dd><dt><span>wait_monitor_timeout_connection :</span></dt><dd>internal</dd><dt><span>wait_monitor_timeout_device :</span></dt><dd>prawn_internal_wait_monitor_outputs</dd><dt><span>wait_monitor_timeout_trigger_type :</span></dt><dd>rising</dd></dl></div><div class='xr-var-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 0 B </td>\n",
" <td> 0 B </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (1, 0) </td>\n",
" <td> (1, 0) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 1 chunks in 3 graph layers </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> [('label', 'S256'), ('time', '<f8'), ('timeout', '<f8')] numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" \n",
" </td>\n",
" </tr>\n",
"</table></div></li></ul></div></li><li class='xr-section-item'><input id='section-8a09c761-42d2-4d22-9690-2553848a07ba' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-8a09c761-42d2-4d22-9690-2553848a07ba' class='xr-section-summary' title='Expand/collapse section'>Indexes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'></ul></div></li><li class='xr-section-item'><input id='section-44b83dfc-4a6d-432c-b8e7-61cdcc75a383' class='xr-section-summary-in' type='checkbox' checked><label for='section-44b83dfc-4a6d-432c-b8e7-61cdcc75a383' class='xr-section-summary' >Attributes: <span>(7)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>n_runs :</span></dt><dd>12</dd><dt><span>run number :</span></dt><dd>11</dd><dt><span>run time :</span></dt><dd>20230424T183333</dd><dt><span>script_basename :</span></dt><dd>Evaporative_Cooling</dd><dt><span>sequence_date :</span></dt><dd>2023-04-24</dd><dt><span>sequence_id :</span></dt><dd>20230424T183145_Evaporative_Cooling</dd><dt><span>sequence_index :</span></dt><dd>13</dd></dl></div></li></ul></div></div>"
],
"text/plain": [
"<xarray.Dataset>\n",
"Dimensions: (fileNum: 1, phony_dim_0: 59, phony_dim_1: 0)\n",
"Dimensions without coordinates: fileNum, phony_dim_0, phony_dim_1\n",
"Data variables:\n",
" connection table (fileNum, phony_dim_0) [('name', 'S256'), ('class', 'S256'), ('parent', 'S256'), ('parent port', 'S256'), ('unit conversion class', 'S256'), ('unit conversion params', 'O'), ('BLACS_connection', 'S9'), ('properties', 'O')] dask.array<chunksize=(1, 59), meta=np.ndarray>\n",
" script (fileNum) <U7544 'from labscript import *\\nfrom labscri...\n",
" time_markers (fileNum, phony_dim_1) [('label', 'S256'), ('time', '<f8'), ('color', '<i4', (1, 3))] dask.array<chunksize=(1, 0), meta=np.ndarray>\n",
" waits (fileNum, phony_dim_1) [('label', 'S256'), ('time', '<f8'), ('timeout', '<f8')] dask.array<chunksize=(1, 0), meta=np.ndarray>\n",
"Attributes:\n",
" n_runs: 12\n",
" run number: 11\n",
" run time: 20230424T183333\n",
" script_basename: Evaporative_Cooling\n",
" sequence_date: 2023-04-24\n",
" sequence_id: 20230424T183145_Evaporative_Cooling\n",
" sequence_index: 13"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"xr.open_mfdataset(filePath, \n",
" concat_dim=\"fileNum\", \n",
" combine=\"nested\", \n",
" engine=\"h5netcdf\", \n",
" phony_dims=\"access\", \n",
" parallel=True, )"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['F:',\n",
" 'Jianshun',\n",
" 'analyseScript',\n",
" 'testData',\n",
" '0002',\n",
" '2023-04-21_0002_Evaporative_Cooling_0.h5']"
]
},
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"a = 'F:\\\\Jianshun/analyseScript/testData/0002/2023-04-21_0002_Evaporative_Cooling_0.h5'\n",
"a.replace('\\\\', '/').split('/')[-1].split('_')"
]
},
2023-05-05 18:25:03 +02:00
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
2023-05-24 16:54:29 +02:00
"## Calculate an plot OD images"
]
},
{
"cell_type": "code",
2023-06-16 11:23:43 +02:00
"execution_count": 76,
2023-05-24 16:54:29 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-06-16 11:23:43 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAnIAAAHECAYAAAC9VcdgAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOz9fZhWV33vj78muTFOzBAZcRCBk8EOkdEMp0zzBe2UMrnOqNDfmV4HrETJsZhCNbSHU9FINfT0ds6RpGJqzrdpJbVBjTGxiZa04ldiOl4ZGmkKTUhPRh00o5AQJFAyGIZkotzJ/P5Y632vz1p730MSnj37c11czL733muv5/Ve78/DqhsdHR2lkEIKKaSQQgoppJBzTs470xkopJBCCimkkEIKKeSVSQHkCimkkEIKKaSQQs5RKYBcIYUUUkghhRRSyDkqBZArpJBCCimkkEIKOUelAHKFFFJIIYUUUkgh56gUQK6QQgoppJBCCinkHJUCyBVSSCGFFFJIIYWco1I60xn4v11efPFFfvrTn9LQ0EBdXd2Zzk4hhRRSSCFnsYyOjjI8PMwb3/hGzjvv1HAxf//3f8/jjz9+UtJ673vfy6RJk05KWoXkSwHkzrD89Kc/Zdq0aWc6G4UUUkghhZxDsnfvXqZOnXrS0x0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KsiPFT3SxP0rVtJzCpcm8jBuK9OFAskLoIt1AJTIrlTPuDAMcBHDCSU4qYpO3mWb84PyS26phPz4LPEoHNUv2qb6SODPN9fn29Z+pI7WZVp7Z+KkSLZ0MZhnf
2023-05-24 16:54:29 +02:00
"text/plain": [
2023-05-24 19:59:04 +02:00
"<Figure size 640x480 with 2 Axes>"
2023-05-24 16:54:29 +02:00
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
2023-05-24 19:59:04 +02:00
"# imageAnalyser.center = (960, 1040)\n",
"# imageAnalyser.span = (100, 100)\n",
"# imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"imageAnalyser.center = (960, 875)\n",
"imageAnalyser.span = (300, 300)\n",
2023-05-24 16:54:29 +02:00
"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",
"\n",
"dataSet_cropOD.plot.pcolormesh(cmap='jet', vmin=0, col=scanAxis[0], row=scanAxis[1])\n",
"plt.show()"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Do a 2D two-peak gaussian fit to the OD images"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"### Do the fit"
2023-05-05 18:25:03 +02:00
]
},
{
"cell_type": "code",
2023-06-16 11:23:43 +02:00
"execution_count": 77,
2023-05-05 18:25:03 +02:00
"metadata": {},
2023-05-24 19:59:04 +02:00
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
2023-06-16 11:23:43 +02:00
"f:\\Jianshun\\analyseScript\\Analyser\\FitAnalyser.py:86: RuntimeWarning: invalid value encountered in power\n",
2023-05-24 19:59:04 +02:00
" res = (1- ((x-centerx)/(sigmax))**2 - ((y-centery)/(sigmay))**2)**(3 / 2)\n"
]
}
],
2023-05-05 18:25:03 +02:00
"source": [
2023-05-24 16:54:29 +02:00
"from Analyser.FitAnalyser import ThomasFermi2dModel, DensityProfileBEC2dModel, polylog2_2d\n",
2023-05-05 18:25:03 +02:00
"\n",
2023-05-24 16:54:29 +02:00
"fitModel = DensityProfileBEC2dModel()\n",
"# fitModel = ThomasFermi2dModel()\n",
2023-05-05 18:25:03 +02:00
"\n",
2023-05-24 16:54:29 +02:00
"fitAnalyser = FitAnalyser(fitModel, fitDim=2)\n",
2023-05-05 18:25:03 +02:00
"\n",
2023-05-24 16:54:29 +02:00
"# fitAnalyser = FitAnalyser(\"Gaussian-2D\", fitDim=2)\n",
"\n",
2023-05-24 19:59:04 +02:00
"# dataSet_cropOD = dataSet_cropOD.chunk((1,1,100,100))\n",
2023-05-24 16:54:29 +02:00
"\n",
"params = fitAnalyser.guess(dataSet_cropOD, guess_kwargs=dict(pureBECThreshold=0.3), dask=\"parallelized\")\n",
"fitResult = fitAnalyser.fit(dataSet_cropOD, params).load()"
2023-05-05 18:25:03 +02:00
]
},
2023-05-04 19:16:35 +02:00
{
"cell_type": "code",
2023-06-16 11:23:43 +02:00
"execution_count": 78,
2023-05-04 19:16:35 +02:00
"metadata": {},
"outputs": [
{
2023-05-24 19:59:04 +02:00
"data": {
"text/html": [
2023-06-16 11:23:43 +02:00
"<table><tr><th> name </th><th> value </th><th> initial value </th><th> min </th><th> max </th><th> vary </th><th> expression </th></tr><tr><td> BEC_amplitude </td><td> 366.888620 </td><td> None </td><td> 0.00000000 </td><td> inf </td><td> True </td><td> </td></tr><tr><td> thermal_amplitude </td><td> 0.00000000 </td><td> None </td><td> 0.00000000 </td><td> inf </td><td> True </td><td> </td></tr><tr><td> BEC_centerx </td><td> 152.087577 </td><td> None </td><td> -inf </td><td> inf </td><td> True </td><td> </td></tr><tr><td> BEC_centery </td><td> 156.309927 </td><td> None </td><td> -inf </td><td> inf </td><td> True </td><td> </td></tr><tr><td> thermal_centerx </td><td> 169.884333 </td><td> None </td><td> -inf </td><td> inf </td><td> True </td><td> </td></tr><tr><td> thermal_centery </td><td> 157.547034 </td><td> None </td><td> -inf </td><td> inf </td><td> True </td><td> </td></tr><tr><td> BEC_sigmax </td><td> 1.63603577 </td><td> None </td><td> 0.00000000 </td><td> inf </td><td> True </td><td> </td></tr><tr><td> BEC_sigmay </td><td> 3.42894901 </td><td> None </td><td> 0.00000000 </td><td> inf </td><td> True </td><td> </td></tr><tr><td> thermal_sigmax </td><td> 158.415970 </td><td> None </td><td> 0.00000000 </td><td> inf </td><td> True </td><td> </td></tr><tr><td> thermal_sigmay </td><td> 190.099163 </td><td> None </td><td> -inf </td><td> inf </td><td> False </td><td> thermalAspectRatio * thermal_sigmax </td></tr><tr><td> thermalAspectRatio </td><td> 1.20000000 </td><td> None </td><td> 0.80000000 </td><td> 1.20000000 </td><td> True </td><td> </td></tr><tr><td> condensate_fraction </td><td> 1.00000000 </td><td> None </td><td> -inf </td><td> inf </td><td> False </td><td> BEC_amplitude / (BEC_amplitude + thermal_amplitude) </td></tr></table>"
2023-05-24 19:59:04 +02:00
],
"text/plain": [
2023-06-16 11:23:43 +02:00
"Parameters([('BEC_amplitude', <Parameter 'BEC_amplitude', value=366.8886196688306, bounds=[0:inf]>), ('thermal_amplitude', <Parameter 'thermal_amplitude', value=0, bounds=[0:inf]>), ('BEC_centerx', <Parameter 'BEC_centerx', value=152.08757708603804, bounds=[-inf:inf]>), ('BEC_centery', <Parameter 'BEC_centery', value=156.30992724959418, bounds=[-inf:inf]>), ('thermal_centerx', <Parameter 'thermal_centerx', value=169.88433327212883, bounds=[-inf:inf]>), ('thermal_centery', <Parameter 'thermal_centery', value=157.5470340720574, bounds=[-inf:inf]>), ('BEC_sigmax', <Parameter 'BEC_sigmax', value=1.636035766171183, bounds=[0:inf]>), ('BEC_sigmay', <Parameter 'BEC_sigmay', value=3.4289490138791647, bounds=[0:inf]>), ('thermal_sigmax', <Parameter 'thermal_sigmax', value=158.41596952074627, bounds=[0:inf]>), ('thermal_sigmay', <Parameter 'thermal_sigmay', value=190.09916342489552, bounds=[-inf:inf], expr='thermalAspectRatio * thermal_sigmax'>), ('thermalAspectRatio', <Parameter 'thermalAspectRatio', value=1.2, bounds=[0.8:1.2]>), ('condensate_fraction', <Parameter 'condensate_fraction', value=1.0, bounds=[-inf:inf], expr='BEC_amplitude / (BEC_amplitude + thermal_amplitude)'>)])"
2023-05-24 19:59:04 +02:00
]
},
2023-06-16 11:23:43 +02:00
"execution_count": 78,
2023-05-24 19:59:04 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"params.compute().item()"
]
},
{
"cell_type": "code",
2023-06-16 11:23:43 +02:00
"execution_count": 79,
2023-05-24 19:59:04 +02:00
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
2023-06-16 11:23:43 +02:00
"<matplotlib.collections.QuadMesh at 0x1e0e84006d0>"
2023-05-24 19:59:04 +02:00
]
},
2023-06-16 11:23:43 +02:00
"execution_count": 79,
2023-05-24 19:59:04 +02:00
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
2023-06-16 11:23:43 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAnIAAAHECAYAAAC9VcdgAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABPbklEQVR4nO3deXxUVZ738W9lobJUEoILkYgkjhJAIgKiIsQRQRaV1mkGQRFBbKQdm6cbDY50KwRGGxHQ57EVl2aTlm4UUZumWaIooziCBEHWAYUEMCzdBqgsRbbKff6oVFnxZq+kkguf9+t1X97KOefWqcrV/Pyde86xGYZhCAAAAJYT0tIdAAAAQOMQyAEAAFgUgRwAAIBFEcgBAABYFIEcAACARRHIAQAAWBSBHAAAgEWFtXQHLnQVFRU6fvy4YmJiZLPZWro7AIBWzDAMFRQUqEOHDgoJab5cTHFxsUpLSwO+Tps2bRQREdEEPUJNCORa2PHjx9WxY8eW7gYAwEKOHTumyy+/vFmuXVxcrEsiI1XY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kxMbHGbvmX+bepzcGDB33nX331lW688Ua9++67cjqdioyM1Pfff6933nlH/fr10+zZs+t1zdbivAjkzp496/vi09LSlJKSUm29H374Qfv371dUVJRKSkp08OBBLVy4UL1799bTTz9dbRvvTRIfH1/jbFjpxxurrpuqpKTEdFMDAHC+6tixo+Li4nxHTYFSQUGB77y2v7f+Zf5tauP//PrMmTPVvn17rV+/XkVFRTp79qz279+vgQMHyjAM/fa3v7XUY1KWD+QqKio0duxYnThxQna7XX/4wx9Mda6++mq98MILOnDggIqLi5WXl6eioiJt2LBBvXv3lmEYeu655zR//nxTW+9NUttN5V9e1001e/bsKjd0x44d6/tRAQAInibKyB07dsy30oPT6fQ9Vx5M3iFb7/nKlSs1ZMgQhYR4wqAuXbror3/9qzp06CDJs/6sVVg+kPv1r3+tNWvWSJIWLFigHj16mOqMGTNGU6dOVefOnX1rw7Rp00aDBw/W5s2b1adPH0meX5zT6WzW/k6bNq3KDd3UM2wBAGgSIQpsxmplhBEbG1vlsNvt1b5dTEyM79y7Zmt1/Mv829TGv17//v110003mepER0frP/7jPyRJ33zzjU6dOlWva7c0Swdy6enpeuWVVyRJL730kiZMmNDga0REROj3v/+9JM9igD9dl8b7y6/tpvIvr+umstvtppsaAIALnTcbJkm5ubk11vMv829TG//n6ryTE6vjX3bkyJF6XbulWTaQe/LJJ31DoXPnztVvfvObRl/Lf62aw4cPVynz3iRnzpypNZjz3lj1vakAAGjVgjxrtWvXrr6hTv+Jhj/lLUtISKh1tyZ/3bp1U2ioZ2G72nZgMgzDd26VnZosGchNnTrVt4vCCy+8oPT09GZ7L/8p0LXNSPXeWLXNbAUAwDKCHMhFRUWpX79+kqT169dXW8cwDG3YsEGSNHjw4HpfOyIiQrfccoskad++fTXW279/vyRPEFfTbk+tjeUCufT0dM2bN0+SJ4ibOnVqwNfcsmWL79y7YrRX//79FRkZKanmG+vIkSO+X35DbiwAAPCjcePGSZI+/fRTbd261VS+cuVK38jZgw8+2KBrP/TQQ5I868NWt16cy+XSa6+9Jkm68cYbdckllzTo+i3FUoFcenq6bzh13rx59Qri/NOk1SkpKdHvfvc7SZ4HHQcOHFilPDo6WiNGjJAkvfbaa9VOhpgzZ44kz/Nx99xzT519AgCg1WuBLbrGjRun1NRUGYahESNG+J5b9840nThxoiTPAv0//XudkZEhm80mm82mnJwc07XHjBmjG264QZI0atQobdiwwTeb9X/
2023-05-24 19:59:04 +02:00
"text/plain": [
"<Figure size 640x480 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
2023-05-04 19:16:35 +02:00
}
],
2023-05-04 13:47:33 +02:00
"source": [
2023-05-24 19:59:04 +02:00
"fitCurve = fitAnalyser.eval(fitResult, x=np.arange(300), y=np.arange(300), dask=\"parallelized\").load()\n",
2023-05-24 16:54:29 +02:00
"\n",
"fitCurve.plot.pcolormesh(cmap='jet', vmin=0, col=scanAxis[0], row=scanAxis[1])"
2023-05-04 13:47:33 +02:00
]
},
{
2023-05-24 16:54:29 +02:00
"cell_type": "code",
2023-06-16 11:23:43 +02:00
"execution_count": 80,
2023-05-04 13:47:33 +02:00
"metadata": {},
2023-05-24 16:54:29 +02:00
"outputs": [],
2023-05-04 13:47:33 +02:00
"source": [
2023-05-24 16:54:29 +02:00
"fitModel2 = Polylog22dModel(prefix='thermal_')\n",
"fitAnalyser2 = FitAnalyser(fitModel2, fitDim=2)\n",
2023-05-24 19:59:04 +02:00
"fitCurve2 = fitAnalyser2.eval(fitResult, x=np.arange(100), y=np.arange(100), dask=\"parallelized\").load()\n",
"\n",
"fitModel3 = ThomasFermi2dModel(prefix='BEC_')\n",
"fitAnalyser3 = FitAnalyser(fitModel3, fitDim=2)\n",
"fitCurve3 = fitAnalyser3.eval(fitResult, x=np.arange(100), y=np.arange(100), dask=\"parallelized\").load()"
2023-05-04 13:47:33 +02:00
]
},
{
"cell_type": "code",
2023-06-16 11:23:43 +02:00
"execution_count": 55,
2023-05-04 13:47:33 +02:00
"metadata": {},
2023-05-24 19:59:04 +02:00
"outputs": [
{
"data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XfDyaE6DbmGU263Cw7iqIAyf3nKhqbZ5o+/q4KgM/WVfPIp1pGu3l5bs8awWt8YeN2R4ZsCiG6T68Zbrls2TJ+8pOfANpGu7m5uTQ1NeH3+41jRo4cycsvv0xZWVnKc/Py8njzzTc5/vjjWb16NTNmzCAnJ4dgMEgkoi0xnj17Nvfdd1/3/UBCiG6VnmlKp6+gq0hstVLlDfFteSOHjSmmwG2nLjGO4L+LtvGTI0Z3eiN4jT+Z4fKHoxRkO/bo9YQQna9XZJoGDRrECy+8wFVXXcX+++9PcXExjY2NxONxhg0bximnnMLjjz/OqlWr2HfffTO+xv7778+qVau47rrrGDt2LJFIhOzsbA477DAee+wx3nnnnZRJ4kKIvmVnYguVQfktBE2JTJNenvvly8u54ImFfLmhhvqm5Pymap/2eGf3NOmbCQP4Q7IST4i9Ua/INDkcDs466yzOOuusPXqd0tJS7r33Xu69995OOjMhRG9RmwhKij2ZL45K02Y1fbtL21dy0eY6zC2V3mCUcDTe6avnUspzsgGwEHulXpFpEkKIPaGqqlFeK2yh7KU3glc0BonE4pQnepu+LdeCpzyXHYvW/kR9INz55TlfsjwXkEyTEHslCZqEEH1eYzBKLK6li/Ld9ozHJBvBQ5Q3BEkczppExqnY46DArQVcNf5ws0yTeSL4go01/Py/36QEQm0xl+d80gguxF5JgiYhRJ9XlwhI3A4rWXZrxmP0RvCGpgjrq3zG/VtqtVV3RdlOI0tV5w8bPU12q5Z+MpfnHvtsE698vYN3Vpa3+xzN5bmAlOeE2CtJ0CSE6PPqAlpAome
2023-05-24 19:59:04 +02:00
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2023-06-16 11:23:43 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAk0AAAHECAYAAAAkrR7VAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXB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qCEED0gUA/r/6PdPuv2lIfWH2o0gqFdVV6KshzGY//z7Aa2lLlZfPvZTCnOoqxl0BSK8p2n1+MPRXlq5aFWL5vjspLjsgKwv1ZrJ6BNz2nP42sxvceMG+Cj32hZsR2vw5TPH/ePLIToHfpkpqmoqIhBgwaRlpbYKuG8887jD3/4AyUlJSnHer1e47bL5Wr3OZMfSz6npZ/85Ce43W7j6/Dhw8fzIwghjte6f0HYD4OmwqjzUh56YU3i/RhL6r0WjsbYUaFlhQ/GM0jljVqwk5+ufcgKhCL4Q6n7xplNinFbURRy4pkmfVovL93edqYJtK1czrhVu738DyC94ITo8/pk0FRaWkplZSU+n4+qqioeeughNm7cyKxZs/j5z39+Ul/bbreTmZmZ8iWE6CaRIKz6q3b7rNsJRmM8veogRxoC+IMRFm9OZJabkwKgg3V+IjEtaKnza1nq8njd09hCLavsD0XJT7cZ51jNCh/ceS5zx+Zz3+WTAciOZ5p0+Wk2oxC8ZcAFwKxbwOrS9qTb/+GJ/ORCiF6gTwZNyQoLC7nzzjt55513UBSFX/3qVyktBzIyEsuEA4FAW0/R6rHkc4QQvciWF8FXBRlDYMpVvLutip+9upUH3tnFR7tqUgKX5kjitt4iAKDWFwISmaYx8aCpKRRJmWK
2023-05-24 19:59:04 +02:00
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-05-04 13:47:33 +02:00
"source": [
2023-05-24 19:59:04 +02:00
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"\n",
"dataSet_cropOD.sum(dim='x').plot(ax=ax, col=scanAxis[0], row=scanAxis[1])\n",
"fitCurve.sum(dim='x').plot(ax=ax, col=scanAxis[0], row=scanAxis[1])\n",
"fitCurve2.sum(dim='x').plot(ax=ax, col=scanAxis[0], row=scanAxis[1])\n",
"fitCurve3.sum(dim='x').plot(ax=ax, col=scanAxis[0], row=scanAxis[1])\n",
"\n",
"plt.show()\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"\n",
"dataSet_cropOD.sum(dim='y').plot(ax=ax, col=scanAxis[0], row=scanAxis[1])\n",
"fitCurve.sum(dim='y').plot(ax=ax, col=scanAxis[0], row=scanAxis[1])\n",
"fitCurve2.sum(dim='y').plot(ax=ax, col=scanAxis[0], row=scanAxis[1])\n",
"fitCurve3.sum(dim='y').plot(ax=ax, col=scanAxis[0], row=scanAxis[1])\n",
"\n",
"plt.show()"
2023-05-04 13:47:33 +02:00
]
},
{
"cell_type": "code",
2023-06-16 11:23:43 +02:00
"execution_count": 56,
2023-05-04 13:47:33 +02:00
"metadata": {},
2023-05-24 19:59:04 +02:00
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\data\\AppData\\Roaming\\Python\\Python39\\site-packages\\numpy\\lib\\function_base.py:2246: RuntimeWarning: invalid value encountered in _get_fit_full_result_single (vectorized)\n",
" outputs = ufunc(*inputs)\n"
]
}
],
2023-04-24 13:03:23 +02:00
"source": [
2023-05-24 19:59:04 +02:00
"value = fitAnalyser.get_fit_full_result(fitResult)"
]
},
{
"cell_type": "code",
2023-06-16 11:23:43 +02:00
"execution_count": 57,
2023-05-24 19:59:04 +02:00
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
"<defs>\n",
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
"<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"</symbol>\n",
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
"<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"</symbol>\n",
"</defs>\n",
"</svg>\n",
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
" *\n",
" */\n",
"\n",
":root {\n",
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
" --xr-background-color: var(--jp-layout-color0, white);\n",
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
"}\n",
"\n",
"html[theme=dark],\n",
"body[data-theme=dark],\n",
"body.vscode-dark {\n",
" --xr-font-color0: rgba(255, 255, 255, 1);\n",
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
" --xr-border-color: #1F1F1F;\n",
" --xr-disabled-color: #515151;\n",
" --xr-background-color: #111111;\n",
" --xr-background-color-row-even: #111111;\n",
" --xr-background-color-row-odd: #313131;\n",
"}\n",
"\n",
".xr-wrap {\n",
" display: block !important;\n",
" min-width: 300px;\n",
" max-width: 700px;\n",
"}\n",
"\n",
".xr-text-repr-fallback {\n",
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
" display: none;\n",
"}\n",
"\n",
".xr-header {\n",
" padding-top: 6px;\n",
" padding-bottom: 6px;\n",
" margin-bottom: 4px;\n",
" border-bottom: solid 1px var(--xr-border-color);\n",
"}\n",
"\n",
".xr-header > div,\n",
".xr-header > ul {\n",
" display: inline;\n",
" margin-top: 0;\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-obj-type,\n",
".xr-array-name {\n",
" margin-left: 2px;\n",
" margin-right: 10px;\n",
"}\n",
"\n",
".xr-obj-type {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-sections {\n",
" padding-left: 0 !important;\n",
" display: grid;\n",
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-item input + label {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label {\n",
" cursor: pointer;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label:hover {\n",
" color: var(--xr-font-color0);\n",
"}\n",
"\n",
".xr-section-summary {\n",
" grid-column: 1;\n",
" color: var(--xr-font-color2);\n",
" font-weight: 500;\n",
"}\n",
"\n",
".xr-section-summary > span {\n",
" display: inline-block;\n",
" padding-left: 0.5em;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-summary-in + label:before {\n",
" display: inline-block;\n",
" content: 'â–º';\n",
" font-size: 11px;\n",
" width: 15px;\n",
" text-align: center;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label:before {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label:before {\n",
" content: 'â–¼';\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label > span {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-summary,\n",
".xr-section-inline-details {\n",
" padding-top: 4px;\n",
" padding-bottom: 4px;\n",
"}\n",
"\n",
".xr-section-inline-details {\n",
" grid-column: 2 / -1;\n",
"}\n",
"\n",
".xr-section-details {\n",
" display: none;\n",
" grid-column: 1 / -1;\n",
" margin-bottom: 5px;\n",
"}\n",
"\n",
".xr-section-summary-in:checked ~ .xr-section-details {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-array-wrap {\n",
" grid-column: 1 / -1;\n",
" display: grid;\n",
" grid-template-columns: 20px auto;\n",
"}\n",
"\n",
".xr-array-wrap > label {\n",
" grid-column: 1;\n",
" vertical-align: top;\n",
"}\n",
"\n",
".xr-preview {\n",
" color: var(--xr-font-color3);\n",
"}\n",
"\n",
".xr-array-preview,\n",
".xr-array-data {\n",
" padding: 0 5px !important;\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-array-data,\n",
".xr-array-in:checked ~ .xr-array-preview {\n",
" display: none;\n",
"}\n",
"\n",
".xr-array-in:checked ~ .xr-array-data,\n",
".xr-array-preview {\n",
" display: inline-block;\n",
"}\n",
"\n",
".xr-dim-list {\n",
" display: inline-block !important;\n",
" list-style: none;\n",
" padding: 0 !important;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list li {\n",
" display: inline-block;\n",
" padding: 0;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list:before {\n",
" content: '(';\n",
"}\n",
"\n",
".xr-dim-list:after {\n",
" content: ')';\n",
"}\n",
"\n",
".xr-dim-list li:not(:last-child):after {\n",
" content: ',';\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-has-index {\n",
" font-weight: bold;\n",
"}\n",
"\n",
".xr-var-list,\n",
".xr-var-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-var-item > div,\n",
".xr-var-item label,\n",
".xr-var-item > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-even);\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-var-item > .xr-var-name:hover span {\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-var-list > li:nth-child(odd) > div,\n",
".xr-var-list > li:nth-child(odd) > label,\n",
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-odd);\n",
"}\n",
"\n",
".xr-var-name {\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-var-dims {\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-var-dtype {\n",
" grid-column: 3;\n",
" text-align: right;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-preview {\n",
" grid-column: 4;\n",
"}\n",
"\n",
".xr-index-preview {\n",
" grid-column: 2 / 5;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-name,\n",
".xr-var-dims,\n",
".xr-var-dtype,\n",
".xr-preview,\n",
".xr-attrs dt {\n",
" white-space: nowrap;\n",
" overflow: hidden;\n",
" text-overflow: ellipsis;\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-var-name:hover,\n",
".xr-var-dims:hover,\n",
".xr-var-dtype:hover,\n",
".xr-attrs dt:hover {\n",
" overflow: visible;\n",
" width: auto;\n",
" z-index: 1;\n",
"}\n",
"\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-data {\n",
" display: none;\n",
" background-color: var(--xr-background-color) !important;\n",
" padding-bottom: 5px !important;\n",
"}\n",
"\n",
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
".xr-var-data-in:checked ~ .xr-var-data,\n",
".xr-index-data-in:checked ~ .xr-index-data {\n",
" display: block;\n",
"}\n",
"\n",
".xr-var-data > table {\n",
" float: right;\n",
"}\n",
"\n",
".xr-var-name span,\n",
".xr-var-data,\n",
".xr-index-name div,\n",
".xr-index-data,\n",
".xr-attrs {\n",
" padding-left: 25px !important;\n",
"}\n",
"\n",
".xr-attrs,\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-data {\n",
" grid-column: 1 / -1;\n",
"}\n",
"\n",
"dl.xr-attrs {\n",
" padding: 0;\n",
" margin: 0;\n",
" display: grid;\n",
" grid-template-columns: 125px auto;\n",
"}\n",
"\n",
".xr-attrs dt,\n",
".xr-attrs dd {\n",
" padding: 0;\n",
" margin: 0;\n",
" float: left;\n",
" padding-right: 10px;\n",
" width: auto;\n",
"}\n",
"\n",
".xr-attrs dt {\n",
" font-weight: normal;\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-attrs dt:hover span {\n",
" display: inline-block;\n",
" background: var(--xr-background-color);\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-attrs dd {\n",
" grid-column: 2;\n",
" white-space: pre-wrap;\n",
" word-break: break-all;\n",
"}\n",
"\n",
".xr-icon-database,\n",
".xr-icon-file-text2,\n",
".xr-no-icon {\n",
" display: inline-block;\n",
" vertical-align: middle;\n",
" width: 1em;\n",
" height: 1.5em !important;\n",
" stroke-width: 0;\n",
" stroke: currentColor;\n",
" fill: currentColor;\n",
"}\n",
"</style><pre class='xr-text-repr-fallback'><xarray.Dataset>\n",
"Dimensions: ()\n",
"Data variables:\n",
" BEC_amplitude object 0.0+/-nan\n",
2023-06-16 11:23:43 +02:00
" thermal_amplitude object 2104.548431645919+/-nan\n",
2023-05-24 19:59:04 +02:00
" BEC_centerx object 146.94301032591366+/-nan\n",
" BEC_centery object 147.47224593536436+/-nan\n",
2023-06-16 11:23:43 +02:00
" thermal_centerx object 146.27287010988167+/-nan\n",
" thermal_centery object 148.78153517037947+/-nan\n",
2023-05-24 19:59:04 +02:00
" BEC_sigmax object 17.155488681677085+/-nan\n",
" BEC_sigmay object 18.315601451967396+/-nan\n",
2023-06-16 11:23:43 +02:00
" thermal_sigmax object 42.999686622150065+/-nan\n",
" thermal_sigmay object 51.599623946580074+/-nan\n",
2023-05-24 19:59:04 +02:00
" thermalAspectRatio object 1.2+/-nan\n",
2023-06-16 11:23:43 +02:00
" condensate_fraction object 0.0+/-nan\n",
"Attributes:\n",
" IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n",
" IMAGE_VERSION: 1.2\n",
" IMAGE_WHITE_IS_ZERO: 0\n",
" x_start: 810\n",
" x_end: 1110\n",
" y_end: 1025\n",
" y_start: 725\n",
" x_center: 960\n",
" y_center: 875\n",
" x_span: 300\n",
" y_span: 300</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-53523a01-2c07-4165-91ae-60ce98257240' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-53523a01-2c07-4165-91ae-60ce98257240' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-448573c2-6f7b-479e-ae18-5c693d5ebbdb' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-448573c2-6f7b-479e-ae18-5c693d5ebbdb' class='xr-section-summary' title='Expand/collapse section'>Coordinates: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'></ul></div></li><li class='xr-section-item'><input id='section-f81fa7c4-b59b-456c-929b-d5fdf0999ba7' class='xr-section-summary-in' type='checkbox' checked><label for='section-f81fa7c4-b59b-456c-929b-d5fdf0999ba7' class='xr-section-summary' >Data variables: <span>(12)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>BEC_amplitude</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>0.0+/-nan</div><input id='attrs-ae17e55d-accd-49e8-9a73-373506561892' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ae17e55d-accd-49e8-9a73-373506561892' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4d309f58-8d37-475d-9462-884f4ad37e77' class='xr-var-data-in' type='checkbox'><label for='data-4d309f58-8d37-475d-9462-884f4ad37e77' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(0.0+/-nan, dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>thermal_amplitude</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>2104.548431645919+/-nan</div><input id='attrs-ce8230fc-40ed-4545-8712-ec500a361b66' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ce8230fc-40ed-4545-8712-ec500a361b66' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c4d45705-76ae-4681-a822-8d9af1dbbece' class='xr-var-data-in' type='checkbox'><label for='data-c4d45705-76ae-4681-a822-8d9af1dbbece' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(2104.548431645919+/-nan, dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>BEC_centerx</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>146.94301032591366+/-nan</div><input id='attrs-d3679e45-9660-4dc8-9900-6ff9b96700a5' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-d3679e45-9660-4dc8-9900-6ff9b96700a5' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2d54cdcf-9b44-4720-b151-cdd4cfffd6be' class='xr-var-data-in' type='checkbox'><label for='data-2d54cdcf-9b44-4720-b151-cdd4cfffd6be' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(146.94301032591366+/-nan, dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name
2023-05-24 19:59:04 +02:00
],
"text/plain": [
"<xarray.Dataset>\n",
"Dimensions: ()\n",
"Data variables:\n",
" BEC_amplitude object 0.0+/-nan\n",
2023-06-16 11:23:43 +02:00
" thermal_amplitude object 2104.548431645919+/-nan\n",
2023-05-24 19:59:04 +02:00
" BEC_centerx object 146.94301032591366+/-nan\n",
" BEC_centery object 147.47224593536436+/-nan\n",
2023-06-16 11:23:43 +02:00
" thermal_centerx object 146.27287010988167+/-nan\n",
" thermal_centery object 148.78153517037947+/-nan\n",
2023-05-24 19:59:04 +02:00
" BEC_sigmax object 17.155488681677085+/-nan\n",
" BEC_sigmay object 18.315601451967396+/-nan\n",
2023-06-16 11:23:43 +02:00
" thermal_sigmax object 42.999686622150065+/-nan\n",
" thermal_sigmay object 51.599623946580074+/-nan\n",
2023-05-24 19:59:04 +02:00
" thermalAspectRatio object 1.2+/-nan\n",
2023-06-16 11:23:43 +02:00
" condensate_fraction object 0.0+/-nan\n",
"Attributes:\n",
" IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n",
" IMAGE_VERSION: 1.2\n",
" IMAGE_WHITE_IS_ZERO: 0\n",
" x_start: 810\n",
" x_end: 1110\n",
" y_end: 1025\n",
" y_start: 725\n",
" x_center: 960\n",
" y_center: 875\n",
" x_span: 300\n",
" y_span: 300"
2023-05-24 19:59:04 +02:00
]
},
2023-06-16 11:23:43 +02:00
"execution_count": 57,
2023-05-24 19:59:04 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"value"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"ename": "ValueError",
"evalue": "unable to infer dtype on variable 'OD'; xarray cannot serialize arbitrary Python objects",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mValueError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32mf:\\Jianshun\\analyseScript\\test.ipynb Cell 25\u001b[0m in \u001b[0;36m1\n\u001b[1;32m----> <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/test.ipynb#Y216sZmlsZQ%3D%3D?line=0'>1</a>\u001b[0m fitResult\u001b[39m.\u001b[39;49mto_netcdf(\u001b[39m\"\u001b[39;49m\u001b[39msaved_on_disk.nc\u001b[39;49m\u001b[39m\"\u001b[39;49m)\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\core\\dataarray.py:3959\u001b[0m, in \u001b[0;36mDataArray.to_netcdf\u001b[1;34m(self, path, mode, format, group, engine, encoding, unlimited_dims, compute, invalid_netcdf)\u001b[0m\n\u001b[0;32m 3955\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[0;32m 3956\u001b[0m \u001b[39m# No problems with the name - so we're fine!\u001b[39;00m\n\u001b[0;32m 3957\u001b[0m dataset \u001b[39m=\u001b[39m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mto_dataset()\n\u001b[1;32m-> 3959\u001b[0m \u001b[39mreturn\u001b[39;00m to_netcdf( \u001b[39m# type: ignore # mypy cannot resolve the overloads:(\u001b[39;49;00m\n\u001b[0;32m 3960\u001b[0m dataset,\n\u001b[0;32m 3961\u001b[0m path,\n\u001b[0;32m 3962\u001b[0m mode\u001b[39m=\u001b[39;49mmode,\n\u001b[0;32m 3963\u001b[0m \u001b[39mformat\u001b[39;49m\u001b[39m=\u001b[39;49m\u001b[39mformat\u001b[39;49m,\n\u001b[0;32m 3964\u001b[0m group\u001b[39m=\u001b[39;49mgroup,\n\u001b[0;32m 3965\u001b[0m engine\u001b[39m=\u001b[39;49mengine,\n\u001b[0;32m 3966\u001b[0m encoding\u001b[39m=\u001b[39;49mencoding,\n\u001b[0;32m 3967\u001b[0m unlimited_dims\u001b[39m=\u001b[39;49munlimited_dims,\n\u001b[0;32m 3968\u001b[0m compute\u001b[39m=\u001b[39;49mcompute,\n\u001b[0;32m 3969\u001b[0m multifile\u001b[39m=\u001b[39;49m\u001b[39mFalse\u001b[39;49;00m,\n\u001b[0;32m 3970\u001b[0m invalid_netcdf\u001b[39m=\u001b[39;49minvalid_netcdf,\n\u001b[0;32m 3971\u001b[0m )\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\backends\\api.py:1216\u001b[0m, in \u001b[0;36mto_netcdf\u001b[1;34m(dataset, path_or_file, mode, format, group, engine, encoding, unlimited_dims, compute, multifile, invalid_netcdf)\u001b[0m\n\u001b[0;32m 1211\u001b[0m \u001b[39m# TODO: figure out how to refactor this logic (here and in save_mfdataset)\u001b[39;00m\n\u001b[0;32m 1212\u001b[0m \u001b[39m# to avoid this mess of conditionals\u001b[39;00m\n\u001b[0;32m 1213\u001b[0m \u001b[39mtry\u001b[39;00m:\n\u001b[0;32m 1214\u001b[0m \u001b[39m# TODO: allow this work (setting up the file for writing array data)\u001b[39;00m\n\u001b[0;32m 1215\u001b[0m \u001b[39m# to be parallelized with dask\u001b[39;00m\n\u001b[1;32m-> 1216\u001b[0m dump_to_store(\n\u001b[0;32m 1217\u001b[0m dataset, store, writer, encoding\u001b[39m=\u001b[39;49mencoding, unlimited_dims\u001b[39m=\u001b[39;49munlimited_dims\n\u001b[0;32m 1218\u001b[0m )\n\u001b[0;32m 1219\u001b[0m \u001b[39mif\u001b[39;00m autoclose:\n\u001b[0;32m 1220\u001b[0m store\u001b[39m.\u001b[39mclose()\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\backends\\api.py:1263\u001b[0m, in \u001b[0;36mdump_to_store\u001b[1;34m(dataset, store, writer, encoder, encoding, unlimited_dims)\u001b[0m\n\u001b[0;32m 1260\u001b[0m \u001b[39mif\u001b[39;00m encoder:\n\u001b[0;32m 1261\u001b[0m variables, attrs \u001b[39m=\u001b[39m encoder(variables, attrs)\n\u001b[1;32m-> 1263\u001b[0m store\u001b[39m.\u001b[39;49mstore(variables, attrs, check_encoding, writer, unlimited_dims\u001b[39m=\u001b[39;49munlimited_dims)\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\backends\\common.py:269\u001b[0m, in \u001b[0;36mAbstractWritableDataStore.store\u001b[1;34m(self, variables, attributes, check_encoding_set, writer, unlimited_dims)\u001b[0m\n\u001b[0;32m 266\u001b[0m \u001b[39mif\u001b[39;00m writer \u001b[39mis\u001b[39;00m \u001b[39mNone\u001b[39;00m:\n\u001b[0;32m 267\u001b[0m writer \u001b[39m=\u001b[39m ArrayWriter()\n\u001b[1;32m--> 269\u001b[0m variables, attributes \u001b[39m=\u001b[39m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mencode(variables, attributes)\n\u001b[0;32m 271\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mset_attributes(attributes)\n\u001b[0;32m 272\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mset_dimensions(variables, unlimited_dims\u001b[39m=\u001b[39munlimited_dims)\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\backends\\common.py:358\u001b[0m, in \u001b[0;36mWritableCFDataStore.encode\u001b[1;34m(self, variables, attributes)\u001b[0m\n\u001b[0;32m 355\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39mencode\u001b[39m(\u001b[39mself\u001b[39m, variables, attributes):\n\u001b[0;32m 356\u001b[0m \u001b[39m# All NetCDF files get CF encoded by default, without this attempting\u001b[39;00m\n\u001b[0;32m 357\u001b[0m \u001b[39m# to write times, for example, would fail.\u001b[39;00m\n\u001b[1;32m--> 358\u001b[0m variables, attributes \u001b[39m=\u001b[39m cf_encoder(variables, attributes)\n\u001b[0;32m 359\u001b[0m variables \u001b[39m=\u001b[39m {k: \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mencode_variable(v) \u001b[39mfor\u001b[39;00m k, v \u001b[39min\u001b[39;00m variables\u001b[39m.\u001b[39mitems()}\n\u001b[0;32m 360\u001b[0m attributes \u001b[39m=\u001b[39m {k: \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mencode_attribute(v) \u001b[39mfor\u001b[39;00m k, v \u001b[39min\u001b[39;00m attributes\u001b[39m.\u001b[39mitems()}\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\conventions.py:775\u001b[0m, in \u001b[0;36mcf_encoder\u001b[1;34m(variables, attributes)\u001b[0m\n\u001b[0;32m 772\u001b[0m \u001b[39m# add encoding for time bounds variables if present.\u001b[39;00m\n\u001b[0;32m 773\u001b[0m _update_bounds_encoding(variables)\n\u001b[1;32m--> 775\u001b[0m new_vars \u001b[39m=\u001b[39m {k: encode_cf_variable(v, name\u001b[39m=\u001b[39mk) \u001b[39mfor\u001b[39;00m k, v \u001b[39min\u001b[39;00m variables\u001b[39m.\u001b[39mitems()}\n\u001b[0;32m 777\u001b[0m \u001b[39m# Remove attrs from bounds variables (issue #2921)\u001b[39;00m\n\u001b[0;32m 778\u001b[0m \u001b[39mfor\u001b[39;00m var \u001b[39min\u001b[39;00m new_vars\u001b[39m.\u001b[39mvalues():\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\conventions.py:775\u001b[0m, in \u001b[0;36m<dictcomp>\u001b[1;34m(.0)\u001b[0m\n\u001b[0;32m 772\u001b[0m \u001b[39m# add encoding for time bounds variables if present.\u001b[39;00m\n\u001b[0;32m 773\u001b[0m _update_bounds_encoding(variables)\n\u001b[1;32m--> 775\u001b[0m new_vars \u001b[39m=\u001b[39m {k: encode_cf_variable(v, name\u001b[39m=\u001b[39;49mk) \u001b[39mfor\u001b[39;00m k, v \u001b[39min\u001b[39;00m variables\u001b[39m.\u001b[39mitems()}\n\u001b[0;32m 777\u001b[0m \u001b[39m# Remove attrs from bounds variables (issue #2921)\u001b[39;00m\n\u001b[0;32m 778\u001b[0m \u001b[39mfor\u001b[39;00m var \u001b[39min\u001b[39;00m new_vars\u001b[39m.\u001b[39mvalues():\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\conventions.py:189\u001b[0m, in \u001b[0;36mencode_cf_variable\u001b[1;34m(var, needs_copy, name)\u001b[0m\n\u001b[0;32m 186\u001b[0m var \u001b[39m=\u001b[39m coder\u001b[39m.\u001b[39mencode(var, name\u001b[39m=\u001b[39mname)\n\u001b[0;32m 188\u001b[0m \u001b[39m# TODO(kmuehlbauer): check if ensure_dtype_not_object can be moved to backends:\u001b[39;00m\n\u001b[1;32m--> 189\u001b[0m var \u001b[39m=\u001b[39m ensure_dtype_not_object(var, name\u001b[39m=\u001b[39;49mname)\n\u001b[0;32m 191\u001b[0m \u001b[39mfor\u001b[39;00m attr_name \u001b[39min\u001b[39;00m CF_RELATED_DATA:\n\u001b[0;32m 192\u001b[0m pop_to(var\u001b[39m.\u001b[39mencoding, var\u001b[39m.\u001b[39mattrs, attr_name)\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\conventions.py:145\u001b[0m, in \u001b[0;36mensure_dtype_not_object\u001b[1;34m(var, name)\u001b[0m\n\u001b[0;32m 143\u001b[0m data[missing] \u001b[39m=\u001b[39m fill_value\n\u001b[0;32m 144\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[1;32m--> 145\u001b[0m data \u001b[39m=\u001b[39m _copy_with_dtype(data, dtype\u001b[39m=\u001b[39m_infer_dtype(data, name))\n\u001b[0;32m 147\u001b[0m \u001b[39massert\u001b[39;00m data\u001b[39m.\u001b[39mdtype\u001b[39m.\u001b[39mkind \u001b[39m!=\u001b[39m \u001b[39m\"\u001b[39m\u001b[39mO\u001b[39m\u001b[39m\"\u001b[39m \u001b[39mor\u001b[39;00m data\u001b[39m.\u001b[39mdtype\u001b[39m.\u001b[39mmetadata\n\u001b[0;32m 148\u001b[0m var \u001b[39m=\u001b[39m Variable(dims, data, attrs, encoding, fastpath\u001b[39m=\u001b[39m\u001b[39mTrue\u001b[39;00m)\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\conventions.py:77\u001b[0m, in \u001b[0;36m_infer_dtype\u001b[1;34m(array, name)\u001b[0m\n\u001b[0;32m 74\u001b[0m \u001b[39mif\u001b[39;00m dtype\u001b[39m.\u001b[39mkind \u001b[39m!=\u001b[39m \u001b[39m\"\u001b[39m\u001b[39mO\u001b[39m\u001b[39m\"\u001b[39m:\n\u001b[0;32m 75\u001b[0m \u001b[39mreturn\u001b[39;00m dtype\n\u001b[1;32m---> 77\u001b[0m \u001b[39mraise\u001b[39;00m \u001b[39mValueError\u001b[39;00m(\n\u001b[0;32m 78\u001b[0m \u001b[39m\"\u001b[39m\u001b[39munable to infer dtype on variable \u001b[39m\u001b[39m{!r}\u001b[39;00m\u001b[39m; xarray \u001b[39m\u001b[39m\"\u001b[39m\n\u001b[0;32m 79\u001b[0m \u001b[39m\"\u001b[39m\u001b[39mcannot serialize arbitrary Python objects\u001b[39m\u001b[39m\"\u001b[39m\u001b[39m.\u001b[39mformat(name)\n\u001b[0;32m 80\u001b[0m )\n",
"\u001b[1;31mValueError\u001b[0m: unable to infer dtype on variable 'OD'; xarray cannot serialize arbitrary Python objects"
]
}
],
"source": [
"fitResult.to_netcdf(\"saved_on_disk.nc\")"
2023-05-04 13:47:33 +02:00
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
2023-05-24 16:54:29 +02:00
"# Get the Ncount"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"Ncount = dataSet_crop.OD.sum(dim=(scanAxis[0], 'x', 'y'))"
2023-04-24 13:03:23 +02:00
]
},
{
"cell_type": "code",
2023-05-07 23:41:31 +02:00
"execution_count": null,
2023-04-24 13:03:23 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-05-24 16:54:29 +02:00
"Ncount.load()\n",
2023-05-05 18:25:03 +02:00
"\n",
2023-05-24 16:54:29 +02:00
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount.plot(ax=ax)"
2023-05-05 18:25:03 +02:00
]
},
{
"cell_type": "code",
2023-05-07 23:41:31 +02:00
"execution_count": null,
2023-05-05 18:25:03 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-05-24 16:54:29 +02:00
"fitAnalyser = FitAnalyser(\"Lorentzian With Offset\")\n",
"params = fitAnalyser.guess(Ncount, x='runs', dask=\"parallelized\", guess_kwargs=dict(negative=True))"
2023-05-05 18:25:03 +02:00
]
},
{
"cell_type": "code",
2023-05-07 23:41:31 +02:00
"execution_count": null,
2023-05-05 18:25:03 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-05-24 16:54:29 +02:00
"fitResult = fitAnalyser.fit(Ncount, params, x='runs', dask=\"parallelized\")\n",
"fitCurve = fitAnalyser.eval(fitResult, x=np.arange(40), dask=\"parallelized\").load()"
2023-05-04 13:47:33 +02:00
]
},
{
"cell_type": "code",
2023-05-07 23:41:31 +02:00
"execution_count": null,
2023-05-04 13:47:33 +02:00
"metadata": {},
2023-05-07 23:41:31 +02:00
"outputs": [],
2023-05-06 11:23:38 +02:00
"source": [
2023-05-24 16:54:29 +02:00
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"plt.errorbar([1], [1], yerr=[1])"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"fitCurve.plot.errorbar(yerr=fitCurve)"
2023-05-06 11:23:38 +02:00
]
},
{
"cell_type": "code",
2023-05-07 23:41:31 +02:00
"execution_count": null,
2023-05-07 00:38:52 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-05-24 16:54:29 +02:00
"np.ufunc(fitCurve)"
2023-05-07 00:38:52 +02:00
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
2023-05-24 16:54:29 +02:00
"# Read CSV"
2023-05-07 00:38:52 +02:00
]
},
{
"cell_type": "code",
2023-05-07 23:41:31 +02:00
"execution_count": null,
2023-05-07 00:38:52 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-05-24 16:54:29 +02:00
"# filePath = 'Z:/Dy_Lab/Data/Measurements/Experiments/DyBEC/BEC Stability Check/20230509-0007/*.csv'\n",
"\n",
"# filePath = np.sort(glob.glob(filePath))\n",
"\n",
"# read_csv_file(filePath, maxFileNum=5, csvEngine='pandas', csvKwargs=dict(header=[0,1], na_filter=False, index_col=0))\n",
"# read_csv_file(filePath, csvEngine='dask')"
2023-05-07 00:38:52 +02:00
]
},
{
"cell_type": "code",
2023-05-07 23:41:31 +02:00
"execution_count": null,
2023-05-06 11:23:38 +02:00
"metadata": {},
2023-05-07 23:41:31 +02:00
"outputs": [],
2023-05-04 13:47:33 +02:00
"source": [
2023-05-24 16:54:29 +02:00
"filePath = 'Z:/Dy_Lab/Data/Measurements/Experiments/DyBEC/BEC Stability Check/20230509-0007/*.csv'\n",
2023-05-05 18:25:03 +02:00
"\n",
2023-05-24 16:54:29 +02:00
"filePath = np.sort(glob.glob(filePath))\n",
"\n",
"data = np.empty(filePath.shape,dtype=object)\n",
"\n",
"i = 0\n",
"for fp in filePath:\n",
" data_single = pd.read_csv(fp)\n",
" data_single = xr.Dataset.from_dataframe(data_single)\n",
" data_single = data_single.drop_isel(index=0)\n",
" # data_single = data_single.expand_dims(dim='runs')\n",
" data[i] = data_single\n",
" i = i + 1\n",
"\n",
"data = xr.concat(data, 'runs')\n",
"\n",
"data = data.assign_coords(dict(index=data.Time.isel(runs=0).astype(float))).rename(dict(index='time')).astype(float)"
2023-05-05 18:25:03 +02:00
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
2023-05-24 16:54:29 +02:00
"data"
2023-05-05 18:25:03 +02:00
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
2023-05-24 16:54:29 +02:00
"arm2_mean = data['Channel A'].mean(dim='runs')\n",
"arm2_std = data['Channel A'].std(dim='runs')"
2023-05-05 18:25:03 +02:00
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
2023-05-24 16:54:29 +02:00
"arm2_mean.plot.errorbar(yerr=arm2_std, fmt='ob')"
2023-05-05 18:25:03 +02:00
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
2023-05-24 16:54:29 +02:00
"arm2_std.plot.errorbar(fmt='ob')"
2023-05-05 18:25:03 +02:00
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
2023-05-24 16:54:29 +02:00
"data['Channel A'].sel(time=4.55, method='nearest').plot.errorbar(fmt='ob')\n",
"\n",
"plt.ylim([0, 0.15])\n",
"plt.show()"
2023-04-24 13:03:23 +02:00
]
},
2023-05-24 16:54:29 +02:00
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
2023-06-29 11:54:10 +02:00
"execution_count": 9,
2023-05-24 16:54:29 +02:00
"metadata": {},
2023-06-29 11:54:10 +02:00
"outputs": [
{
"data": {
"text/plain": [
"0.6417497231450753+/-0.01090681927109203"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(-ufloat(99.835,0.018) + ufloat(99.969,0.014))/15*1e3\n",
"(-ufloat(99.835,0.018) + ufloat(100.994,0.008))/1.29/1.4"
]
2023-05-24 16:54:29 +02:00
},
{
"cell_type": "code",
2023-06-29 11:54:10 +02:00
"execution_count": 10,
2023-05-24 16:54:29 +02:00
"metadata": {},
2023-06-29 11:54:10 +02:00
"outputs": [
{
"data": {
"text/plain": [
"0.6267995570321101+/-0.01750984307955913"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(ufloat(99.835,0.018) - ufloat(98.703,0.026))/1.29/1.4"
]
2023-05-24 16:54:29 +02:00
},
{
"cell_type": "code",
2023-06-29 11:54:10 +02:00
"execution_count": 11,
2023-05-24 16:54:29 +02:00
"metadata": {},
2023-06-29 11:54:10 +02:00
"outputs": [
{
"data": {
"text/plain": [
"0.6342746400885927+/-0.010314471766443609"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"((ufloat(99.835,0.018) - ufloat(98.703,0.026))/1.29/1.4 + (-ufloat(99.835,0.018) + ufloat(100.994,0.008))/1.29/1.4) /2"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.642+/-0.011\n",
"0.627+/-0.018\n",
"0.634+/-0.010\n",
"0.0444+/-0.0007\n"
]
}
],
"source": [
"a = (-ufloat(99.835,0.018) + ufloat(100.994,0.008))/1.29/1.4\n",
"b = (ufloat(99.835,0.018) - ufloat(98.703,0.026))/1.29/1.4\n",
"\n",
"print(a)\n",
"print(b)\n",
"print((a+b)/2)\n",
"print((a+b)/2 * (1.29-1.24)*1.4)"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.637+/-0.011\n",
"0.641+/-0.018\n",
"0.639+/-0.010\n",
"0.0447+/-0.0007\n"
]
}
],
"source": [
"a = (-ufloat(99.969,0.018) + ufloat(101.120,0.008))/1.29/1.4\n",
"b = (ufloat(99.969,0.018) - ufloat(98.811,0.026))/1.29/1.4\n",
"\n",
"print(a)\n",
"print(b)\n",
"print((a+b)/2)\n",
"print((a+b)/2 * (1.29-1.24)*1.4)"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.0447+/-0.0007\n"
]
}
],
2023-05-24 16:54:29 +02:00
"source": []
},
2023-04-24 13:03:23 +02:00
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
2023-05-04 13:47:33 +02:00
"display_name": "env",
2023-04-24 13:03:23 +02:00
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
2023-06-16 11:23:43 +02:00
"version": "3.9.12"
2023-04-24 13:03:23 +02:00
},
2023-05-04 13:47:33 +02:00
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "c05913ad4f24fdc6b2418069394dc5835b1981849b107c9ba6df693aafd66650"
}
}
2023-04-24 13:03:23 +02:00
},
"nbformat": 4,
"nbformat_minor": 2
}