{
 "cells": [
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Import supporting package"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import xarray as xr\n",
    "import numpy as np\n",
    "import copy\n",
    "\n",
    "from uncertainties import ufloat\n",
    "from uncertainties import unumpy as unp\n",
    "from uncertainties import umath\n",
    "import random\n",
    "import matplotlib.pyplot as plt\n",
    "plt.rcParams['font.size'] = 12\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 NewFitModel, DensityProfileBEC2dModel\n",
    "from ToolFunction.ToolFunction import *\n",
    "\n",
    "from scipy.optimize import curve_fit\n",
    "\n",
    "from ToolFunction.HomeMadeXarrayFunction import errorbar, dataarray_plot_errorbar\n",
    "xr.plot.dataarray_plot.errorbar = errorbar\n",
    "xr.plot.accessor.DataArrayPlotAccessor.errorbar = dataarray_plot_errorbar\n",
    "\n",
    "imageAnalyser = ImageAnalyser()\n",
    "\n",
    "# %matplotlib notebook"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Start a client for parallel computing"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "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",
       "        <p style=\"color: #9D9D9D; margin-bottom: 0px;\">Client-b66089ef-4000-11ee-9814-80e82ce2fa8e</p>\n",
       "        <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",
       "                    <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:8787/status\" target=\"_blank\">http://127.0.0.1:8787/status</a>\n",
       "                </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",
       "        <p style=\"color: #9D9D9D; margin-bottom: 0px;\">2c2de3a6</p>\n",
       "        <table style=\"width: 100%; text-align: left;\">\n",
       "            <tr>\n",
       "                <td style=\"text-align: left;\">\n",
       "                    <strong>Dashboard:</strong> <a href=\"http://127.0.0.1:8787/status\" target=\"_blank\">http://127.0.0.1:8787/status</a>\n",
       "                </td>\n",
       "                <td style=\"text-align: left;\">\n",
       "                    <strong>Workers:</strong> 8\n",
       "                </td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                <td style=\"text-align: left;\">\n",
       "                    <strong>Total threads:</strong> 128\n",
       "                </td>\n",
       "                <td style=\"text-align: left;\">\n",
       "                    <strong>Total memory:</strong> 149.01 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",
       "            <p style=\"color: #9D9D9D; margin-bottom: 0px;\">Scheduler-426d0ae2-dc44-435c-a257-5550c48c51d6</p>\n",
       "            <table style=\"width: 100%; text-align: left;\">\n",
       "                <tr>\n",
       "                    <td style=\"text-align: left;\">\n",
       "                        <strong>Comm:</strong> tcp://127.0.0.1:62265\n",
       "                    </td>\n",
       "                    <td style=\"text-align: left;\">\n",
       "                        <strong>Workers:</strong> 8\n",
       "                    </td>\n",
       "                </tr>\n",
       "                <tr>\n",
       "                    <td style=\"text-align: left;\">\n",
       "                        <strong>Dashboard:</strong> <a href=\"http://127.0.0.1:8787/status\" target=\"_blank\">http://127.0.0.1:8787/status</a>\n",
       "                    </td>\n",
       "                    <td style=\"text-align: left;\">\n",
       "                        <strong>Total threads:</strong> 128\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> 149.01 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",
       "                            <strong>Comm: </strong> tcp://127.0.0.1:62318\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Total threads: </strong> 16\n",
       "                        </td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:62319/status\" target=\"_blank\">http://127.0.0.1:62319/status</a>\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Memory: </strong> 18.63 GiB\n",
       "                        </td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Nanny: </strong> tcp://127.0.0.1:62268\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\"></td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td colspan=\"2\" style=\"text-align: left;\">\n",
       "                            <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-po12jmk2\n",
       "                        </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",
       "                            <strong>Comm: </strong> tcp://127.0.0.1:62313\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Total threads: </strong> 16\n",
       "                        </td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:62315/status\" target=\"_blank\">http://127.0.0.1:62315/status</a>\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Memory: </strong> 18.63 GiB\n",
       "                        </td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Nanny: </strong> tcp://127.0.0.1:62269\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\"></td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td colspan=\"2\" style=\"text-align: left;\">\n",
       "                            <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-gw2s7vyv\n",
       "                        </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",
       "                            <strong>Comm: </strong> tcp://127.0.0.1:62300\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Total threads: </strong> 16\n",
       "                        </td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:62302/status\" target=\"_blank\">http://127.0.0.1:62302/status</a>\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Memory: </strong> 18.63 GiB\n",
       "                        </td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Nanny: </strong> tcp://127.0.0.1:62270\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\"></td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td colspan=\"2\" style=\"text-align: left;\">\n",
       "                            <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-cfh0nxcz\n",
       "                        </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",
       "                            <strong>Comm: </strong> tcp://127.0.0.1:62312\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Total threads: </strong> 16\n",
       "                        </td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:62314/status\" target=\"_blank\">http://127.0.0.1:62314/status</a>\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Memory: </strong> 18.63 GiB\n",
       "                        </td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Nanny: </strong> tcp://127.0.0.1:62271\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\"></td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td colspan=\"2\" style=\"text-align: left;\">\n",
       "                            <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-9zm5rjei\n",
       "                        </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",
       "                            <strong>Comm: </strong> tcp://127.0.0.1:62301\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Total threads: </strong> 16\n",
       "                        </td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:62303/status\" target=\"_blank\">http://127.0.0.1:62303/status</a>\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Memory: </strong> 18.63 GiB\n",
       "                        </td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Nanny: </strong> tcp://127.0.0.1:62272\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\"></td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td colspan=\"2\" style=\"text-align: left;\">\n",
       "                            <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-k9dnmkx4\n",
       "                        </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",
       "                            <strong>Comm: </strong> tcp://127.0.0.1:62321\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Total threads: </strong> 16\n",
       "                        </td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:62322/status\" target=\"_blank\">http://127.0.0.1:62322/status</a>\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Memory: </strong> 18.63 GiB\n",
       "                        </td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Nanny: </strong> tcp://127.0.0.1:62273\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\"></td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td colspan=\"2\" style=\"text-align: left;\">\n",
       "                            <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-s6ag_a96\n",
       "                        </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: 6</h4>\n",
       "                </summary>\n",
       "                <table style=\"width: 100%; text-align: left;\">\n",
       "                    <tr>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Comm: </strong> tcp://127.0.0.1:62307\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Total threads: </strong> 16\n",
       "                        </td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:62310/status\" target=\"_blank\">http://127.0.0.1:62310/status</a>\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Memory: </strong> 18.63 GiB\n",
       "                        </td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Nanny: </strong> tcp://127.0.0.1:62274\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\"></td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td colspan=\"2\" style=\"text-align: left;\">\n",
       "                            <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-ggzqb3hl\n",
       "                        </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: 7</h4>\n",
       "                </summary>\n",
       "                <table style=\"width: 100%; text-align: left;\">\n",
       "                    <tr>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Comm: </strong> tcp://127.0.0.1:62306\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Total threads: </strong> 16\n",
       "                        </td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:62308/status\" target=\"_blank\">http://127.0.0.1:62308/status</a>\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Memory: </strong> 18.63 GiB\n",
       "                        </td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td style=\"text-align: left;\">\n",
       "                            <strong>Nanny: </strong> tcp://127.0.0.1:62275\n",
       "                        </td>\n",
       "                        <td style=\"text-align: left;\"></td>\n",
       "                    </tr>\n",
       "                    <tr>\n",
       "                        <td colspan=\"2\" style=\"text-align: left;\">\n",
       "                            <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-dcr0glu5\n",
       "                        </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": [
       "<Client: 'tcp://127.0.0.1:62265' processes=8 threads=128, memory=149.01 GiB>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from dask.distributed import Client\n",
    "client = Client(n_workers=8, threads_per_worker=16, processes=True, memory_limit='20GB')\n",
    "client"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Start a client for Mongo DB"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pymongo\n",
    "import xarray_mongodb\n",
    "\n",
    "from DataContainer.MongoDB import MongoDB\n",
    "\n",
    "mongoClient = pymongo.MongoClient('mongodb://control:DyLab2021@127.0.0.1:27017/?authMechanism=DEFAULT')"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Set global path for experiment"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "groupList = [\n",
    "    \"images/MOT_3D_Camera/in_situ_absorption\",\n",
    "    \"images/ODT_1_Axis_Camera/in_situ_absorption\",\n",
    "    \"images/ODT_2_Axis_Camera/in_situ_absorption\",\n",
    "]\n",
    "\n",
    "dskey = {\n",
    "    \"images/MOT_3D_Camera/in_situ_absorption\": \"camera_0\",\n",
    "    \"images/ODT_1_Axis_Camera/in_situ_absorption\": \"camera_1\",\n",
    "    \"images/ODT_2_Axis_Camera/in_situ_absorption\": \"camera_2\",\n",
    "}\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "img_dir = 'C:/Users/control/DyLab/Experiments/DyBEC/'\n",
    "SequenceName = \"Repetition_scan\"\n",
    "folderPath = img_dir + SequenceName + \"/\" + get_date()\n",
    "\n",
    "mongoDB = mongoClient[SequenceName]\n",
    "\n",
    "DB = MongoDB(mongoClient, mongoDB, date=get_date())"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Repetition Scans"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## scan MOT freq"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "%matplotlib notebook\n",
    "shotNum = \"0000\"\n",
    "filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
    "\n",
    "dataSetDict = {\n",
    "    dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
    "    for i in range(len(groupList))\n",
    "}\n",
    "\n",
    "dataSet = dataSetDict[\"camera_1\"]\n",
    "\n",
    "print_scanAxis(dataSet)\n",
    "\n",
    "scanAxis = get_scanAxis(dataSet)\n",
    "\n",
    "dataSet = auto_rechunk(dataSet)\n",
    "\n",
    "dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
    "\n",
    "imageAnalyser.center = (310, 825)\n",
    "imageAnalyser.span = (550, 1250)\n",
    "imageAnalyser.fraction = (0.1, 0.1)\n",
    "\n",
    "dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
    "dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
    "\n",
    "Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
    "Ncount_mean = calculate_mean(Ncount)\n",
    "Ncount_std = calculate_std(Ncount)\n",
    "\n",
    "fig = plt.figure()\n",
    "ax = fig.gca()\n",
    "Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
    "plt.xlabel('MOT AOM Freq (MHz)')\n",
    "plt.ylabel('NCount')\n",
    "plt.tight_layout()\n",
    "plt.grid(visible=1)\n",
    "plt.show()\n",
    "\n",
    "# DB.create_global(shotNum, dataSet)\n",
    "# DB.add_data(shotNum, dataSet_cropOD, engine='xarray')"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## scan Push freq"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "%matplotlib notebook\n",
    "shotNum = \"0001\"\n",
    "filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
    "\n",
    "dataSetDict = {\n",
    "    dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
    "    for i in range(len(groupList))\n",
    "}\n",
    "\n",
    "dataSet = dataSetDict[\"camera_1\"]\n",
    "\n",
    "print_scanAxis(dataSet)\n",
    "\n",
    "scanAxis = get_scanAxis(dataSet)\n",
    "\n",
    "dataSet = auto_rechunk(dataSet)\n",
    "\n",
    "dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
    "\n",
    "imageAnalyser.center = (310, 825)\n",
    "imageAnalyser.span = (550, 1250)\n",
    "imageAnalyser.fraction = (0.1, 0.1)\n",
    "\n",
    "dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
    "dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
    "\n",
    "Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
    "Ncount_mean = calculate_mean(Ncount)\n",
    "Ncount_std = calculate_std(Ncount)\n",
    "\n",
    "fig = plt.figure()\n",
    "ax = fig.gca()\n",
    "Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
    "plt.xlabel('Push AOM Freq (MHz)')\n",
    "plt.ylabel('NCount')\n",
    "plt.tight_layout()\n",
    "plt.grid(visible=1)\n",
    "plt.show()\n",
    "\n",
    "# DB.create_global(shotNum, dataSet)\n",
    "# DB.add_data(shotNum, dataSet_cropOD, engine='xarray')"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## scan Z comp current"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "%matplotlib notebook\n",
    "shotNum = \"0005\"\n",
    "filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
    "\n",
    "dataSetDict = {\n",
    "    dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
    "    for i in [0, 1]\n",
    "}\n",
    "\n",
    "dataSet = dataSetDict[\"camera_1\"]\n",
    "\n",
    "print_scanAxis(dataSet)\n",
    "\n",
    "scanAxis = get_scanAxis(dataSet)\n",
    "\n",
    "dataSet = auto_rechunk(dataSet)\n",
    "\n",
    "dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
    "\n",
    "imageAnalyser.center = (305, 870)\n",
    "imageAnalyser.span = (400, 400)\n",
    "imageAnalyser.fraction = (0.1, 0.1)\n",
    "\n",
    "dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
    "dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
    "\n",
    "Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
    "Ncount_mean = calculate_mean(Ncount)\n",
    "Ncount_std = calculate_std(Ncount)\n",
    "\n",
    "fig = plt.figure()\n",
    "ax = fig.gca()\n",
    "Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
    "plt.xlabel('comp Z current (A)')\n",
    "plt.ylabel('NCount')\n",
    "plt.tight_layout()\n",
    "plt.grid(visible=1)\n",
    "plt.show()\n",
    "\n",
    "# DB.create_global(shotNum, dataSet)\n",
    "# DB.add_data(shotNum, dataSet_cropOD, engine='xarray')"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Evaporative Cooling"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "img_dir = '//DyLabNAS/Data/'\n",
    "SequenceName = \"Evaporative_Cooling\" + \"/\"\n",
    "folderPath = img_dir + SequenceName + '2023/06/30'# get_date()\n",
    "\n",
    "# mongoDB = mongoClient[SequenceName]\n",
    "\n",
    "# DB = MongoDB(mongoClient, mongoDB, date=get_date())"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Check BEC"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The detected scaning axes and values are: \n",
      "\n",
      "{'compZ_current_sg': array([0.15 , 0.155, 0.16 , 0.165, 0.17 , 0.175, 0.18 , 0.185, 0.19 ,\n",
      "       0.195, 0.2  , 0.205, 0.21 , 0.215, 0.22 , 0.225, 0.23 , 0.235,\n",
      "       0.24 , 0.245]), 'runs': array([0., 1., 2.])}\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 39172 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "shotNum = \"0000\"\n",
    "filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
    "\n",
    "dataSetDict = {\n",
    "    dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
    "    for i in [0]\n",
    "}\n",
    "\n",
    "dataSet = dataSetDict[\"camera_0\"]\n",
    "\n",
    "print_scanAxis(dataSet)\n",
    "\n",
    "scanAxis = get_scanAxis(dataSet)\n",
    "\n",
    "dataSet = auto_rechunk(dataSet)\n",
    "\n",
    "dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
    "\n",
    "imageAnalyser.center = (880, 990)\n",
    "imageAnalyser.span = (150, 150)\n",
    "imageAnalyser.fraction = (0.1, 0.1)\n",
    "\n",
    "dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
    "dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
    "\n",
    "Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
    "Ncount_mean = calculate_mean(Ncount)\n",
    "Ncount_std = calculate_std(Ncount)\n",
    "\n",
    "fig = plt.figure()\n",
    "ax = fig.gca()\n",
    "Ncount_mean.plot.errorbar(ax=ax, yerr = None, fmt='-ob')\n",
    "plt.xlabel('comp Z current (A)')\n",
    "plt.ylabel('NCount')\n",
    "plt.tight_layout()\n",
    "plt.grid(visible=1)\n",
    "plt.show()\n",
    "\n",
    "# DB.create_global(shotNum, dataSet)\n",
    "# DB.add_data(shotNum, dataSet_cropOD, engine='xarray')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<xarray.plot.facetgrid.FacetGrid at 0x19caa8b8a60>"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 2086336 characters]",
      "text/plain": [
       "<Figure size 6100x900 with 61 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "dataSet_cropOD.plot.pcolormesh(cmap='jet', col=scanAxis[0], row=scanAxis[1], vmin=0, vmax=3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [],
   "source": [
    "data = dataSet_cropOD.chunk((1,1,150,150))#.sel(runs = 0)\n",
    "\n",
    "fitModel = DensityProfileBEC2dModel()\n",
    "fitAnalyser_1 = FitAnalyser(fitModel, fitDim=2)\n",
    "\n",
    "params = fitAnalyser_1.guess(data, dask=\"parallelized\", guess_kwargs=dict(pureBECThreshold=1.2))\n",
    "\n",
    "fitResult_1 = fitAnalyser_1.fit(data, params).load()\n",
    "\n",
    "fitCurve = fitAnalyser_1.eval(fitResult_1, x=np.arange(150), y=np.arange(150), dask=\"parallelized\").load()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<table><tr><th> name </th><th> value </th><th> initial value </th><th> min </th><th> max </th><th> vary </th></tr><tr><td> amp_bec </td><td>  1.44550963 </td><td> None </td><td>  0.00000000 </td><td>  3.70514761 </td><td> True </td></tr><tr><td> amp_th </td><td>  0.81463531 </td><td> None </td><td>  0.00000000 </td><td>  3.70514761 </td><td> True </td></tr><tr><td> x0_bec </td><td>  71.2451253 </td><td> None </td><td>  61.2451253 </td><td>  81.2451253 </td><td> True </td></tr><tr><td> y0_bec </td><td>  71.9052925 </td><td> None </td><td>  61.9052925 </td><td>  81.9052925 </td><td> True </td></tr><tr><td> x0_th </td><td>  71.2451253 </td><td> None </td><td>  61.2451253 </td><td>  81.2451253 </td><td> True </td></tr><tr><td> y0_th </td><td>  71.9052925 </td><td> None </td><td>  61.9052925 </td><td>  81.9052925 </td><td> True </td></tr><tr><td> sigmax_bec </td><td>  24.3865938 </td><td> None </td><td>  0.00000000 </td><td>  28.0000000 </td><td> True </td></tr><tr><td> sigmay_bec </td><td>  25.4098361 </td><td> None </td><td>  0.00000000 </td><td>  62.0000000 </td><td> True </td></tr><tr><td> sigma_th </td><td>  16.2393832 </td><td> None </td><td>  0.00000000 </td><td>  150.000000 </td><td> True </td></tr></table>"
      ],
      "text/plain": [
       "Parameters([('amp_bec', <Parameter 'amp_bec', value=1.4455096264728464, bounds=[0:3.7051476090827027]>), ('amp_th', <Parameter 'amp_th', value=0.814635307459713, bounds=[0:3.7051476090827027]>), ('x0_bec', <Parameter 'x0_bec', value=71.24512534818942, bounds=[61.24512534818942:81.24512534818942]>), ('y0_bec', <Parameter 'y0_bec', value=71.90529247910864, bounds=[61.90529247910864:81.90529247910864]>), ('x0_th', <Parameter 'x0_th', value=71.24512534818942, bounds=[61.24512534818942:81.24512534818942]>), ('y0_th', <Parameter 'y0_th', value=71.90529247910864, bounds=[61.90529247910864:81.90529247910864]>), ('sigmax_bec', <Parameter 'sigmax_bec', value=24.38659382883903, bounds=[0:28]>), ('sigmay_bec', <Parameter 'sigmay_bec', value=25.40983606557377, bounds=[0:62]>), ('sigma_th', <Parameter 'sigma_th', value=16.239383183237685, bounds=[0:150]>)])"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "params.sel(runs=0, compZ_current_sg=0.2).item()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "fitResult_1 = fitAnalyser_1.fit(data.sel(runs=0, compZ_current_sg=0.2), params.sel(runs=0, compZ_current_sg=0.2)).load()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "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'>&lt;xarray.Dataset&gt;\n",
       "Dimensions:           ()\n",
       "Coordinates:\n",
       "    compZ_current_sg  float64 0.2\n",
       "    runs              float64 0.0\n",
       "Data variables:\n",
       "    amp_bec           object 1.727+/-0.010\n",
       "    amp_th            object 0.504+/-0.010\n",
       "    x0_bec            object 71.62+/-0.06\n",
       "    y0_bec            object 71.041+/-0.017\n",
       "    x0_th             object 71.84+/-0.17\n",
       "    y0_th             object 71.82+/-0.14\n",
       "    sigmax_bec        object 25.61+/-0.09\n",
       "    sigmay_bec        object 8.746+/-0.035\n",
       "    sigma_th          object 14.84+/-0.15\n",
       "Attributes:\n",
       "    IMAGE_SUBCLASS:       IMAGE_GRAYSCALE\n",
       "    IMAGE_VERSION:        1.2\n",
       "    IMAGE_WHITE_IS_ZERO:  0\n",
       "    x_start:              805\n",
       "    x_end:                955\n",
       "    y_end:                1065\n",
       "    y_start:              915\n",
       "    x_center:             880\n",
       "    y_center:             990\n",
       "    x_span:               150\n",
       "    y_span:               150</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-58b2c231-ed46-46d3-86f5-e5c61270a97b' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-58b2c231-ed46-46d3-86f5-e5c61270a97b' 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-0ec45f1e-8206-48de-b2c8-7b776117bce6' class='xr-section-summary-in' type='checkbox'  checked><label for='section-0ec45f1e-8206-48de-b2c8-7b776117bce6' class='xr-section-summary' >Coordinates: <span>(2)</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>compZ_current_sg</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.2</div><input id='attrs-df90e88d-60c4-4ef5-b9c5-c58d13d3f592' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-df90e88d-60c4-4ef5-b9c5-c58d13d3f592' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-bacf6ba9-e3e8-436e-8903-89f9f79a0994' class='xr-var-data-in' type='checkbox'><label for='data-bacf6ba9-e3e8-436e-8903-89f9f79a0994' 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.2)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>runs</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0</div><input id='attrs-7f3d9b5b-2789-468a-bfa9-9b112a6763a7' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7f3d9b5b-2789-468a-bfa9-9b112a6763a7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c94aff09-b1f0-4b82-be69-0c36a7b59b34' class='xr-var-data-in' type='checkbox'><label for='data-c94aff09-b1f0-4b82-be69-0c36a7b59b34' 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.)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-63722144-e714-4b63-9d6e-d7fd1fc74010' class='xr-section-summary-in' type='checkbox'  checked><label for='section-63722144-e714-4b63-9d6e-d7fd1fc74010' class='xr-section-summary' >Data variables: <span>(9)</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>amp_bec</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>1.727+/-0.010</div><input id='attrs-4d2da1e9-f211-4ac0-a076-3945985ce79e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-4d2da1e9-f211-4ac0-a076-3945985ce79e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-739bbefa-6360-4b8a-873b-3d518c752ec7' class='xr-var-data-in' type='checkbox'><label for='data-739bbefa-6360-4b8a-873b-3d518c752ec7' 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(1.7272227602934593+/-0.010398514342153583, dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>amp_th</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>0.504+/-0.010</div><input id='attrs-b27c0a4d-2d19-431c-a5c4-c7880cdf4995' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b27c0a4d-2d19-431c-a5c4-c7880cdf4995' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-44e52f89-b869-43b7-a826-1f200db422bd' class='xr-var-data-in' type='checkbox'><label for='data-44e52f89-b869-43b7-a826-1f200db422bd' 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.5036719864961382+/-0.010182790048929065, dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>x0_bec</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>71.62+/-0.06</div><input id='attrs-668aae32-08a2-4c80-a53a-11d182a5ec71' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-668aae32-08a2-4c80-a53a-11d182a5ec71' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ee6471d7-fb12-4f7b-82ca-68552347c5ed' class='xr-var-data-in' type='checkbox'><label for='data-ee6471d7-fb12-4f7b-82ca-68552347c5ed' 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(71.61934376558358+/-0.06219565144087446, dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>y0_bec</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>71.041+/-0.017</div><input id='attrs-1dddb635-7e31-46fe-8c82-be1ca9fa6fc8' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-1dddb635-7e31-46fe-8c82-be1ca9fa6fc8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3b36cd4d-d498-4a13-a7a1-f3ede366306a' class='xr-var-data-in' type='checkbox'><label for='data-3b36cd4d-d498-4a13-a7a1-f3ede366306a' 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(71.0410172206256+/-0.01710819159151653, dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>x0_th</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>71.84+/-0.17</div><input id='attrs-fd2ac09f-9e64-458c-9e05-ee728d0cccbd' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-fd2ac09f-9e64-458c-9e05-ee728d0cccbd' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e281407d-7a15-4fc8-8ea8-c612a62beee5' class='xr-var-data-in' type='checkbox'><label for='data-e281407d-7a15-4fc8-8ea8-c612a62beee5' 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(71.8416810711902+/-0.17054014519062205, dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>y0_th</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>71.82+/-0.14</div><input id='attrs-aa9df513-a2cc-4fb9-ab77-4837bff8876e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-aa9df513-a2cc-4fb9-ab77-4837bff8876e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-97168bd5-129f-4de7-9f7e-69e4266caf6a' class='xr-var-data-in' type='checkbox'><label for='data-97168bd5-129f-4de7-9f7e-69e4266caf6a' 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(71.82050441722244+/-0.13842982317358515, dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>sigmax_bec</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>25.61+/-0.09</div><input id='attrs-b4e054fe-59ff-4703-8a2e-9dff173e406c' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b4e054fe-59ff-4703-8a2e-9dff173e406c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7f84f0a3-6bae-43b6-86fa-6e3f410606b8' class='xr-var-data-in' type='checkbox'><label for='data-7f84f0a3-6bae-43b6-86fa-6e3f410606b8' 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(25.60992195195761+/-0.09363187159205134, dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>sigmay_bec</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>8.746+/-0.035</div><input id='attrs-57b4593e-b859-4be5-89b0-fc113abca8ca' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-57b4593e-b859-4be5-89b0-fc113abca8ca' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6ff1247c-e40b-4785-8594-edd873a8cc08' class='xr-var-data-in' type='checkbox'><label for='data-6ff1247c-e40b-4785-8594-edd873a8cc08' 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(8.745737627349243+/-0.03468065286560658, dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>sigma_th</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>14.84+/-0.15</div><input id='attrs-0cb25dbf-4377-45d5-bfa0-51e7ad47c647' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-0cb25dbf-4377-45d5-bfa0-51e7ad47c647' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3240278f-a850-401b-a0fe-371e8bbc6968' class='xr-var-data-in' type='checkbox'><label for='data-3240278f-a850-401b-a0fe-371e8bbc6968' 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(14.844510016052997+/-0.15294762615317392, dtype=object)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-ad48de62-e176-42e0-a1b5-a0e406536c21' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-ad48de62-e176-42e0-a1b5-a0e406536c21' 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-319af540-89b3-4cb4-9e9c-489863a447f8' class='xr-section-summary-in' type='checkbox'  ><label for='section-319af540-89b3-4cb4-9e9c-489863a447f8' class='xr-section-summary' >Attributes: <span>(11)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><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><dt><span>x_start :</span></dt><dd>805</dd><dt><span>x_end :</span></dt><dd>955</dd><dt><span>y_end :</span></dt><dd>1065</dd><dt><span>y_start :</span></dt><dd>915</dd><dt><span>x_center :</span></dt><dd>880</dd><dt><span>y_center :</span></dt><dd>990</dd><dt><span>x_span :</span></dt><dd>150</dd><dt><span>y_span :</span></dt><dd>150</dd></dl></div></li></ul></div></div>"
      ],
      "text/plain": [
       "<xarray.Dataset>\n",
       "Dimensions:           ()\n",
       "Coordinates:\n",
       "    compZ_current_sg  float64 0.2\n",
       "    runs              float64 0.0\n",
       "Data variables:\n",
       "    amp_bec           object 1.727+/-0.010\n",
       "    amp_th            object 0.504+/-0.010\n",
       "    x0_bec            object 71.62+/-0.06\n",
       "    y0_bec            object 71.041+/-0.017\n",
       "    x0_th             object 71.84+/-0.17\n",
       "    y0_th             object 71.82+/-0.14\n",
       "    sigmax_bec        object 25.61+/-0.09\n",
       "    sigmay_bec        object 8.746+/-0.035\n",
       "    sigma_th          object 14.84+/-0.15\n",
       "Attributes:\n",
       "    IMAGE_SUBCLASS:       IMAGE_GRAYSCALE\n",
       "    IMAGE_VERSION:        1.2\n",
       "    IMAGE_WHITE_IS_ZERO:  0\n",
       "    x_start:              805\n",
       "    x_end:                955\n",
       "    y_end:                1065\n",
       "    y_start:              915\n",
       "    x_center:             880\n",
       "    y_center:             990\n",
       "    x_span:               150\n",
       "    y_span:               150"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "fitAnalyser_1.get_fit_full_result(fitResult_1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "fitCurve = fitAnalyser_1.eval(fitResult_1, x=np.arange(150), y=np.arange(150), dask=\"parallelized\").load()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<xarray.plot.facetgrid.FacetGrid at 0x19ca1f31910>"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 269504 characters]",
      "text/plain": [
       "<Figure size 6100x900 with 61 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fitCurve.plot.pcolormesh(cmap='jet', col=scanAxis[0], row=scanAxis[1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "int() argument must be a string, a bytes-like object or a number, not 'NoneType'",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32mf:\\Jianshun\\analyseScript\\20230630_Data_Analysis.ipynb Cell 28\u001b[0m in \u001b[0;36m2\n\u001b[0;32m      <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis.ipynb#X36sZmlsZQ%3D%3D?line=0'>1</a>\u001b[0m val \u001b[39m=\u001b[39m fitAnalyser_1\u001b[39m.\u001b[39mget_fit_value(fitResult_1)\n\u001b[1;32m----> <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis.ipynb#X36sZmlsZQ%3D%3D?line=1'>2</a>\u001b[0m std \u001b[39m=\u001b[39m fitAnalyser_1\u001b[39m.\u001b[39;49mget_fit_std(fitResult_1)\n\u001b[0;32m      <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis.ipynb#X36sZmlsZQ%3D%3D?line=3'>4</a>\u001b[0m data \u001b[39m=\u001b[39m val[\u001b[39m'\u001b[39m\u001b[39mcondensate_fraction\u001b[39m\u001b[39m'\u001b[39m]\n\u001b[0;32m      <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis.ipynb#X36sZmlsZQ%3D%3D?line=4'>5</a>\u001b[0m data_std \u001b[39m=\u001b[39m std[\u001b[39m'\u001b[39m\u001b[39mcondensate_fraction\u001b[39m\u001b[39m'\u001b[39m]\n",
      "File \u001b[1;32mf:\\Jianshun\\analyseScript\\Analyser\\FitAnalyser.py:1373\u001b[0m, in \u001b[0;36mFitAnalyser.get_fit_std\u001b[1;34m(self, fitResult, dask, **kwargs)\u001b[0m\n\u001b[0;32m   1364\u001b[0m output_core_dims\u001b[39m=\u001b[39m[ [] \u001b[39mfor\u001b[39;00m _ \u001b[39min\u001b[39;00m \u001b[39mrange\u001b[39m(\u001b[39mlen\u001b[39m(params))]\n\u001b[0;32m   1366\u001b[0m kwargs\u001b[39m.\u001b[39mupdate(\n\u001b[0;32m   1367\u001b[0m     {\n\u001b[0;32m   1368\u001b[0m         \u001b[39m\"\u001b[39m\u001b[39mdask\u001b[39m\u001b[39m\"\u001b[39m: dask,\n\u001b[0;32m   1369\u001b[0m         \u001b[39m\"\u001b[39m\u001b[39moutput_core_dims\u001b[39m\u001b[39m\"\u001b[39m: output_core_dims,\n\u001b[0;32m   1370\u001b[0m     }\n\u001b[0;32m   1371\u001b[0m )\n\u001b[1;32m-> 1373\u001b[0m value \u001b[39m=\u001b[39m xr\u001b[39m.\u001b[39mapply_ufunc(\u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_get_fit_std, fitResult, kwargs\u001b[39m=\u001b[39m\u001b[39mdict\u001b[39m(params\u001b[39m=\u001b[39mparams), \u001b[39m*\u001b[39m\u001b[39m*\u001b[39mkwargs)\n\u001b[0;32m   1375\u001b[0m value \u001b[39m=\u001b[39m xr\u001b[39m.\u001b[39mDataset(\n\u001b[0;32m   1376\u001b[0m     data_vars\u001b[39m=\u001b[39m{\n\u001b[0;32m   1377\u001b[0m         params[i]: value[i]\n\u001b[1;32m   (...)\u001b[0m\n\u001b[0;32m   1380\u001b[0m     attrs\u001b[39m=\u001b[39mfitResult\u001b[39m.\u001b[39mattrs\n\u001b[0;32m   1381\u001b[0m )\n\u001b[0;32m   1383\u001b[0m \u001b[39mreturn\u001b[39;00m value\n",
      "File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\core\\computation.py:1196\u001b[0m, in \u001b[0;36mapply_ufunc\u001b[1;34m(func, input_core_dims, output_core_dims, exclude_dims, vectorize, join, dataset_join, dataset_fill_value, keep_attrs, kwargs, dask, output_dtypes, output_sizes, meta, dask_gufunc_kwargs, *args)\u001b[0m\n\u001b[0;32m   1194\u001b[0m \u001b[39m# feed DataArray apply_variable_ufunc through apply_dataarray_vfunc\u001b[39;00m\n\u001b[0;32m   1195\u001b[0m \u001b[39melif\u001b[39;00m \u001b[39many\u001b[39m(\u001b[39misinstance\u001b[39m(a, DataArray) \u001b[39mfor\u001b[39;00m a \u001b[39min\u001b[39;00m args):\n\u001b[1;32m-> 1196\u001b[0m     \u001b[39mreturn\u001b[39;00m apply_dataarray_vfunc(\n\u001b[0;32m   1197\u001b[0m         variables_vfunc,\n\u001b[0;32m   1198\u001b[0m         \u001b[39m*\u001b[39;49margs,\n\u001b[0;32m   1199\u001b[0m         signature\u001b[39m=\u001b[39;49msignature,\n\u001b[0;32m   1200\u001b[0m         join\u001b[39m=\u001b[39;49mjoin,\n\u001b[0;32m   1201\u001b[0m         exclude_dims\u001b[39m=\u001b[39;49mexclude_dims,\n\u001b[0;32m   1202\u001b[0m         keep_attrs\u001b[39m=\u001b[39;49mkeep_attrs,\n\u001b[0;32m   1203\u001b[0m     )\n\u001b[0;32m   1204\u001b[0m \u001b[39m# feed Variables directly through apply_variable_ufunc\u001b[39;00m\n\u001b[0;32m   1205\u001b[0m \u001b[39melif\u001b[39;00m \u001b[39many\u001b[39m(\u001b[39misinstance\u001b[39m(a, Variable) \u001b[39mfor\u001b[39;00m a \u001b[39min\u001b[39;00m args):\n",
      "File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\core\\computation.py:303\u001b[0m, in \u001b[0;36mapply_dataarray_vfunc\u001b[1;34m(func, signature, join, exclude_dims, keep_attrs, *args)\u001b[0m\n\u001b[0;32m    298\u001b[0m result_coords, result_indexes \u001b[39m=\u001b[39m build_output_coords_and_indexes(\n\u001b[0;32m    299\u001b[0m     args, signature, exclude_dims, combine_attrs\u001b[39m=\u001b[39mkeep_attrs\n\u001b[0;32m    300\u001b[0m )\n\u001b[0;32m    302\u001b[0m data_vars \u001b[39m=\u001b[39m [\u001b[39mgetattr\u001b[39m(a, \u001b[39m\"\u001b[39m\u001b[39mvariable\u001b[39m\u001b[39m\"\u001b[39m, a) \u001b[39mfor\u001b[39;00m a \u001b[39min\u001b[39;00m args]\n\u001b[1;32m--> 303\u001b[0m result_var \u001b[39m=\u001b[39m func(\u001b[39m*\u001b[39;49mdata_vars)\n\u001b[0;32m    305\u001b[0m out: \u001b[39mtuple\u001b[39m[DataArray, \u001b[39m.\u001b[39m\u001b[39m.\u001b[39m\u001b[39m.\u001b[39m] \u001b[39m|\u001b[39m DataArray\n\u001b[0;32m    306\u001b[0m \u001b[39mif\u001b[39;00m signature\u001b[39m.\u001b[39mnum_outputs \u001b[39m>\u001b[39m \u001b[39m1\u001b[39m:\n",
      "File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\core\\computation.py:760\u001b[0m, in \u001b[0;36mapply_variable_ufunc\u001b[1;34m(func, signature, exclude_dims, dask, output_dtypes, vectorize, keep_attrs, dask_gufunc_kwargs, *args)\u001b[0m\n\u001b[0;32m    755\u001b[0m     \u001b[39mif\u001b[39;00m vectorize:\n\u001b[0;32m    756\u001b[0m         func \u001b[39m=\u001b[39m _vectorize(\n\u001b[0;32m    757\u001b[0m             func, signature, output_dtypes\u001b[39m=\u001b[39moutput_dtypes, exclude_dims\u001b[39m=\u001b[39mexclude_dims\n\u001b[0;32m    758\u001b[0m         )\n\u001b[1;32m--> 760\u001b[0m result_data \u001b[39m=\u001b[39m func(\u001b[39m*\u001b[39;49minput_data)\n\u001b[0;32m    762\u001b[0m \u001b[39mif\u001b[39;00m signature\u001b[39m.\u001b[39mnum_outputs \u001b[39m==\u001b[39m \u001b[39m1\u001b[39m:\n\u001b[0;32m    763\u001b[0m     result_data \u001b[39m=\u001b[39m (result_data,)\n",
      "File \u001b[1;32mf:\\Jianshun\\analyseScript\\Analyser\\FitAnalyser.py:1339\u001b[0m, in \u001b[0;36mFitAnalyser._get_fit_std\u001b[1;34m(self, fitResult, params)\u001b[0m\n\u001b[0;32m   1329\u001b[0m \u001b[39m\"\"\"get standard deviation of parameters from fit result\u001b[39;00m\n\u001b[0;32m   1330\u001b[0m \n\u001b[0;32m   1331\u001b[0m \u001b[39m:param fitResult: The result of the fit \u001b[39;00m\n\u001b[1;32m   (...)\u001b[0m\n\u001b[0;32m   1336\u001b[0m \u001b[39m:rtype: 1D numpy array\u001b[39;00m\n\u001b[0;32m   1337\u001b[0m \u001b[39m\"\"\"\u001b[39;00m\n\u001b[0;32m   1338\u001b[0m func \u001b[39m=\u001b[39m np\u001b[39m.\u001b[39mvectorize(\u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_get_fit_std_single)\n\u001b[1;32m-> 1339\u001b[0m res \u001b[39m=\u001b[39m \u001b[39mtuple\u001b[39;49m(\n\u001b[0;32m   1340\u001b[0m         func(fitResult, key)\n\u001b[0;32m   1341\u001b[0m         \u001b[39mfor\u001b[39;49;00m key \u001b[39min\u001b[39;49;00m params\n\u001b[0;32m   1342\u001b[0m     )\n\u001b[0;32m   1344\u001b[0m \u001b[39mreturn\u001b[39;00m res\n",
      "File \u001b[1;32mf:\\Jianshun\\analyseScript\\Analyser\\FitAnalyser.py:1340\u001b[0m, in \u001b[0;36m<genexpr>\u001b[1;34m(.0)\u001b[0m\n\u001b[0;32m   1329\u001b[0m \u001b[39m\"\"\"get standard deviation of parameters from fit result\u001b[39;00m\n\u001b[0;32m   1330\u001b[0m \n\u001b[0;32m   1331\u001b[0m \u001b[39m:param fitResult: The result of the fit \u001b[39;00m\n\u001b[1;32m   (...)\u001b[0m\n\u001b[0;32m   1336\u001b[0m \u001b[39m:rtype: 1D numpy array\u001b[39;00m\n\u001b[0;32m   1337\u001b[0m \u001b[39m\"\"\"\u001b[39;00m\n\u001b[0;32m   1338\u001b[0m func \u001b[39m=\u001b[39m np\u001b[39m.\u001b[39mvectorize(\u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_get_fit_std_single)\n\u001b[0;32m   1339\u001b[0m res \u001b[39m=\u001b[39m \u001b[39mtuple\u001b[39m(\n\u001b[1;32m-> 1340\u001b[0m         func(fitResult, key)\n\u001b[0;32m   1341\u001b[0m         \u001b[39mfor\u001b[39;00m key \u001b[39min\u001b[39;00m params\n\u001b[0;32m   1342\u001b[0m     )\n\u001b[0;32m   1344\u001b[0m \u001b[39mreturn\u001b[39;00m res\n",
      "File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\numpy\\lib\\function_base.py:2163\u001b[0m, in \u001b[0;36mvectorize.__call__\u001b[1;34m(self, *args, **kwargs)\u001b[0m\n\u001b[0;32m   2160\u001b[0m     vargs \u001b[39m=\u001b[39m [args[_i] \u001b[39mfor\u001b[39;00m _i \u001b[39min\u001b[39;00m inds]\n\u001b[0;32m   2161\u001b[0m     vargs\u001b[39m.\u001b[39mextend([kwargs[_n] \u001b[39mfor\u001b[39;00m _n \u001b[39min\u001b[39;00m names])\n\u001b[1;32m-> 2163\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_vectorize_call(func\u001b[39m=\u001b[39;49mfunc, args\u001b[39m=\u001b[39;49mvargs)\n",
      "File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\numpy\\lib\\function_base.py:2249\u001b[0m, in \u001b[0;36mvectorize._vectorize_call\u001b[1;34m(self, func, args)\u001b[0m\n\u001b[0;32m   2246\u001b[0m outputs \u001b[39m=\u001b[39m ufunc(\u001b[39m*\u001b[39minputs)\n\u001b[0;32m   2248\u001b[0m \u001b[39mif\u001b[39;00m ufunc\u001b[39m.\u001b[39mnout \u001b[39m==\u001b[39m \u001b[39m1\u001b[39m:\n\u001b[1;32m-> 2249\u001b[0m     res \u001b[39m=\u001b[39m asanyarray(outputs, dtype\u001b[39m=\u001b[39;49motypes[\u001b[39m0\u001b[39;49m])\n\u001b[0;32m   2250\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[0;32m   2251\u001b[0m     res \u001b[39m=\u001b[39m \u001b[39mtuple\u001b[39m([asanyarray(x, dtype\u001b[39m=\u001b[39mt)\n\u001b[0;32m   2252\u001b[0m                  \u001b[39mfor\u001b[39;00m x, t \u001b[39min\u001b[39;00m \u001b[39mzip\u001b[39m(outputs, otypes)])\n",
      "\u001b[1;31mTypeError\u001b[0m: int() argument must be a string, a bytes-like object or a number, not 'NoneType'"
     ]
    }
   ],
   "source": [
    "val = fitAnalyser_1.get_fit_value(fitResult_1)\n",
    "std = fitAnalyser_1.get_fit_std(fitResult_1)\n",
    "\n",
    "data = val['condensate_fraction']\n",
    "data_std = std['condensate_fraction']\n",
    "\n",
    "data.plot.errorbar(x=scanAxis[0], hue=scanAxis[1], fmt='o')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<ErrorbarContainer object of 3 artists>"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 24480 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "data = data.sel(runs=[0, 1])\n",
    "data_mean = calculate_mean(data)\n",
    "data_std = calculate_std(data)\n",
    "\n",
    "data_mean.plot.errorbar(x=scanAxis[0], yerr=data_std, fmt='o')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 36248 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "val = fitAnalyser_1.get_fit_value(fitResult_1)\n",
    "std = fitAnalyser_1.get_fit_std(fitResult_1)\n",
    "\n",
    "data = val['BEC_amplitude']\n",
    "data_std = std['BEC_amplitude']\n",
    "\n",
    "data.plot.errorbar(x=scanAxis[0], hue=scanAxis[1], fmt='o')\n",
    "plt.show()"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Check BEC"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The detected scaning axes and values are: \n",
      "\n",
      "{'compZ_current_sg': array([0.195, 0.196, 0.197, 0.198, 0.199, 0.2  , 0.201, 0.202, 0.203,\n",
      "       0.204]), 'runs': array([0., 1., 2.])}\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 33212 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "shotNum = \"0001\"\n",
    "filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
    "\n",
    "dataSetDict = {\n",
    "    dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
    "    for i in [0]\n",
    "}\n",
    "\n",
    "dataSet = dataSetDict[\"camera_0\"]\n",
    "\n",
    "print_scanAxis(dataSet)\n",
    "\n",
    "scanAxis = get_scanAxis(dataSet)\n",
    "\n",
    "dataSet = auto_rechunk(dataSet)\n",
    "\n",
    "dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
    "\n",
    "imageAnalyser.center = (880, 990)\n",
    "imageAnalyser.span = (150, 150)\n",
    "imageAnalyser.fraction = (0.1, 0.1)\n",
    "\n",
    "dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
    "dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
    "\n",
    "Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
    "Ncount_mean = calculate_mean(Ncount)\n",
    "Ncount_std = calculate_std(Ncount)\n",
    "\n",
    "fig = plt.figure()\n",
    "ax = fig.gca()\n",
    "Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='-ob')\n",
    "plt.xlabel('comp Z current (A)')\n",
    "plt.ylabel('NCount')\n",
    "plt.tight_layout()\n",
    "plt.grid(visible=1)\n",
    "plt.show()\n",
    "\n",
    "# DB.create_global(shotNum, dataSet)\n",
    "# DB.add_data(shotNum, dataSet_cropOD, engine='xarray')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<xarray.plot.facetgrid.FacetGrid at 0x2456516b6a0>"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 1122064 characters]",
      "text/plain": [
       "<Figure size 3100x900 with 31 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "dataSet_cropOD.plot.pcolormesh(cmap='jet', col=scanAxis[0], row=scanAxis[1], vmin=0, vmax=3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [],
   "source": [
    "dataSet_cropOD.chunk((1,1,150,150))#.sel(runs = 0)\n",
    "\n",
    "fitModel = DensityProfileBEC2dModel()\n",
    "fitAnalyser_1 = FitAnalyser(fitModel, fitDim=2)\n",
    "\n",
    "params = fitAnalyser_1.guess(data, dask=\"parallelized\", guess_kwargs=dict(pureBECThreshold=1.2))\n",
    "\n",
    "# fitResult_1 = fitAnalyser_1.fit(data, params).load()\n",
    "\n",
    "# fitCurve = fitAnalyser.eval(fitResult, x=np.range(150), y=np.range(150), dask=\"parallelized\").load()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<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>  637.041125 </td><td> None </td><td>  0.00000000 </td><td>         inf </td><td> True </td><td>  </td></tr><tr><td> thermal_amplitude </td><td>  397.705792 </td><td> None </td><td>  0.00000000 </td><td>         inf </td><td> True </td><td>  </td></tr><tr><td> BEC_centerx </td><td>  72.8975065 </td><td> None </td><td>  24.2944367 </td><td>  121.500576 </td><td> True </td><td>  </td></tr><tr><td> BEC_centery </td><td>  71.7963537 </td><td> None </td><td>  55.6292698 </td><td>  87.9634377 </td><td> True </td><td>  </td></tr><tr><td> thermal_centerx </td><td>  74.3826292 </td><td> None </td><td>  15.7165440 </td><td>  133.048714 </td><td> True </td><td>  </td></tr><tr><td> thermal_centery </td><td>  74.0107099 </td><td> None </td><td>  18.5607659 </td><td>  129.460654 </td><td> True </td><td>  </td></tr><tr><td> BEC_sigmax </td><td>  4.86030698 </td><td> None </td><td>        -inf </td><td>         inf </td><td> False </td><td> 3 * thermal_sigmax - deltax </td></tr><tr><td> BEC_sigmay </td><td>  1.61670840 </td><td> None </td><td>  0.00000000 </td><td>  8.08354198 </td><td> True </td><td>  </td></tr><tr><td> thermal_sigmax </td><td>  19.5553617 </td><td> None </td><td>  0.00000000 </td><td>  97.7768087 </td><td> True </td><td>  </td></tr><tr><td> thermal_sigmay </td><td>  18.4833146 </td><td> None </td><td>        -inf </td><td>         inf </td><td> False </td><td> thermalAspectRatio * thermal_sigmax </td></tr><tr><td> deltax </td><td>  53.8057783 </td><td> None </td><td>  0.00000000 </td><td>         inf </td><td> True </td><td>  </td></tr><tr><td> thermalAspectRatio </td><td>  0.94517887 </td><td> None </td><td>  0.80000000 </td><td>  1.20000000 </td><td> True </td><td>  </td></tr><tr><td> condensate_fraction </td><td>  0.61564921 </td><td> None </td><td>        -inf </td><td>         inf </td><td> False </td><td> BEC_amplitude / (BEC_amplitude + thermal_amplitude) </td></tr></table>"
      ],
      "text/plain": [
       "Parameters([('BEC_amplitude', <Parameter 'BEC_amplitude', value=637.0411254483137, bounds=[0:inf]>), ('thermal_amplitude', <Parameter 'thermal_amplitude', value=397.7057922330245, bounds=[0:inf]>), ('BEC_centerx', <Parameter 'BEC_centerx', value=72.8975065177683, bounds=[24.294436732015214:121.5005763035214]>), ('BEC_centery', <Parameter 'BEC_centery', value=71.79635371752663, bounds=[55.629269760909324:87.96343767414393]>), ('thermal_centerx', <Parameter 'thermal_centerx', value=74.38262924274176, bounds=[15.716544002995732:133.04871448248778]>), ('thermal_centery', <Parameter 'thermal_centery', value=74.01070987487839, bounds=[18.560765933754475:129.4606538160023]>), ('BEC_sigmax', <Parameter 'BEC_sigmax', value=4.860306978575309, bounds=[-inf:inf], expr='3 * thermal_sigmax - deltax'>), ('BEC_sigmay', <Parameter 'BEC_sigmay', value=1.6167083956617305, bounds=[0:8.083541978308652]>), ('thermal_sigmax', <Parameter 'thermal_sigmax', value=19.555361746582008, bounds=[0:97.77680873291004]>), ('thermal_sigmay', <Parameter 'thermal_sigmay', value=18.483314647041304, bounds=[-inf:inf], expr='thermalAspectRatio * thermal_sigmax'>), ('deltax', <Parameter 'deltax', value=53.805778261170715, bounds=[0:inf]>), ('thermalAspectRatio', <Parameter 'thermalAspectRatio', value=0.945178866367528, bounds=[0.8:1.2]>), ('condensate_fraction', <Parameter 'condensate_fraction', value=0.6156492129261868, bounds=[-inf:inf], expr='BEC_amplitude / (BEC_amplitude + thermal_amplitude)'>)])"
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "params.sel(runs=0, compZ_current_sg=0.195).item()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [],
   "source": [
    "fitResult_1 = fitAnalyser_1.fit(data.sel(runs=0, compZ_current_sg=0.195), params.sel(runs=0, compZ_current_sg=0.195)).load()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "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"
     ]
    },
    {
     "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'>&lt;xarray.Dataset&gt;\n",
       "Dimensions:              (compZ_current_sg: 10, runs: 3)\n",
       "Coordinates:\n",
       "  * compZ_current_sg     (compZ_current_sg) float64 0.195 0.196 ... 0.203 0.204\n",
       "  * runs                 (runs) float64 0.0 1.0 2.0\n",
       "Data variables: (12/13)\n",
       "    BEC_amplitude        (compZ_current_sg, runs) object 689.6738589244688+/-...\n",
       "    thermal_amplitude    (compZ_current_sg, runs) object 0.0+/-nan ... 0.0+/-nan\n",
       "    BEC_centerx          (compZ_current_sg, runs) object 72.72766759442194+/-...\n",
       "    BEC_centery          (compZ_current_sg, runs) object 71.93797641698205+/-...\n",
       "    thermal_centerx      (compZ_current_sg, runs) object 73.54413421644256+/-...\n",
       "    thermal_centery      (compZ_current_sg, runs) object 74.08047311882555+/-...\n",
       "    ...                   ...\n",
       "    BEC_sigmay           (compZ_current_sg, runs) object 8.315587888174065+/-...\n",
       "    thermal_sigmax       (compZ_current_sg, runs) object 86.82572665210536+/-...\n",
       "    thermal_sigmay       (compZ_current_sg, runs) object 81.25225556328859+/-...\n",
       "    deltax               (compZ_current_sg, runs) object 233.58068450863982+/...\n",
       "    thermalAspectRatio   (compZ_current_sg, runs) object 0.9358085292951404+/...\n",
       "    condensate_fraction  (compZ_current_sg, runs) object 1.0+/-nan ... 1.0+/-nan\n",
       "Attributes:\n",
       "    IMAGE_SUBCLASS:       IMAGE_GRAYSCALE\n",
       "    IMAGE_VERSION:        1.2\n",
       "    IMAGE_WHITE_IS_ZERO:  0\n",
       "    x_start:              805\n",
       "    x_end:                955\n",
       "    y_end:                1065\n",
       "    y_start:              915\n",
       "    x_center:             880\n",
       "    y_center:             990\n",
       "    x_span:               150\n",
       "    y_span:               150</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-85b78723-b4e6-419a-a82e-b67f9b95e290' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-85b78723-b4e6-419a-a82e-b67f9b95e290' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>compZ_current_sg</span>: 10</li><li><span class='xr-has-index'>runs</span>: 3</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-540d96e0-a316-411f-a919-b81185a1f7fc' class='xr-section-summary-in' type='checkbox'  checked><label for='section-540d96e0-a316-411f-a919-b81185a1f7fc' class='xr-section-summary' >Coordinates: <span>(2)</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 class='xr-has-index'>compZ_current_sg</span></div><div class='xr-var-dims'>(compZ_current_sg)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.195 0.196 0.197 ... 0.203 0.204</div><input id='attrs-8c24d1d9-4b77-44c7-ae84-a1051fc96235' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-8c24d1d9-4b77-44c7-ae84-a1051fc96235' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-02078451-79f1-43e6-93d0-0b16d2b3cddb' class='xr-var-data-in' type='checkbox'><label for='data-02078451-79f1-43e6-93d0-0b16d2b3cddb' 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.195, 0.196, 0.197, 0.198, 0.199, 0.2  , 0.201, 0.202, 0.203, 0.204])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>runs</span></div><div class='xr-var-dims'>(runs)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0 1.0 2.0</div><input id='attrs-9244fdb5-8138-4439-8b7b-0c346bc261a9' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-9244fdb5-8138-4439-8b7b-0c346bc261a9' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5ab36985-c706-478d-9816-a7932135ffba' class='xr-var-data-in' type='checkbox'><label for='data-5ab36985-c706-478d-9816-a7932135ffba' 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., 1., 2.])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-1c56e838-5fa8-4a9d-b01b-8bf89a7464c2' class='xr-section-summary-in' type='checkbox'  checked><label for='section-1c56e838-5fa8-4a9d-b01b-8bf89a7464c2' class='xr-section-summary' >Data variables: <span>(13)</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'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>689.6738589244688+/-nan ... 505....</div><input id='attrs-d470ea5c-1048-44af-99d4-278d4c605dce' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-d470ea5c-1048-44af-99d4-278d4c605dce' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-33ccac21-2e18-4a22-910d-f6b2e3d25062' class='xr-var-data-in' type='checkbox'><label for='data-33ccac21-2e18-4a22-910d-f6b2e3d25062' 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([[689.6738589244688+/-nan, 715.9689309495448+/-nan,\n",
       "        678.39907423435+/-nan],\n",
       "       [692.5450583097982+/-nan, 709.7153109568274+/-nan,\n",
       "        693.070902295569+/-nan],\n",
       "       [671.9030647731805+/-nan, 763.5527107892661+/-nan,\n",
       "        701.6228860278444+/-nan],\n",
       "       [703.0376002067666+/-nan, 691.0256217303906+/-nan,\n",
       "        698.0049200957969+/-nan],\n",
       "       [713.8173887255239+/-nan, 680.8242923026909+/-nan,\n",
       "        628.8406808124307+/-nan],\n",
       "       [671.7766869904086+/-nan, 668.5923608192708+/-nan,\n",
       "        698.6631413542333+/-nan],\n",
       "       [659.0140752932108+/-nan, 596.3510167435243+/-nan,\n",
       "        632.2665864507762+/-nan],\n",
       "       [619.2762490805766+/-nan, 617.946024341381+/-nan,\n",
       "        640.2602092235951+/-nan],\n",
       "       [636.4920366481963+/-nan, 586.3450868568624+/-nan,\n",
       "        572.5404723960091+/-nan],\n",
       "       [562.1581960978315+/-nan, 601.8578305946143+/-nan,\n",
       "        505.5308972550412+/-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'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>0.0+/-nan 0.0+/-nan ... 0.0+/-nan</div><input id='attrs-755e727f-0bf0-4f3e-843a-2dab00cba93a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-755e727f-0bf0-4f3e-843a-2dab00cba93a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a6b5f3af-f10c-4615-8dfe-c03b44401263' class='xr-var-data-in' type='checkbox'><label for='data-a6b5f3af-f10c-4615-8dfe-c03b44401263' 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, 0.0+/-nan, 0.0+/-nan],\n",
       "       [0.0+/-nan, 0.0+/-nan, 0.0+/-nan],\n",
       "       [0.0+/-nan, 0.0+/-nan, 0.0+/-nan],\n",
       "       [0.0+/-nan, 0.0+/-nan, 0.0+/-nan],\n",
       "       [0.0+/-nan, 0.0+/-nan, 0.0+/-nan],\n",
       "       [0.0+/-nan, 0.0+/-nan, 0.0+/-nan],\n",
       "       [0.0+/-nan, 0.0+/-nan, 0.0+/-nan],\n",
       "       [0.0+/-nan, 0.0+/-nan, 0.0+/-nan],\n",
       "       [0.0+/-nan, 0.0+/-nan, 0.0+/-nan],\n",
       "       [0.0+/-nan, 0.0+/-nan, 0.0+/-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'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>72.72766759442194+/-nan ... 70.0...</div><input id='attrs-35f63dc2-bbf3-4c9c-821f-9c1fa0dbfaaf' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-35f63dc2-bbf3-4c9c-821f-9c1fa0dbfaaf' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7e10eb00-1ddb-4634-8bd8-bdbf44e73678' class='xr-var-data-in' type='checkbox'><label for='data-7e10eb00-1ddb-4634-8bd8-bdbf44e73678' 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([[72.72766759442194+/-nan, 72.71934488859581+/-nan,\n",
       "        71.40355589999807+/-nan],\n",
       "       [70.83342680729962+/-nan, 68.66496511093739+/-nan,\n",
       "        70.29374802397487+/-nan],\n",
       "       [70.76765532584542+/-nan, 71.03271256497091+/-nan,\n",
       "        72.67427312885016+/-nan],\n",
       "       [72.20891853944283+/-nan, 70.38077535505248+/-nan,\n",
       "        70.7339464630603+/-nan],\n",
       "       [70.3178117834581+/-nan, 72.32035180100357+/-nan,\n",
       "        71.63296400536021+/-nan],\n",
       "       [70.87533638684343+/-nan, 70.88128055305225+/-nan,\n",
       "        72.52001102186628+/-nan],\n",
       "       [73.06561017377334+/-nan, 70.0741947920574+/-nan,\n",
       "        71.6924852554308+/-nan],\n",
       "       [72.1222142035208+/-nan, 71.82506798407782+/-nan,\n",
       "        69.85696478117038+/-nan],\n",
       "       [71.15702324146866+/-nan, 70.15080743468083+/-nan,\n",
       "        71.35706452253848+/-nan],\n",
       "       [71.41542581324093+/-nan, 70.62063274120308+/-nan,\n",
       "        70.08904848938136+/-nan]], dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>BEC_centery</span></div><div class='xr-var-dims'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>71.93797641698205+/-nan ... 70.8...</div><input id='attrs-6ea8e18b-3805-4152-bdd7-86bae1e6e7ee' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6ea8e18b-3805-4152-bdd7-86bae1e6e7ee' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c894ede5-ddb7-4a01-a88b-3721bc0f82ea' class='xr-var-data-in' type='checkbox'><label for='data-c894ede5-ddb7-4a01-a88b-3721bc0f82ea' 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([[71.93797641698205+/-nan, 72.6381937001966+/-nan,\n",
       "        72.02512192557639+/-nan],\n",
       "       [71.55174018891496+/-nan, 70.87577074483377+/-nan,\n",
       "        72.4977446833421+/-nan],\n",
       "       [71.34716548816778+/-nan, 70.44251861831816+/-nan,\n",
       "        70.78633409098687+/-nan],\n",
       "       [70.37015516272982+/-nan, 72.97486141381597+/-nan,\n",
       "        71.85640793410928+/-nan],\n",
       "       [71.3331531748868+/-nan, 69.31373705739671+/-nan,\n",
       "        71.93481571209645+/-nan],\n",
       "       [69.33385592249886+/-nan, 71.17080956684265+/-nan,\n",
       "        73.27962703564992+/-nan],\n",
       "       [72.41744755655539+/-nan, 71.47251010551959+/-nan,\n",
       "        71.42576907220035+/-nan],\n",
       "       [69.73001451172685+/-nan, 70.44457455629144+/-nan,\n",
       "        72.22164046797901+/-nan],\n",
       "       [72.21512332594007+/-nan, 70.69934127336529+/-nan,\n",
       "        71.13947812812009+/-nan],\n",
       "       [69.56836922034678+/-nan, 70.64440607038694+/-nan,\n",
       "        70.83100648311071+/-nan]], dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>thermal_centerx</span></div><div class='xr-var-dims'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>73.54413421644256+/-nan ... 70.9...</div><input id='attrs-41a5756f-acda-42a0-a469-e9069b9497c1' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-41a5756f-acda-42a0-a469-e9069b9497c1' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c15db94d-392d-48f0-acb4-1cd4ff293b33' class='xr-var-data-in' type='checkbox'><label for='data-c15db94d-392d-48f0-acb4-1cd4ff293b33' 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([[73.54413421644256+/-nan, 73.30274113050602+/-nan,\n",
       "        71.92304853372369+/-nan],\n",
       "       [71.00483901753078+/-nan, 68.9161916636921+/-nan,\n",
       "        69.86466122796406+/-nan],\n",
       "       [70.79675629053958+/-nan, 71.49749669681296+/-nan,\n",
       "        72.82082446441498+/-nan],\n",
       "       [73.2807451001814+/-nan, 71.68639061568933+/-nan,\n",
       "        71.53256545890429+/-nan],\n",
       "       [70.90654770148933+/-nan, 72.19906890315161+/-nan,\n",
       "        71.67310443723218+/-nan],\n",
       "       [70.73737318190581+/-nan, 71.46506714732851+/-nan,\n",
       "        74.05600639847734+/-nan],\n",
       "       [72.77539585636279+/-nan, 70.47520515991539+/-nan,\n",
       "        72.51736039865762+/-nan],\n",
       "       [72.32662798141047+/-nan, 72.24230286579716+/-nan,\n",
       "        70.73841779714252+/-nan],\n",
       "       [71.16743021062787+/-nan, 70.37056367958343+/-nan,\n",
       "        71.15981995834142+/-nan],\n",
       "       [71.90161813663846+/-nan, 71.46282211339187+/-nan,\n",
       "        70.91060958388397+/-nan]], dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>thermal_centery</span></div><div class='xr-var-dims'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>74.08047311882555+/-nan ... 72.3...</div><input id='attrs-e6b8a1b9-c35e-4ba8-a41f-f1bc5a5eab6a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e6b8a1b9-c35e-4ba8-a41f-f1bc5a5eab6a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2f282012-b605-4fc0-846b-557b91b11120' class='xr-var-data-in' type='checkbox'><label for='data-2f282012-b605-4fc0-846b-557b91b11120' 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([[74.08047311882555+/-nan, 73.62629217434753+/-nan,\n",
       "        73.62520544473455+/-nan],\n",
       "       [72.87625912011066+/-nan, 72.6999927167971+/-nan,\n",
       "        73.76435921973764+/-nan],\n",
       "       [72.6033358300646+/-nan, 72.56878492161754+/-nan,\n",
       "        72.58676659949938+/-nan],\n",
       "       [72.74308214550841+/-nan, 74.18604052561388+/-nan,\n",
       "        73.12900436786026+/-nan],\n",
       "       [72.620379447618+/-nan, 71.40143590558816+/-nan,\n",
       "        73.40067743800589+/-nan],\n",
       "       [70.92167921588822+/-nan, 73.42198207438085+/-nan,\n",
       "        75.22592665604574+/-nan],\n",
       "       [74.13075036384711+/-nan, 72.88427291602504+/-nan,\n",
       "        73.12795529075576+/-nan],\n",
       "       [72.51777171279258+/-nan, 72.93096162147843+/-nan,\n",
       "        74.04389516161456+/-nan],\n",
       "       [73.75867853397996+/-nan, 72.5554168542469+/-nan,\n",
       "        72.86426197278085+/-nan],\n",
       "       [72.12097010480343+/-nan, 72.12419149184741+/-nan,\n",
       "        72.33848082985858+/-nan]], dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>BEC_sigmax</span></div><div class='xr-var-dims'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>26.896495447676273+/-nan ... 25....</div><input id='attrs-a11274a0-8dd4-4972-a53c-e8b7172975be' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-a11274a0-8dd4-4972-a53c-e8b7172975be' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b92aba32-6f9f-41b6-af1c-c3d072d23a36' class='xr-var-data-in' type='checkbox'><label for='data-b92aba32-6f9f-41b6-af1c-c3d072d23a36' 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([[26.896495447676273+/-nan, 27.0325742082552+/-nan,\n",
       "        26.479676881987302+/-nan],\n",
       "       [26.315693756433717+/-nan, 27.244908144332072+/-nan,\n",
       "        27.02759984086839+/-nan],\n",
       "       [26.713107942138123+/-nan, 26.9711867062004+/-nan,\n",
       "        26.987293340194242+/-nan],\n",
       "       [27.641154691028845+/-nan, 26.470827885941674+/-nan,\n",
       "        26.38327779768096+/-nan],\n",
       "       [26.759769526175404+/-nan, 26.660578970567798+/-nan,\n",
       "        26.3428112841589+/-nan],\n",
       "       [26.78446860717432+/-nan, 27.111706894893814+/-nan,\n",
       "        26.6854888514423+/-nan],\n",
       "       [26.516327819324886+/-nan, 26.050621310128548+/-nan,\n",
       "        27.45170198499784+/-nan],\n",
       "       [26.34825532680844+/-nan, 26.719568712533402+/-nan,\n",
       "        26.426454164620168+/-nan],\n",
       "       [25.85371437669528+/-nan, 26.865199333328206+/-nan,\n",
       "        25.83529222770207+/-nan],\n",
       "       [26.253152412705276+/-nan, 26.347280678246875+/-nan,\n",
       "        25.591605982303747+/-nan]], dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>BEC_sigmay</span></div><div class='xr-var-dims'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>8.315587888174065+/-nan ... 7.70...</div><input id='attrs-9c71929f-6fb4-4a80-b512-f44ec38124d2' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-9c71929f-6fb4-4a80-b512-f44ec38124d2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-471e3f5f-26dc-4346-9fa4-c59720755910' class='xr-var-data-in' type='checkbox'><label for='data-471e3f5f-26dc-4346-9fa4-c59720755910' 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([[8.315587888174065+/-nan, 8.782235758255771+/-nan,\n",
       "        8.437766586779095+/-nan],\n",
       "       [8.529205764813772+/-nan, 8.511414989849603+/-nan,\n",
       "        8.429409693985567+/-nan],\n",
       "       [8.967636353540735+/-nan, 9.164394391604722+/-nan,\n",
       "        8.606991456397717+/-nan],\n",
       "       [9.233793777545207+/-nan, 8.582932310143866+/-nan,\n",
       "        8.265777917899998+/-nan],\n",
       "       [8.397604136244158+/-nan, 8.59086220029662+/-nan,\n",
       "        8.157109611196294+/-nan],\n",
       "       [8.627906789844802+/-nan, 8.256198791171032+/-nan,\n",
       "        8.640826875042585+/-nan],\n",
       "       [8.14338113151272+/-nan, 8.220716306663133+/-nan,\n",
       "        8.48807755362483+/-nan],\n",
       "       [8.246264238222604+/-nan, 8.634373369783843+/-nan,\n",
       "        8.247200673198572+/-nan],\n",
       "       [10.334307171965747+/-nan, 8.022444912030716+/-nan,\n",
       "        8.115392321803794+/-nan],\n",
       "       [8.495199941648103+/-nan, 8.485154844745717+/-nan,\n",
       "        7.709214756106329+/-nan]], dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>thermal_sigmax</span></div><div class='xr-var-dims'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>86.82572665210536+/-nan ... 82.5...</div><input id='attrs-be0cccab-618b-4a16-bbea-12184db7aec1' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-be0cccab-618b-4a16-bbea-12184db7aec1' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-25d3f76e-aef5-4131-a06c-f722f065d250' class='xr-var-data-in' type='checkbox'><label for='data-25d3f76e-aef5-4131-a06c-f722f065d250' 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([[86.82572665210536+/-nan, 71.59852761893276+/-nan,\n",
       "        83.87370192103053+/-nan],\n",
       "       [81.43219928653899+/-nan, 92.66676021573817+/-nan,\n",
       "        76.37885478459056+/-nan],\n",
       "       [78.24219536265402+/-nan, 76.26902196708801+/-nan,\n",
       "        73.17435018641264+/-nan],\n",
       "       [70.8440059901167+/-nan, 84.83185559838373+/-nan,\n",
       "        89.59878886970975+/-nan],\n",
       "       [92.25586777309792+/-nan, 75.93305747810473+/-nan,\n",
       "        75.04395198742893+/-nan],\n",
       "       [86.55825348791429+/-nan, 87.95181807386554+/-nan,\n",
       "        92.1624263432616+/-nan],\n",
       "       [84.09836215498714+/-nan, 80.74406538220822+/-nan,\n",
       "        83.62396899899504+/-nan],\n",
       "       [72.55523806865114+/-nan, 84.46730135582732+/-nan,\n",
       "        73.87356268023888+/-nan],\n",
       "       [90.73267205327764+/-nan, 74.50432786545196+/-nan,\n",
       "        87.60209625408987+/-nan],\n",
       "       [77.83520249094289+/-nan, 83.7594063318159+/-nan,\n",
       "        82.57851746784988+/-nan]], dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>thermal_sigmay</span></div><div class='xr-var-dims'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>81.25225556328859+/-nan ... 79.4...</div><input id='attrs-e6e872db-477a-424b-a1cd-2fd2b6688e06' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e6e872db-477a-424b-a1cd-2fd2b6688e06' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4a3e3279-2918-4ff7-bf45-bcbd3573be14' class='xr-var-data-in' type='checkbox'><label for='data-4a3e3279-2918-4ff7-bf45-bcbd3573be14' 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([[81.25225556328859+/-nan, 61.95483669688191+/-nan,\n",
       "        78.75323107717729+/-nan],\n",
       "       [74.70732651156752+/-nan, 86.87150425190022+/-nan,\n",
       "        68.50907599986216+/-nan],\n",
       "       [68.76379284998367+/-nan, 68.36583766085947+/-nan,\n",
       "        70.0952760020868+/-nan],\n",
       "       [63.712746170899784+/-nan, 76.46633870305563+/-nan,\n",
       "        81.5164971076558+/-nan],\n",
       "       [85.57776753084637+/-nan, 70.11409857464966+/-nan,\n",
       "        65.9021485593791+/-nan],\n",
       "       [79.78542663388451+/-nan, 83.10109517361872+/-nan,\n",
       "        82.35948784709004+/-nan],\n",
       "       [76.94153076049392+/-nan, 73.31782172661772+/-nan,\n",
       "        76.97840260007256+/-nan],\n",
       "       [70.23041620669188+/-nan, 80.23679101803242+/-nan,\n",
       "        66.09756880496701+/-nan],\n",
       "       [108.87920646393316+/-nan, 64.6550573761848+/-nan,\n",
       "        80.2343621274528+/-nan],\n",
       "       [72.15165082016149+/-nan, 77.71732820925727+/-nan,\n",
       "        79.45951777679701+/-nan]], dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>deltax</span></div><div class='xr-var-dims'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>233.58068450863982+/-nan ... 222...</div><input id='attrs-21757c6e-666f-47c7-90f8-f9ba64d42fe5' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-21757c6e-666f-47c7-90f8-f9ba64d42fe5' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3f85f186-6be0-4384-be12-27ac158005ba' class='xr-var-data-in' type='checkbox'><label for='data-3f85f186-6be0-4384-be12-27ac158005ba' 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([[233.58068450863982+/-nan, 187.7630086485431+/-nan,\n",
       "        225.14142888110428+/-nan],\n",
       "       [217.98090410318324+/-nan, 250.7553725028824+/-nan,\n",
       "        202.1089645129033+/-nan],\n",
       "       [208.01347814582394+/-nan, 201.83587919506363+/-nan,\n",
       "        192.53575721904366+/-nan],\n",
       "       [184.89086327932125+/-nan, 228.0247389092095+/-nan,\n",
       "        242.41308881144826+/-nan],\n",
       "       [250.00783379311835+/-nan, 201.1385934637464+/-nan,\n",
       "        198.78904467812788+/-nan],\n",
       "       [232.89029185656855+/-nan, 236.74374732670282+/-nan,\n",
       "        249.80179017834251+/-nan],\n",
       "       [225.77875864563654+/-nan, 216.1815748364961+/-nan,\n",
       "        223.42020501198726+/-nan],\n",
       "       [191.31745887914497+/-nan, 226.68233535494855+/-nan,\n",
       "        195.19423387609646+/-nan],\n",
       "       [246.34430178313767+/-nan, 196.64778426302766+/-nan,\n",
       "        236.97099653456755+/-nan],\n",
       "       [207.2524550601234+/-nan, 224.9309383172008+/-nan,\n",
       "        222.1439464212459+/-nan]], dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>thermalAspectRatio</span></div><div class='xr-var-dims'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>0.9358085292951404+/-nan ... 0.9...</div><input id='attrs-0b0eba8b-9176-4ab8-8eb9-e813489b2880' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-0b0eba8b-9176-4ab8-8eb9-e813489b2880' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f8a61623-4da8-4c3b-ad5c-1c19d6a230e4' class='xr-var-data-in' type='checkbox'><label for='data-f8a61623-4da8-4c3b-ad5c-1c19d6a230e4' 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.9358085292951404+/-nan, 0.8653088095138317+/-nan,\n",
       "        0.9389502224585925+/-nan],\n",
       "       [0.917417522381922+/-nan, 0.937461329711474+/-nan,\n",
       "        0.8969639070011807+/-nan],\n",
       "       [0.8788581727706161+/-nan, 0.8963775317633028+/-nan,\n",
       "        0.9579214003748328+/-nan],\n",
       "       [0.8993385577290508+/-nan, 0.9013870811109844+/-nan,\n",
       "        0.9097946315568302+/-nan],\n",
       "       [0.9276132737846415+/-nan, 0.9233672514091381+/-nan,\n",
       "        0.8781806769773902+/-nan],\n",
       "       [0.9217541183987102+/-nan, 0.9448479519073387+/-nan,\n",
       "        0.8936341100693223+/-nan],\n",
       "       [0.9148992773330864+/-nan, 0.9080273748858471+/-nan,\n",
       "        0.9205303637405402+/-nan],\n",
       "       [0.96795790457252+/-nan, 0.9499154078573739+/-nan,\n",
       "        0.8947391516917874+/-nan],\n",
       "       [1.2+/-nan, 0.8678027066151909+/-nan, 0.9158954586512751+/-nan],\n",
       "       [0.9269796764331312+/-nan, 0.9278638855363573+/-nan,\n",
       "        0.9622298899678458+/-nan]], dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>condensate_fraction</span></div><div class='xr-var-dims'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>1.0+/-nan 1.0+/-nan ... 1.0+/-nan</div><input id='attrs-ab430e3e-e622-44e7-af94-1a3483b6e081' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ab430e3e-e622-44e7-af94-1a3483b6e081' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9aa9f244-9242-4a77-b9fa-67dba69fe136' class='xr-var-data-in' type='checkbox'><label for='data-9aa9f244-9242-4a77-b9fa-67dba69fe136' 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([[1.0+/-nan, 1.0+/-nan, 1.0+/-nan],\n",
       "       [1.0+/-nan, 1.0+/-nan, 1.0+/-nan],\n",
       "       [1.0+/-nan, 1.0+/-nan, 1.0+/-nan],\n",
       "       [1.0+/-nan, 1.0+/-nan, 1.0+/-nan],\n",
       "       [1.0+/-nan, 1.0+/-nan, 1.0+/-nan],\n",
       "       [1.0+/-nan, 1.0+/-nan, 1.0+/-nan],\n",
       "       [1.0+/-nan, 1.0+/-nan, 1.0+/-nan],\n",
       "       [1.0+/-nan, 1.0+/-nan, 1.0+/-nan],\n",
       "       [1.0+/-nan, 1.0+/-nan, 1.0+/-nan],\n",
       "       [1.0+/-nan, 1.0+/-nan, 1.0+/-nan]], dtype=object)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-e3cf7b9f-e5e2-47ae-a96e-78c485f96b00' class='xr-section-summary-in' type='checkbox'  ><label for='section-e3cf7b9f-e5e2-47ae-a96e-78c485f96b00' class='xr-section-summary' >Indexes: <span>(2)</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-index-name'><div>compZ_current_sg</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-2e427862-3c88-47f3-8ccf-18f2738047b4' class='xr-index-data-in' type='checkbox'/><label for='index-2e427862-3c88-47f3-8ccf-18f2738047b4' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Float64Index([0.195, 0.196, 0.197, 0.198, 0.199, 0.2, 0.201, 0.202, 0.203,\n",
       "              0.204],\n",
       "             dtype=&#x27;float64&#x27;, name=&#x27;compZ_current_sg&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>runs</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-264b65b5-3e19-4204-ae7b-e3b355793b39' class='xr-index-data-in' type='checkbox'/><label for='index-264b65b5-3e19-4204-ae7b-e3b355793b39' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Float64Index([0.0, 1.0, 2.0], dtype=&#x27;float64&#x27;, name=&#x27;runs&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-070dda3f-03d2-443a-9f43-b2edc6940404' class='xr-section-summary-in' type='checkbox'  ><label for='section-070dda3f-03d2-443a-9f43-b2edc6940404' class='xr-section-summary' >Attributes: <span>(11)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><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><dt><span>x_start :</span></dt><dd>805</dd><dt><span>x_end :</span></dt><dd>955</dd><dt><span>y_end :</span></dt><dd>1065</dd><dt><span>y_start :</span></dt><dd>915</dd><dt><span>x_center :</span></dt><dd>880</dd><dt><span>y_center :</span></dt><dd>990</dd><dt><span>x_span :</span></dt><dd>150</dd><dt><span>y_span :</span></dt><dd>150</dd></dl></div></li></ul></div></div>"
      ],
      "text/plain": [
       "<xarray.Dataset>\n",
       "Dimensions:              (compZ_current_sg: 10, runs: 3)\n",
       "Coordinates:\n",
       "  * compZ_current_sg     (compZ_current_sg) float64 0.195 0.196 ... 0.203 0.204\n",
       "  * runs                 (runs) float64 0.0 1.0 2.0\n",
       "Data variables: (12/13)\n",
       "    BEC_amplitude        (compZ_current_sg, runs) object 689.6738589244688+/-...\n",
       "    thermal_amplitude    (compZ_current_sg, runs) object 0.0+/-nan ... 0.0+/-nan\n",
       "    BEC_centerx          (compZ_current_sg, runs) object 72.72766759442194+/-...\n",
       "    BEC_centery          (compZ_current_sg, runs) object 71.93797641698205+/-...\n",
       "    thermal_centerx      (compZ_current_sg, runs) object 73.54413421644256+/-...\n",
       "    thermal_centery      (compZ_current_sg, runs) object 74.08047311882555+/-...\n",
       "    ...                   ...\n",
       "    BEC_sigmay           (compZ_current_sg, runs) object 8.315587888174065+/-...\n",
       "    thermal_sigmax       (compZ_current_sg, runs) object 86.82572665210536+/-...\n",
       "    thermal_sigmay       (compZ_current_sg, runs) object 81.25225556328859+/-...\n",
       "    deltax               (compZ_current_sg, runs) object 233.58068450863982+/...\n",
       "    thermalAspectRatio   (compZ_current_sg, runs) object 0.9358085292951404+/...\n",
       "    condensate_fraction  (compZ_current_sg, runs) object 1.0+/-nan ... 1.0+/-nan\n",
       "Attributes:\n",
       "    IMAGE_SUBCLASS:       IMAGE_GRAYSCALE\n",
       "    IMAGE_VERSION:        1.2\n",
       "    IMAGE_WHITE_IS_ZERO:  0\n",
       "    x_start:              805\n",
       "    x_end:                955\n",
       "    y_end:                1065\n",
       "    y_start:              915\n",
       "    x_center:             880\n",
       "    y_center:             990\n",
       "    x_span:               150\n",
       "    y_span:               150"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "fitAnalyser_1.get_fit_full_result(fitResult_1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [],
   "source": [
    "fitCurve = fitAnalyser_1.eval(fitResult_1, x=np.arange(150), y=np.arange(150), dask=\"parallelized\").load()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<xarray.plot.facetgrid.FacetGrid at 0x2457e7e1d00>"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 141152 characters]",
      "text/plain": [
       "<Figure size 3100x900 with 31 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fitCurve.plot.pcolormesh(cmap='jet', col=scanAxis[0], row=scanAxis[1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 26840 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "val = fitAnalyser_1.get_fit_value(fitResult_1)\n",
    "std = fitAnalyser_1.get_fit_std(fitResult_1)\n",
    "\n",
    "data = val['condensate_fraction']\n",
    "data_std = std['condensate_fraction']\n",
    "\n",
    "data.plot.errorbar(x=scanAxis[0], hue=scanAxis[1], fmt='o')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<ErrorbarContainer object of 3 artists>"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 22828 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "data = data.sel(runs=[0, 1])\n",
    "data_mean = calculate_mean(data)\n",
    "data_std = calculate_std(data)\n",
    "\n",
    "data_mean.plot.errorbar(x=scanAxis[0], yerr=data_std, fmt='o')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "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"
     ]
    },
    {
     "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'>&lt;xarray.Dataset&gt;\n",
       "Dimensions:              (compZ_current_sg: 10, runs: 3)\n",
       "Coordinates:\n",
       "  * compZ_current_sg     (compZ_current_sg) float64 0.195 0.196 ... 0.203 0.204\n",
       "  * runs                 (runs) float64 0.0 1.0 2.0\n",
       "Data variables: (12/13)\n",
       "    BEC_amplitude        (compZ_current_sg, runs) object 689.6738589244688+/-...\n",
       "    thermal_amplitude    (compZ_current_sg, runs) object 0.0+/-nan ... 0.0+/-nan\n",
       "    BEC_centerx          (compZ_current_sg, runs) object 72.72766759442194+/-...\n",
       "    BEC_centery          (compZ_current_sg, runs) object 71.93797641698205+/-...\n",
       "    thermal_centerx      (compZ_current_sg, runs) object 73.54413421644256+/-...\n",
       "    thermal_centery      (compZ_current_sg, runs) object 74.08047311882555+/-...\n",
       "    ...                   ...\n",
       "    BEC_sigmay           (compZ_current_sg, runs) object 8.315587888174065+/-...\n",
       "    thermal_sigmax       (compZ_current_sg, runs) object 86.82572665210536+/-...\n",
       "    thermal_sigmay       (compZ_current_sg, runs) object 81.25225556328859+/-...\n",
       "    deltax               (compZ_current_sg, runs) object 233.58068450863982+/...\n",
       "    thermalAspectRatio   (compZ_current_sg, runs) object 0.9358085292951404+/...\n",
       "    condensate_fraction  (compZ_current_sg, runs) object 1.0+/-nan ... 1.0+/-nan\n",
       "Attributes:\n",
       "    IMAGE_SUBCLASS:       IMAGE_GRAYSCALE\n",
       "    IMAGE_VERSION:        1.2\n",
       "    IMAGE_WHITE_IS_ZERO:  0\n",
       "    x_start:              805\n",
       "    x_end:                955\n",
       "    y_end:                1065\n",
       "    y_start:              915\n",
       "    x_center:             880\n",
       "    y_center:             990\n",
       "    x_span:               150\n",
       "    y_span:               150</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-33a03347-635f-4e2f-a5d3-df79adba0cad' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-33a03347-635f-4e2f-a5d3-df79adba0cad' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>compZ_current_sg</span>: 10</li><li><span class='xr-has-index'>runs</span>: 3</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-7856859d-8f08-444d-a62b-68fc1f9eb730' class='xr-section-summary-in' type='checkbox'  checked><label for='section-7856859d-8f08-444d-a62b-68fc1f9eb730' class='xr-section-summary' >Coordinates: <span>(2)</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 class='xr-has-index'>compZ_current_sg</span></div><div class='xr-var-dims'>(compZ_current_sg)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.195 0.196 0.197 ... 0.203 0.204</div><input id='attrs-0cc9cd0e-1960-4550-8338-7ce2383f3b48' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-0cc9cd0e-1960-4550-8338-7ce2383f3b48' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8cc942a8-8947-421b-9910-5b08d06cec29' class='xr-var-data-in' type='checkbox'><label for='data-8cc942a8-8947-421b-9910-5b08d06cec29' 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.195, 0.196, 0.197, 0.198, 0.199, 0.2  , 0.201, 0.202, 0.203, 0.204])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>runs</span></div><div class='xr-var-dims'>(runs)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0 1.0 2.0</div><input id='attrs-683036f9-22c7-4e6c-a2a2-13581c608c8d' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-683036f9-22c7-4e6c-a2a2-13581c608c8d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1c995726-80e3-4a7a-967b-ba6fcb5cce18' class='xr-var-data-in' type='checkbox'><label for='data-1c995726-80e3-4a7a-967b-ba6fcb5cce18' 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., 1., 2.])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-ec3f9762-a2a2-44f7-9831-d18466a23b54' class='xr-section-summary-in' type='checkbox'  checked><label for='section-ec3f9762-a2a2-44f7-9831-d18466a23b54' class='xr-section-summary' >Data variables: <span>(13)</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'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>689.6738589244688+/-nan ... 505....</div><input id='attrs-9d483981-f747-4a5a-8ffe-38aba660f3d8' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-9d483981-f747-4a5a-8ffe-38aba660f3d8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-43600e21-a38c-4a20-81b6-1b71a7e31b5c' class='xr-var-data-in' type='checkbox'><label for='data-43600e21-a38c-4a20-81b6-1b71a7e31b5c' 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([[689.6738589244688+/-nan, 715.9689309495448+/-nan,\n",
       "        678.39907423435+/-nan],\n",
       "       [692.5450583097982+/-nan, 709.7153109568274+/-nan,\n",
       "        693.070902295569+/-nan],\n",
       "       [671.9030647731805+/-nan, 763.5527107892661+/-nan,\n",
       "        701.6228860278444+/-nan],\n",
       "       [703.0376002067666+/-nan, 691.0256217303906+/-nan,\n",
       "        698.0049200957969+/-nan],\n",
       "       [713.8173887255239+/-nan, 680.8242923026909+/-nan,\n",
       "        628.8406808124307+/-nan],\n",
       "       [671.7766869904086+/-nan, 668.5923608192708+/-nan,\n",
       "        698.6631413542333+/-nan],\n",
       "       [659.0140752932108+/-nan, 596.3510167435243+/-nan,\n",
       "        632.2665864507762+/-nan],\n",
       "       [619.2762490805766+/-nan, 617.946024341381+/-nan,\n",
       "        640.2602092235951+/-nan],\n",
       "       [636.4920366481963+/-nan, 586.3450868568624+/-nan,\n",
       "        572.5404723960091+/-nan],\n",
       "       [562.1581960978315+/-nan, 601.8578305946143+/-nan,\n",
       "        505.5308972550412+/-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'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>0.0+/-nan 0.0+/-nan ... 0.0+/-nan</div><input id='attrs-4f4279dd-9275-4e09-8946-5047ebfb0b5a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-4f4279dd-9275-4e09-8946-5047ebfb0b5a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-33f02b00-e9f5-4798-85fe-61139c2c18bc' class='xr-var-data-in' type='checkbox'><label for='data-33f02b00-e9f5-4798-85fe-61139c2c18bc' 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, 0.0+/-nan, 0.0+/-nan],\n",
       "       [0.0+/-nan, 0.0+/-nan, 0.0+/-nan],\n",
       "       [0.0+/-nan, 0.0+/-nan, 0.0+/-nan],\n",
       "       [0.0+/-nan, 0.0+/-nan, 0.0+/-nan],\n",
       "       [0.0+/-nan, 0.0+/-nan, 0.0+/-nan],\n",
       "       [0.0+/-nan, 0.0+/-nan, 0.0+/-nan],\n",
       "       [0.0+/-nan, 0.0+/-nan, 0.0+/-nan],\n",
       "       [0.0+/-nan, 0.0+/-nan, 0.0+/-nan],\n",
       "       [0.0+/-nan, 0.0+/-nan, 0.0+/-nan],\n",
       "       [0.0+/-nan, 0.0+/-nan, 0.0+/-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'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>72.72766759442194+/-nan ... 70.0...</div><input id='attrs-06456cfe-f594-4225-824d-4d29dcc4c68a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-06456cfe-f594-4225-824d-4d29dcc4c68a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-44dd8410-d7ed-4fed-ae1b-b8beee69327c' class='xr-var-data-in' type='checkbox'><label for='data-44dd8410-d7ed-4fed-ae1b-b8beee69327c' 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([[72.72766759442194+/-nan, 72.71934488859581+/-nan,\n",
       "        71.40355589999807+/-nan],\n",
       "       [70.83342680729962+/-nan, 68.66496511093739+/-nan,\n",
       "        70.29374802397487+/-nan],\n",
       "       [70.76765532584542+/-nan, 71.03271256497091+/-nan,\n",
       "        72.67427312885016+/-nan],\n",
       "       [72.20891853944283+/-nan, 70.38077535505248+/-nan,\n",
       "        70.7339464630603+/-nan],\n",
       "       [70.3178117834581+/-nan, 72.32035180100357+/-nan,\n",
       "        71.63296400536021+/-nan],\n",
       "       [70.87533638684343+/-nan, 70.88128055305225+/-nan,\n",
       "        72.52001102186628+/-nan],\n",
       "       [73.06561017377334+/-nan, 70.0741947920574+/-nan,\n",
       "        71.6924852554308+/-nan],\n",
       "       [72.1222142035208+/-nan, 71.82506798407782+/-nan,\n",
       "        69.85696478117038+/-nan],\n",
       "       [71.15702324146866+/-nan, 70.15080743468083+/-nan,\n",
       "        71.35706452253848+/-nan],\n",
       "       [71.41542581324093+/-nan, 70.62063274120308+/-nan,\n",
       "        70.08904848938136+/-nan]], dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>BEC_centery</span></div><div class='xr-var-dims'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>71.93797641698205+/-nan ... 70.8...</div><input id='attrs-13278abc-ce92-4663-8f0d-ac92a42c1067' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-13278abc-ce92-4663-8f0d-ac92a42c1067' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f535313e-90d0-4e18-b4fa-ecbec787f2ab' class='xr-var-data-in' type='checkbox'><label for='data-f535313e-90d0-4e18-b4fa-ecbec787f2ab' 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([[71.93797641698205+/-nan, 72.6381937001966+/-nan,\n",
       "        72.02512192557639+/-nan],\n",
       "       [71.55174018891496+/-nan, 70.87577074483377+/-nan,\n",
       "        72.4977446833421+/-nan],\n",
       "       [71.34716548816778+/-nan, 70.44251861831816+/-nan,\n",
       "        70.78633409098687+/-nan],\n",
       "       [70.37015516272982+/-nan, 72.97486141381597+/-nan,\n",
       "        71.85640793410928+/-nan],\n",
       "       [71.3331531748868+/-nan, 69.31373705739671+/-nan,\n",
       "        71.93481571209645+/-nan],\n",
       "       [69.33385592249886+/-nan, 71.17080956684265+/-nan,\n",
       "        73.27962703564992+/-nan],\n",
       "       [72.41744755655539+/-nan, 71.47251010551959+/-nan,\n",
       "        71.42576907220035+/-nan],\n",
       "       [69.73001451172685+/-nan, 70.44457455629144+/-nan,\n",
       "        72.22164046797901+/-nan],\n",
       "       [72.21512332594007+/-nan, 70.69934127336529+/-nan,\n",
       "        71.13947812812009+/-nan],\n",
       "       [69.56836922034678+/-nan, 70.64440607038694+/-nan,\n",
       "        70.83100648311071+/-nan]], dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>thermal_centerx</span></div><div class='xr-var-dims'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>73.54413421644256+/-nan ... 70.9...</div><input id='attrs-f0de6890-3cb9-4797-b0b9-08950b2969eb' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f0de6890-3cb9-4797-b0b9-08950b2969eb' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2d68f0e5-2165-4773-8c04-a3ae45920229' class='xr-var-data-in' type='checkbox'><label for='data-2d68f0e5-2165-4773-8c04-a3ae45920229' 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([[73.54413421644256+/-nan, 73.30274113050602+/-nan,\n",
       "        71.92304853372369+/-nan],\n",
       "       [71.00483901753078+/-nan, 68.9161916636921+/-nan,\n",
       "        69.86466122796406+/-nan],\n",
       "       [70.79675629053958+/-nan, 71.49749669681296+/-nan,\n",
       "        72.82082446441498+/-nan],\n",
       "       [73.2807451001814+/-nan, 71.68639061568933+/-nan,\n",
       "        71.53256545890429+/-nan],\n",
       "       [70.90654770148933+/-nan, 72.19906890315161+/-nan,\n",
       "        71.67310443723218+/-nan],\n",
       "       [70.73737318190581+/-nan, 71.46506714732851+/-nan,\n",
       "        74.05600639847734+/-nan],\n",
       "       [72.77539585636279+/-nan, 70.47520515991539+/-nan,\n",
       "        72.51736039865762+/-nan],\n",
       "       [72.32662798141047+/-nan, 72.24230286579716+/-nan,\n",
       "        70.73841779714252+/-nan],\n",
       "       [71.16743021062787+/-nan, 70.37056367958343+/-nan,\n",
       "        71.15981995834142+/-nan],\n",
       "       [71.90161813663846+/-nan, 71.46282211339187+/-nan,\n",
       "        70.91060958388397+/-nan]], dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>thermal_centery</span></div><div class='xr-var-dims'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>74.08047311882555+/-nan ... 72.3...</div><input id='attrs-6f945b1a-67bc-46e6-8b30-34acf1e5a021' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6f945b1a-67bc-46e6-8b30-34acf1e5a021' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0494c586-4554-44cc-9e28-6135184ff2d3' class='xr-var-data-in' type='checkbox'><label for='data-0494c586-4554-44cc-9e28-6135184ff2d3' 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([[74.08047311882555+/-nan, 73.62629217434753+/-nan,\n",
       "        73.62520544473455+/-nan],\n",
       "       [72.87625912011066+/-nan, 72.6999927167971+/-nan,\n",
       "        73.76435921973764+/-nan],\n",
       "       [72.6033358300646+/-nan, 72.56878492161754+/-nan,\n",
       "        72.58676659949938+/-nan],\n",
       "       [72.74308214550841+/-nan, 74.18604052561388+/-nan,\n",
       "        73.12900436786026+/-nan],\n",
       "       [72.620379447618+/-nan, 71.40143590558816+/-nan,\n",
       "        73.40067743800589+/-nan],\n",
       "       [70.92167921588822+/-nan, 73.42198207438085+/-nan,\n",
       "        75.22592665604574+/-nan],\n",
       "       [74.13075036384711+/-nan, 72.88427291602504+/-nan,\n",
       "        73.12795529075576+/-nan],\n",
       "       [72.51777171279258+/-nan, 72.93096162147843+/-nan,\n",
       "        74.04389516161456+/-nan],\n",
       "       [73.75867853397996+/-nan, 72.5554168542469+/-nan,\n",
       "        72.86426197278085+/-nan],\n",
       "       [72.12097010480343+/-nan, 72.12419149184741+/-nan,\n",
       "        72.33848082985858+/-nan]], dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>BEC_sigmax</span></div><div class='xr-var-dims'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>26.896495447676273+/-nan ... 25....</div><input id='attrs-e6bdad93-ede4-4e28-977d-f3425ddb48fb' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e6bdad93-ede4-4e28-977d-f3425ddb48fb' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-991df3de-abb6-482f-ad91-de995ba1dcca' class='xr-var-data-in' type='checkbox'><label for='data-991df3de-abb6-482f-ad91-de995ba1dcca' 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([[26.896495447676273+/-nan, 27.0325742082552+/-nan,\n",
       "        26.479676881987302+/-nan],\n",
       "       [26.315693756433717+/-nan, 27.244908144332072+/-nan,\n",
       "        27.02759984086839+/-nan],\n",
       "       [26.713107942138123+/-nan, 26.9711867062004+/-nan,\n",
       "        26.987293340194242+/-nan],\n",
       "       [27.641154691028845+/-nan, 26.470827885941674+/-nan,\n",
       "        26.38327779768096+/-nan],\n",
       "       [26.759769526175404+/-nan, 26.660578970567798+/-nan,\n",
       "        26.3428112841589+/-nan],\n",
       "       [26.78446860717432+/-nan, 27.111706894893814+/-nan,\n",
       "        26.6854888514423+/-nan],\n",
       "       [26.516327819324886+/-nan, 26.050621310128548+/-nan,\n",
       "        27.45170198499784+/-nan],\n",
       "       [26.34825532680844+/-nan, 26.719568712533402+/-nan,\n",
       "        26.426454164620168+/-nan],\n",
       "       [25.85371437669528+/-nan, 26.865199333328206+/-nan,\n",
       "        25.83529222770207+/-nan],\n",
       "       [26.253152412705276+/-nan, 26.347280678246875+/-nan,\n",
       "        25.591605982303747+/-nan]], dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>BEC_sigmay</span></div><div class='xr-var-dims'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>8.315587888174065+/-nan ... 7.70...</div><input id='attrs-ce54c9ce-a5fa-49ba-aaa8-a4fea8d049f7' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ce54c9ce-a5fa-49ba-aaa8-a4fea8d049f7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a1ca6d21-f996-4091-994b-5d3ed367bcb8' class='xr-var-data-in' type='checkbox'><label for='data-a1ca6d21-f996-4091-994b-5d3ed367bcb8' 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([[8.315587888174065+/-nan, 8.782235758255771+/-nan,\n",
       "        8.437766586779095+/-nan],\n",
       "       [8.529205764813772+/-nan, 8.511414989849603+/-nan,\n",
       "        8.429409693985567+/-nan],\n",
       "       [8.967636353540735+/-nan, 9.164394391604722+/-nan,\n",
       "        8.606991456397717+/-nan],\n",
       "       [9.233793777545207+/-nan, 8.582932310143866+/-nan,\n",
       "        8.265777917899998+/-nan],\n",
       "       [8.397604136244158+/-nan, 8.59086220029662+/-nan,\n",
       "        8.157109611196294+/-nan],\n",
       "       [8.627906789844802+/-nan, 8.256198791171032+/-nan,\n",
       "        8.640826875042585+/-nan],\n",
       "       [8.14338113151272+/-nan, 8.220716306663133+/-nan,\n",
       "        8.48807755362483+/-nan],\n",
       "       [8.246264238222604+/-nan, 8.634373369783843+/-nan,\n",
       "        8.247200673198572+/-nan],\n",
       "       [10.334307171965747+/-nan, 8.022444912030716+/-nan,\n",
       "        8.115392321803794+/-nan],\n",
       "       [8.495199941648103+/-nan, 8.485154844745717+/-nan,\n",
       "        7.709214756106329+/-nan]], dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>thermal_sigmax</span></div><div class='xr-var-dims'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>86.82572665210536+/-nan ... 82.5...</div><input id='attrs-66a6aff3-3dae-4b3c-95b4-910117493779' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-66a6aff3-3dae-4b3c-95b4-910117493779' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-35a3739b-0403-42a8-90d3-62fa8f79fcd2' class='xr-var-data-in' type='checkbox'><label for='data-35a3739b-0403-42a8-90d3-62fa8f79fcd2' 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([[86.82572665210536+/-nan, 71.59852761893276+/-nan,\n",
       "        83.87370192103053+/-nan],\n",
       "       [81.43219928653899+/-nan, 92.66676021573817+/-nan,\n",
       "        76.37885478459056+/-nan],\n",
       "       [78.24219536265402+/-nan, 76.26902196708801+/-nan,\n",
       "        73.17435018641264+/-nan],\n",
       "       [70.8440059901167+/-nan, 84.83185559838373+/-nan,\n",
       "        89.59878886970975+/-nan],\n",
       "       [92.25586777309792+/-nan, 75.93305747810473+/-nan,\n",
       "        75.04395198742893+/-nan],\n",
       "       [86.55825348791429+/-nan, 87.95181807386554+/-nan,\n",
       "        92.1624263432616+/-nan],\n",
       "       [84.09836215498714+/-nan, 80.74406538220822+/-nan,\n",
       "        83.62396899899504+/-nan],\n",
       "       [72.55523806865114+/-nan, 84.46730135582732+/-nan,\n",
       "        73.87356268023888+/-nan],\n",
       "       [90.73267205327764+/-nan, 74.50432786545196+/-nan,\n",
       "        87.60209625408987+/-nan],\n",
       "       [77.83520249094289+/-nan, 83.7594063318159+/-nan,\n",
       "        82.57851746784988+/-nan]], dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>thermal_sigmay</span></div><div class='xr-var-dims'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>81.25225556328859+/-nan ... 79.4...</div><input id='attrs-37305f5f-db5d-4263-be4b-fd9bce83e1dc' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-37305f5f-db5d-4263-be4b-fd9bce83e1dc' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-cd182249-4b22-43ed-8735-7c696353b5d0' class='xr-var-data-in' type='checkbox'><label for='data-cd182249-4b22-43ed-8735-7c696353b5d0' 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([[81.25225556328859+/-nan, 61.95483669688191+/-nan,\n",
       "        78.75323107717729+/-nan],\n",
       "       [74.70732651156752+/-nan, 86.87150425190022+/-nan,\n",
       "        68.50907599986216+/-nan],\n",
       "       [68.76379284998367+/-nan, 68.36583766085947+/-nan,\n",
       "        70.0952760020868+/-nan],\n",
       "       [63.712746170899784+/-nan, 76.46633870305563+/-nan,\n",
       "        81.5164971076558+/-nan],\n",
       "       [85.57776753084637+/-nan, 70.11409857464966+/-nan,\n",
       "        65.9021485593791+/-nan],\n",
       "       [79.78542663388451+/-nan, 83.10109517361872+/-nan,\n",
       "        82.35948784709004+/-nan],\n",
       "       [76.94153076049392+/-nan, 73.31782172661772+/-nan,\n",
       "        76.97840260007256+/-nan],\n",
       "       [70.23041620669188+/-nan, 80.23679101803242+/-nan,\n",
       "        66.09756880496701+/-nan],\n",
       "       [108.87920646393316+/-nan, 64.6550573761848+/-nan,\n",
       "        80.2343621274528+/-nan],\n",
       "       [72.15165082016149+/-nan, 77.71732820925727+/-nan,\n",
       "        79.45951777679701+/-nan]], dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>deltax</span></div><div class='xr-var-dims'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>233.58068450863982+/-nan ... 222...</div><input id='attrs-8573a8f9-3a54-409b-ae51-eb58aeec04e0' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-8573a8f9-3a54-409b-ae51-eb58aeec04e0' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-056dbe47-b131-4e2f-b0c3-e518da49da31' class='xr-var-data-in' type='checkbox'><label for='data-056dbe47-b131-4e2f-b0c3-e518da49da31' 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([[233.58068450863982+/-nan, 187.7630086485431+/-nan,\n",
       "        225.14142888110428+/-nan],\n",
       "       [217.98090410318324+/-nan, 250.7553725028824+/-nan,\n",
       "        202.1089645129033+/-nan],\n",
       "       [208.01347814582394+/-nan, 201.83587919506363+/-nan,\n",
       "        192.53575721904366+/-nan],\n",
       "       [184.89086327932125+/-nan, 228.0247389092095+/-nan,\n",
       "        242.41308881144826+/-nan],\n",
       "       [250.00783379311835+/-nan, 201.1385934637464+/-nan,\n",
       "        198.78904467812788+/-nan],\n",
       "       [232.89029185656855+/-nan, 236.74374732670282+/-nan,\n",
       "        249.80179017834251+/-nan],\n",
       "       [225.77875864563654+/-nan, 216.1815748364961+/-nan,\n",
       "        223.42020501198726+/-nan],\n",
       "       [191.31745887914497+/-nan, 226.68233535494855+/-nan,\n",
       "        195.19423387609646+/-nan],\n",
       "       [246.34430178313767+/-nan, 196.64778426302766+/-nan,\n",
       "        236.97099653456755+/-nan],\n",
       "       [207.2524550601234+/-nan, 224.9309383172008+/-nan,\n",
       "        222.1439464212459+/-nan]], dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>thermalAspectRatio</span></div><div class='xr-var-dims'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>0.9358085292951404+/-nan ... 0.9...</div><input id='attrs-5c4420c5-2bc4-4752-adfa-bb2357961c08' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5c4420c5-2bc4-4752-adfa-bb2357961c08' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-fb0f7160-ae96-4cdd-9060-753cd759364b' class='xr-var-data-in' type='checkbox'><label for='data-fb0f7160-ae96-4cdd-9060-753cd759364b' 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.9358085292951404+/-nan, 0.8653088095138317+/-nan,\n",
       "        0.9389502224585925+/-nan],\n",
       "       [0.917417522381922+/-nan, 0.937461329711474+/-nan,\n",
       "        0.8969639070011807+/-nan],\n",
       "       [0.8788581727706161+/-nan, 0.8963775317633028+/-nan,\n",
       "        0.9579214003748328+/-nan],\n",
       "       [0.8993385577290508+/-nan, 0.9013870811109844+/-nan,\n",
       "        0.9097946315568302+/-nan],\n",
       "       [0.9276132737846415+/-nan, 0.9233672514091381+/-nan,\n",
       "        0.8781806769773902+/-nan],\n",
       "       [0.9217541183987102+/-nan, 0.9448479519073387+/-nan,\n",
       "        0.8936341100693223+/-nan],\n",
       "       [0.9148992773330864+/-nan, 0.9080273748858471+/-nan,\n",
       "        0.9205303637405402+/-nan],\n",
       "       [0.96795790457252+/-nan, 0.9499154078573739+/-nan,\n",
       "        0.8947391516917874+/-nan],\n",
       "       [1.2+/-nan, 0.8678027066151909+/-nan, 0.9158954586512751+/-nan],\n",
       "       [0.9269796764331312+/-nan, 0.9278638855363573+/-nan,\n",
       "        0.9622298899678458+/-nan]], dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>condensate_fraction</span></div><div class='xr-var-dims'>(compZ_current_sg, runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>1.0+/-nan 1.0+/-nan ... 1.0+/-nan</div><input id='attrs-983c1ac2-ac0d-468e-be38-93c03bfcb92c' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-983c1ac2-ac0d-468e-be38-93c03bfcb92c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f19f4d6f-f0b4-48f8-bcf9-9481a97aa34e' class='xr-var-data-in' type='checkbox'><label for='data-f19f4d6f-f0b4-48f8-bcf9-9481a97aa34e' 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([[1.0+/-nan, 1.0+/-nan, 1.0+/-nan],\n",
       "       [1.0+/-nan, 1.0+/-nan, 1.0+/-nan],\n",
       "       [1.0+/-nan, 1.0+/-nan, 1.0+/-nan],\n",
       "       [1.0+/-nan, 1.0+/-nan, 1.0+/-nan],\n",
       "       [1.0+/-nan, 1.0+/-nan, 1.0+/-nan],\n",
       "       [1.0+/-nan, 1.0+/-nan, 1.0+/-nan],\n",
       "       [1.0+/-nan, 1.0+/-nan, 1.0+/-nan],\n",
       "       [1.0+/-nan, 1.0+/-nan, 1.0+/-nan],\n",
       "       [1.0+/-nan, 1.0+/-nan, 1.0+/-nan],\n",
       "       [1.0+/-nan, 1.0+/-nan, 1.0+/-nan]], dtype=object)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-d882c17d-efd5-4d74-8630-ec83e37d1354' class='xr-section-summary-in' type='checkbox'  ><label for='section-d882c17d-efd5-4d74-8630-ec83e37d1354' class='xr-section-summary' >Indexes: <span>(2)</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-index-name'><div>compZ_current_sg</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-d45f36c6-4b94-4da0-8ab8-a816b5e557db' class='xr-index-data-in' type='checkbox'/><label for='index-d45f36c6-4b94-4da0-8ab8-a816b5e557db' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Float64Index([0.195, 0.196, 0.197, 0.198, 0.199, 0.2, 0.201, 0.202, 0.203,\n",
       "              0.204],\n",
       "             dtype=&#x27;float64&#x27;, name=&#x27;compZ_current_sg&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>runs</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-51ece157-12c2-4892-9adc-25d34eea1662' class='xr-index-data-in' type='checkbox'/><label for='index-51ece157-12c2-4892-9adc-25d34eea1662' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Float64Index([0.0, 1.0, 2.0], dtype=&#x27;float64&#x27;, name=&#x27;runs&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-930c4c69-9751-4826-ba77-94cd803648ef' class='xr-section-summary-in' type='checkbox'  ><label for='section-930c4c69-9751-4826-ba77-94cd803648ef' class='xr-section-summary' >Attributes: <span>(11)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><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><dt><span>x_start :</span></dt><dd>805</dd><dt><span>x_end :</span></dt><dd>955</dd><dt><span>y_end :</span></dt><dd>1065</dd><dt><span>y_start :</span></dt><dd>915</dd><dt><span>x_center :</span></dt><dd>880</dd><dt><span>y_center :</span></dt><dd>990</dd><dt><span>x_span :</span></dt><dd>150</dd><dt><span>y_span :</span></dt><dd>150</dd></dl></div></li></ul></div></div>"
      ],
      "text/plain": [
       "<xarray.Dataset>\n",
       "Dimensions:              (compZ_current_sg: 10, runs: 3)\n",
       "Coordinates:\n",
       "  * compZ_current_sg     (compZ_current_sg) float64 0.195 0.196 ... 0.203 0.204\n",
       "  * runs                 (runs) float64 0.0 1.0 2.0\n",
       "Data variables: (12/13)\n",
       "    BEC_amplitude        (compZ_current_sg, runs) object 689.6738589244688+/-...\n",
       "    thermal_amplitude    (compZ_current_sg, runs) object 0.0+/-nan ... 0.0+/-nan\n",
       "    BEC_centerx          (compZ_current_sg, runs) object 72.72766759442194+/-...\n",
       "    BEC_centery          (compZ_current_sg, runs) object 71.93797641698205+/-...\n",
       "    thermal_centerx      (compZ_current_sg, runs) object 73.54413421644256+/-...\n",
       "    thermal_centery      (compZ_current_sg, runs) object 74.08047311882555+/-...\n",
       "    ...                   ...\n",
       "    BEC_sigmay           (compZ_current_sg, runs) object 8.315587888174065+/-...\n",
       "    thermal_sigmax       (compZ_current_sg, runs) object 86.82572665210536+/-...\n",
       "    thermal_sigmay       (compZ_current_sg, runs) object 81.25225556328859+/-...\n",
       "    deltax               (compZ_current_sg, runs) object 233.58068450863982+/...\n",
       "    thermalAspectRatio   (compZ_current_sg, runs) object 0.9358085292951404+/...\n",
       "    condensate_fraction  (compZ_current_sg, runs) object 1.0+/-nan ... 1.0+/-nan\n",
       "Attributes:\n",
       "    IMAGE_SUBCLASS:       IMAGE_GRAYSCALE\n",
       "    IMAGE_VERSION:        1.2\n",
       "    IMAGE_WHITE_IS_ZERO:  0\n",
       "    x_start:              805\n",
       "    x_end:                955\n",
       "    y_end:                1065\n",
       "    y_start:              915\n",
       "    x_center:             880\n",
       "    y_center:             990\n",
       "    x_span:               150\n",
       "    y_span:               150"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "fitAnalyser_1.get_fit_full_result(fitResult_1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 31720 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "val = fitAnalyser_1.get_fit_value(fitResult_1)\n",
    "std = fitAnalyser_1.get_fit_std(fitResult_1)\n",
    "\n",
    "data = val['BEC_amplitude']\n",
    "data_std = std['BEC_amplitude']\n",
    "\n",
    "data.plot.errorbar(x=scanAxis[0], hue=scanAxis[1], fmt='o')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 30888 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "val = fitAnalyser_1.get_fit_value(fitResult_1)\n",
    "std = fitAnalyser_1.get_fit_std(fitResult_1)\n",
    "\n",
    "data = val['BEC_amplitude'].mean('runs')* 146.59032426564943 / 1e5\n",
    "data_std = val['BEC_amplitude'].std('runs')* 146.59032426564943 / 1e5\n",
    "\n",
    "data.plot.errorbar(yerr=data_std, fmt='o')\n",
    "\n",
    "plt.ylabel('Atom number in BEC (1e5)')\n",
    "plt.xlabel('comp Z current (A)')\n",
    "plt.grid()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "146.59032426564943"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "1 / 8.4743e-14 /0.5 / 2.3513**2 * 5.86e-6**2 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "%matplotlib notebook\n",
    "shotNum = \"0024\"\n",
    "filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
    "\n",
    "dataSetDict = {\n",
    "    dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i], excludeAxis = ['sweep_start_freq', 'sweep_stop_freq'])\n",
    "    for i in [0]\n",
    "}\n",
    "\n",
    "dataSet = dataSetDict[\"camera_0\"]\n",
    "\n",
    "print_scanAxis(dataSet)\n",
    "\n",
    "scanAxis = get_scanAxis(dataSet)\n",
    "\n",
    "dataSet = auto_rechunk(dataSet)\n",
    "\n",
    "dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
    "\n",
    "imageAnalyser.center = (135, 990)\n",
    "imageAnalyser.span = (250, 250)\n",
    "imageAnalyser.fraction = (0.1, 0.1)\n",
    "\n",
    "dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
    "dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
    "\n",
    "Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
    "Ncount_mean = calculate_mean(Ncount)\n",
    "Ncount_std = calculate_std(Ncount)\n",
    "\n",
    "fig = plt.figure()\n",
    "ax = fig.gca()\n",
    "Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
    "\n",
    "plt.ylabel('NCount')\n",
    "plt.tight_layout()\n",
    "#plt.ylim([0, 3500])\n",
    "plt.grid(visible=1)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "l = list(np.arange(0.15, 0.25, 0.005))\n",
    "# l = np.logspace(np.log10(250e-6), np.log10(500e-3), num=15)\n",
    "\n",
    "l = [round(item, 7) for item in l]\n",
    "random.shuffle(l)\n",
    "\n",
    "print(l)\n",
    "print(len(l))\n",
    "np.mean(l)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "[10.25, 10.255, 10.26, 10.265, 10.27, 10.275, 10.28, 10.285, 10.29, 10.295, 10.3, 10.305, 10.31, 10.315, 10.32, 10.325, 10.33, 10.335, 10.34, 10.345, 10.35, 10.355]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "pixel = 5.86e-6\n",
    "M     = 0.6827\n",
    "F = (1/(0.3725*8.4743e-14)) * (pixel / M)**2\n",
    "NCount = 85000\n",
    "AtomNumber = NCount * F / 1e8\n",
    "print(AtomNumber)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "muB = 9.274e-24\n",
    "hbar = 6.626e-34 / (2 * np.pi)\n",
    "gJ = 1.24\n",
    "Delta = 2 * np.pi * 100 * 1e3\n",
    "\n",
    "Bz = (Delta*hbar) / (muB*gJ)\n",
    "print(Bz * 1e4)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## ODT 1 Calibration"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "v_high = 2.7\n",
    "\"\"\"High Power\"\"\"\n",
    "P_arm1_high = 5.776 * v_high - 0.683\n",
    "\n",
    "v_mid = 0.2076\n",
    "\"\"\"Intermediate Power\"\"\"\n",
    "P_arm1_mid = 5.815 * v_mid - 0.03651\n",
    "\n",
    "v_low = 0.0587\n",
    "\"\"\"Low Power\"\"\"\n",
    "P_arm1_low = 5271 * v_low - 27.5\n",
    "\n",
    "print(round(P_arm1_high, 3))\n",
    "print(round(P_arm1_mid, 3))\n",
    "print(round(P_arm1_low, 3))"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## ODT 2 Power Calibration"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "v = 0.7607\n",
    "P_arm2 = 2.302 * v - 0.06452\n",
    "print(round(P_arm2, 3))"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  },
  "vscode": {
   "interpreter": {
    "hash": "c05913ad4f24fdc6b2418069394dc5835b1981849b107c9ba6df693aafd66650"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
