analyseScript/backupScript/20230629_Data_Analysis.ipynb

2220 lines
643 KiB
Plaintext
Raw Normal View History

2023-07-01 09:21:45 +02:00
{
"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": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\data\\AppData\\Roaming\\Python\\Python39\\site-packages\\distributed\\node.py:182: UserWarning: Port 8787 is already in use.\n",
"Perhaps you already have a cluster running?\n",
"Hosting the HTTP server on port 64025 instead\n",
" warnings.warn(\n"
]
},
{
"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-62d9ff1a-1663-11ee-a424-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:64025/status\" target=\"_blank\">http://127.0.0.1:64025/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;\">c9b6fb7f</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:64025/status\" target=\"_blank\">http://127.0.0.1:64025/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-aec9e7c3-d306-41ff-adef-79b6d2ae756f</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:64028\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:64025/status\" target=\"_blank\">http://127.0.0.1:64025/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:64070\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:64073/status\" target=\"_blank\">http://127.0.0.1:64073/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:64031\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-a5t3uhr6\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:64064\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:64067/status\" target=\"_blank\">http://127.0.0.1:64067/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:64032\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-axcwdu0y\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:64084\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:64085/status\" target=\"_blank\">http://127.0.0.1:64085/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:64033\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-ewtdqzqy\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:64076\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:64079/status\" target=\"_blank\">http://127.0.0.1:64079/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:64034\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-imeu1_9t\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:64075\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:64077/status\" target=\"_blank\">http://127.0.0.1:64077/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:64035\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-y0dpc96g\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:64063\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:64065/status\" target=\"_blank\">http://127.0.0.1:64065/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:64036\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-hrqxp7t9\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:64069\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:64071/status\" target=\"_blank\">http://127.0.0.1:64071/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:64037\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-dv2tpx5b\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:64081\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:64082/status\" target=\"_blank\">http://127.0.0.1:64082/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:64038\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-e907936d\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:64028' 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": 6,
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'initial_freq': array([102. , 102.25, 102.5 , 102.75, 103. , 103.25, 103.5 , 103.75,\n",
" 104. , 104.25, 104.5 , 104.75]), 'runs': array([0., 1., 2.])}\n"
]
},
{
"data": {
"application/javascript": "/* Put everything inside the global mpl namespace */\n/* global mpl */\nwindow.mpl = {};\n\nmpl.get_websocket_type = function () {\n if (typeof WebSocket !== 'undefined') {\n return WebSocket;\n } else if (typeof MozWebSocket !== 'undefined') {\n return MozWebSocket;\n } else {\n alert(\n 'Your browser does not have WebSocket support. ' +\n 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n 'Firefox 4 and 5 are also supported but you ' +\n 'have to enable WebSockets in about:config.'\n );\n }\n};\n\nmpl.figure = function (figure_id, websocket, ondownload, parent_element) {\n this.id = figure_id;\n\n this.ws = websocket;\n\n this.supports_binary = this.ws.binaryType !== undefined;\n\n if (!this.supports_binary) {\n var warnings = document.getElementById('mpl-warnings');\n if (warnings) {\n warnings.style.display = 'block';\n warnings.textContent =\n 'This browser does not support binary websocket messages. ' +\n 'Performance may be slow.';\n }\n }\n\n this.imageObj = new Image();\n\n this.context = undefined;\n this.message = undefined;\n this.canvas = undefined;\n this.rubberband_canvas = undefined;\n this.rubberband_context = undefined;\n this.format_dropdown = undefined;\n\n this.image_mode = 'full';\n\n this.root = document.createElement('div');\n this.root.setAttribute('style', 'display: inline-block');\n this._root_extra_style(this.root);\n\n parent_element.appendChild(this.root);\n\n this._init_header(this);\n this._init_canvas(this);\n this._init_toolbar(this);\n\n var fig = this;\n\n this.waiting = false;\n\n this.ws.onopen = function () {\n fig.send_message('supports_binary', { value: fig.supports_binary });\n fig.send_message('send_image_mode', {});\n if (fig.ratio !== 1) {\n fig.send_message('set_device_pixel_ratio', {\n device_pixel_ratio: fig.ratio,\n });\n }\n fig.send_message('refresh', {});\n };\n\n this.imageObj.onload = function () {\n if (fig.image_mode === 'full') {\n // Full images could contain transparency (where diff images\n // almost always do), so we need to clear the canvas so that\n // there is no ghosting.\n fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n }\n fig.context.drawImage(fig.imageObj, 0, 0);\n };\n\n this.imageObj.onunload = function () {\n fig.ws.close();\n };\n\n this.ws.onmessage = this._make_on_message_function(this);\n\n this.ondownload = ondownload;\n};\n\nmpl.figure.prototype._init_header = function () {\n var titlebar = document.createElement('div');\n titlebar.classList =\n 'ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix';\n var titletext = document.createElement('div');\n titletext.classList = 'ui-dialog-title';\n titletext.setAttribute(\n 'style',\n 'width: 100%; text-align: center; padding: 3px;'\n );\n titlebar.appendChild(titletext);\n this.root.appendChild(titlebar);\n this.header = titletext;\n};\n\nmpl.figure.prototype._canvas_extra_style = function (_canvas_div) {};\n\nmpl.figure.prototype._root_extra_style = function (_canvas_div) {};\n\nmpl.figure.prototype._init_canvas = function () {\n var fig = this;\n\n var canvas_div = (this.canvas_div = document.createElement('div'));\n canvas_div.setAttribute(\n 'style',\n 'border: 1px solid #ddd;' +\n 'box-sizing: content-box;' +\n 'clear: both;' +\n 'min-height: 1px;' +\n 'min-width: 1px;' +\n 'outline: 0;' +\n 'overflow: hidden;' +\n 'position: relative;' +\n 'resize: both;'\n );\n\n function on_keyboard_event_closure(name) {\n return function (event) {\n return fig.key
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAIABJREFUeF7tnQu4lUX1h9cBAcG4g4SAYgooWuAlAU2TFAgfEkRDoFLIgLwkCCpiXqAUJUAwb0CmIsqlfETARMEUMRHv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FNPPVVuvPFG92XIibZ792659NJLZd68efLpp5/KKaecIrfffnuJ78rbvn27XHzxxbJ48WJ32emnny633HKL+0q2RHv//fflwgsvlCeeeELq1q0rgwcPlilTpkjt2rWTfV577TW56KKL5Pnnn5cmTZrIiBEj5Oqrr5aioqKMfwowgBmjyrmOFCS7IYEtbO0I2EUmb2FrR6CaG8ClS5fKM888I0cffbSceeaZJQygflXaWWedJcOGDZNOnTqJmrhRo0bJF198IS+++GKSzPnnny9LliyRe+65R5o2bSpjxoyRjz76yJnKmjVrun69e/eWjRs3yqxZs9x/Dx8+XNq2beuu07Znzx7p3LmzNG/eXKZOnSrbtm2Tc889V/r37++MojY1bu3bt5fu3bvLL3/5S3njjTdkyJAhcu211zrNTBsGMFNSudePYm83JrCFrR0Bu8jkLWztCFRzA5j6eDqLljoDWB7UF154QY477jh577335MADD3Tfp6umbc6cOXL22We7SzZv3uy+MFlnDnv16iVr166Vjh07yurVq6VLly6uj/65W7dusm7dOunQoYOoEe3Tp49s2LAhObs4f/58Z/C2bt3qvrP3jjvukHHjxskHH3wgderUcXF0NlINoprLTGcBMYChflz861Ds/TNNRIQtbO0I2EUmb2FrRwADWILA448/Lj179pQdO3Y4U6bLtbrkqzN+jRs3TvbVGUNdSp4wYYLcddddMnr0aHdNatPl32nTpsnQoUPlmmuukUWLFsmaNWuSXXTGUZd5VUNn/c455xxnOLVfor3yyitu9lKXqA8++OBy80CXqPV/iaYGUA3qhx9+6J7Bd9OCtHz5cunRo4fUqlXLd/iCjgdbu+GHLWztCNhFJm9ha0egrAFs1qyZ8yHZeIei4uLi4lA3W1mddDOAn332mXznO9+Rww47TO677z4Xfu7cuc7ApRos/Xs1iWrIZs6cKRMnTnTLw7pkm9p0OVev1Vk9XRJ+9913ZdmyZSX66EyfXjto0CAXU5eNE8vI2lFnG1u1aiWrVq1yM4rltfHjxzsjWrrpvderV6+ymOgPgbQE9uwRef31prJ9+77SuPFn0rHjNvnybYi019IBAhCAAARyj8CuXbvc3oSCM4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f80DCFgPoOaXih8MAxh+DbO8gHwqSmsCRI0vuBtbXYadPz90jYHQ88oFttnkT+zrY2o0AbGFrRwADGIptMB0MYDDU3oXypdjrcvDTT+uRSCJ6qtGJJ+bm0S+pA5QvbL0nVYCAsLWDDFvY2hHAAIZiG0wHAxgMtXchir13pMmAsIWtHQG7yOQtbO0IYABDsQ2mgwEMhtq7EMXeO1IMoB1S2MI2AAE7CeotBtAuuyJFxgBGAu9BloLkAWIFIWALWzsCdpHJW9jaEcAAhmIbTAcDGAy1dyGKvXekzFLZIYUtbAMQsJOg3mIA7bIrUmQMYCTwHmQpSB4gMgNoBxG2sA1OwE6QeosBtMuuSJExgJHAe5ClIHmAiEmxgwhb2AYnYCdIvcUA2mVXpMgYwEjgPchSkDxAxKTYQYQtbIMTsBOk3mIA7bIrUmQMYCTwVZTVs/WefPILWbr0Vendu7N0776P1KxZxaBcniRAsbdLBtjC1o6AXWTyFgNol12RImMAI4Gvgmx5367RurXIzTfn9rdrVOGRg19KsbdDDlvY2hGwi0zeYgDtsitSZAxgJP
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"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')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"dataSet_cropOD.plot.pcolormesh(cmap='jet', vmin=0, vmax=2, col=scanAxis[0], row=scanAxis[1])"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## scan Push freq"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'push_freq': array([101.1, 101.6, 102.1, 102.6, 103.1, 103.6, 104.1, 104.6, 105.1,\n",
" 105.6, 106.1]), 'runs': array([0., 1., 2.])}\n"
]
},
{
"data": {
"application/javascript": "/* Put everything inside the global mpl namespace */\n/* global mpl */\nwindow.mpl = {};\n\nmpl.get_websocket_type = function () {\n if (typeof WebSocket !== 'undefined') {\n return WebSocket;\n } else if (typeof MozWebSocket !== 'undefined') {\n return MozWebSocket;\n } else {\n alert(\n 'Your browser does not have WebSocket support. ' +\n 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n 'Firefox 4 and 5 are also supported but you ' +\n 'have to enable WebSockets in about:config.'\n );\n }\n};\n\nmpl.figure = function (figure_id, websocket, ondownload, parent_element) {\n this.id = figure_id;\n\n this.ws = websocket;\n\n this.supports_binary = this.ws.binaryType !== undefined;\n\n if (!this.supports_binary) {\n var warnings = document.getElementById('mpl-warnings');\n if (warnings) {\n warnings.style.display = 'block';\n warnings.textContent =\n 'This browser does not support binary websocket messages. ' +\n 'Performance may be slow.';\n }\n }\n\n this.imageObj = new Image();\n\n this.context = undefined;\n this.message = undefined;\n this.canvas = undefined;\n this.rubberband_canvas = undefined;\n this.rubberband_context = undefined;\n this.format_dropdown = undefined;\n\n this.image_mode = 'full';\n\n this.root = document.createElement('div');\n this.root.setAttribute('style', 'display: inline-block');\n this._root_extra_style(this.root);\n\n parent_element.appendChild(this.root);\n\n this._init_header(this);\n this._init_canvas(this);\n this._init_toolbar(this);\n\n var fig = this;\n\n this.waiting = false;\n\n this.ws.onopen = function () {\n fig.send_message('supports_binary', { value: fig.supports_binary });\n fig.send_message('send_image_mode', {});\n if (fig.ratio !== 1) {\n fig.send_message('set_device_pixel_ratio', {\n device_pixel_ratio: fig.ratio,\n });\n }\n fig.send_message('refresh', {});\n };\n\n this.imageObj.onload = function () {\n if (fig.image_mode === 'full') {\n // Full images could contain transparency (where diff images\n // almost always do), so we need to clear the canvas so that\n // there is no ghosting.\n fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n }\n fig.context.drawImage(fig.imageObj, 0, 0);\n };\n\n this.imageObj.onunload = function () {\n fig.ws.close();\n };\n\n this.ws.onmessage = this._make_on_message_function(this);\n\n this.ondownload = ondownload;\n};\n\nmpl.figure.prototype._init_header = function () {\n var titlebar = document.createElement('div');\n titlebar.classList =\n 'ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix';\n var titletext = document.createElement('div');\n titletext.classList = 'ui-dialog-title';\n titletext.setAttribute(\n 'style',\n 'width: 100%; text-align: center; padding: 3px;'\n );\n titlebar.appendChild(titletext);\n this.root.appendChild(titlebar);\n this.header = titletext;\n};\n\nmpl.figure.prototype._canvas_extra_style = function (_canvas_div) {};\n\nmpl.figure.prototype._root_extra_style = function (_canvas_div) {};\n\nmpl.figure.prototype._init_canvas = function () {\n var fig = this;\n\n var canvas_div = (this.canvas_div = document.createElement('div'));\n canvas_div.setAttribute(\n 'style',\n 'border: 1px solid #ddd;' +\n 'box-sizing: content-box;' +\n 'clear: both;' +\n 'min-height: 1px;' +\n 'min-width: 1px;' +\n 'outline: 0;' +\n 'overflow: hidden;' +\n 'position: relative;' +\n 'resize: both;'\n );\n\n function on_keyboard_event_closure(name) {\n return function (event) {\n return fig.key
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAIABJREFUeF7tnQu4VVXV/gcgIDe5CBgIChFSaAFWCJJ9kAGRJIbGrT4R/QAV/6iAgjeEEpQEAS8oViqiXIwH4xIImBAWogVKWiDekUsSICggmnT+z5i0j/ucfTh77bHm2mOstd/1PD0pZ8455vyN9yxfxlxzrQpFRUVFhAsEQAAEQAAEQAAEQKBgCFSAASyYXGOhIAACIAACIAACIOAIwABCCCAAAiAAAiAAAiBQYARgAAss4VguCIAACIAACIAACMAAQgMgAAIgAAIgAAIgUGAEYAALLOFYLgiAAAiAAAiAAAjAAEIDIAACIAACIAACIFBgBGAACyzhWC4IgAAIgAAIgAAIwABCAyAAAiAAAiAAAiBQYARgAAss4VguCIAACIAACIAACMAAQgMgAAIgAAIgAAIgUGAEYAALLOFYLgiAAAiAAAiAAAjAAEIDIAACIAACIAACIFBgBGAACyzhWC4IgAAIgAAIgAAIwAAa0MB//vMf2rlzJ9WqVYsqVKhgYEaYAgiAAAiAAAiAgGUCRUVF9PHHH1Pjxo2pYsWKOU8VBjBnZP47bN++nZo2bep/YIwIAiAAAiAAAiCQaALvv/8+NWnSJOc1wgDmjMx/hwMHDlCdOnWIk3jSSScFDvDvf/+bVq5cSd26daPKlSsH7oeGfgiAvx+O0lHAX0rOTz/w98NROgr4S8mF72eF/UcffeSKR/v376fatWvnvDA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y/fY4O+baG7jgX9uvH
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"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": 8,
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'compZ_final_current': array([0.248, 0.249, 0.25 , 0.251, 0.252, 0.253, 0.254, 0.255, 0.256,\n",
" 0.257, 0.258]), 'runs': array([0., 1., 2.])}\n"
]
},
{
"data": {
"application/javascript": "/* Put everything inside the global mpl namespace */\n/* global mpl */\nwindow.mpl = {};\n\nmpl.get_websocket_type = function () {\n if (typeof WebSocket !== 'undefined') {\n return WebSocket;\n } else if (typeof MozWebSocket !== 'undefined') {\n return MozWebSocket;\n } else {\n alert(\n 'Your browser does not have WebSocket support. ' +\n 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n 'Firefox 4 and 5 are also supported but you ' +\n 'have to enable WebSockets in about:config.'\n );\n }\n};\n\nmpl.figure = function (figure_id, websocket, ondownload, parent_element) {\n this.id = figure_id;\n\n this.ws = websocket;\n\n this.supports_binary = this.ws.binaryType !== undefined;\n\n if (!this.supports_binary) {\n var warnings = document.getElementById('mpl-warnings');\n if (warnings) {\n warnings.style.display = 'block';\n warnings.textContent =\n 'This browser does not support binary websocket messages. ' +\n 'Performance may be slow.';\n }\n }\n\n this.imageObj = new Image();\n\n this.context = undefined;\n this.message = undefined;\n this.canvas = undefined;\n this.rubberband_canvas = undefined;\n this.rubberband_context = undefined;\n this.format_dropdown = undefined;\n\n this.image_mode = 'full';\n\n this.root = document.createElement('div');\n this.root.setAttribute('style', 'display: inline-block');\n this._root_extra_style(this.root);\n\n parent_element.appendChild(this.root);\n\n this._init_header(this);\n this._init_canvas(this);\n this._init_toolbar(this);\n\n var fig = this;\n\n this.waiting = false;\n\n this.ws.onopen = function () {\n fig.send_message('supports_binary', { value: fig.supports_binary });\n fig.send_message('send_image_mode', {});\n if (fig.ratio !== 1) {\n fig.send_message('set_device_pixel_ratio', {\n device_pixel_ratio: fig.ratio,\n });\n }\n fig.send_message('refresh', {});\n };\n\n this.imageObj.onload = function () {\n if (fig.image_mode === 'full') {\n // Full images could contain transparency (where diff images\n // almost always do), so we need to clear the canvas so that\n // there is no ghosting.\n fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n }\n fig.context.drawImage(fig.imageObj, 0, 0);\n };\n\n this.imageObj.onunload = function () {\n fig.ws.close();\n };\n\n this.ws.onmessage = this._make_on_message_function(this);\n\n this.ondownload = ondownload;\n};\n\nmpl.figure.prototype._init_header = function () {\n var titlebar = document.createElement('div');\n titlebar.classList =\n 'ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix';\n var titletext = document.createElement('div');\n titletext.classList = 'ui-dialog-title';\n titletext.setAttribute(\n 'style',\n 'width: 100%; text-align: center; padding: 3px;'\n );\n titlebar.appendChild(titletext);\n this.root.appendChild(titlebar);\n this.header = titletext;\n};\n\nmpl.figure.prototype._canvas_extra_style = function (_canvas_div) {};\n\nmpl.figure.prototype._root_extra_style = function (_canvas_div) {};\n\nmpl.figure.prototype._init_canvas = function () {\n var fig = this;\n\n var canvas_div = (this.canvas_div = document.createElement('div'));\n canvas_div.setAttribute(\n 'style',\n 'border: 1px solid #ddd;' +\n 'box-sizing: content-box;' +\n 'clear: both;' +\n 'min-height: 1px;' +\n 'min-width: 1px;' +\n 'outline: 0;' +\n 'overflow: hidden;' +\n 'position: relative;' +\n 'resize: both;'\n );\n\n function on_keyboard_event_closure(name) {\n return function (event) {\n return fig.key
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAIABJREFUeF7snQuYlVX1/xcgKij3WxAj8CPA0ALMuGgWPAqEmSAqCFZIBP7RQgRUKH8GpSB5AQIJKBGEQH/5Q7mICgWISqBCmU9x8YoMUAoCXrgYyP9Ze35nmhlmZr0z+6y915nzfZ+nJ3Xv8671fj9rnfd79nuZSidPnjxJ2KAAFIACUAAKQAEoAAWyRoFKMIBZwxoHCgWgABSAAlAACkABpwAMIAoBCkABKAAFoAAUgAJZpgAMYJYBx+FCASgABaAAFIACUAAGEDUABaAAFIACUAAKQIEsUwAGM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Vr3eofrxAWNYCLFi1yBo7vAyy49ejRg1q0aEGzZ8+miRMnusvDO3bsKDSndevW7rPjxo1zl4TfffddWrVqVaE5Z5xxhvvsgAEDiq1RjlswNgPi1cd9+/YlXjUsS/Fzga1evZq6d+9OVatWLctHMTeNCoBDGsUs567AoJzCpflj4JBmQcuxOzAoh2gKH9HmwP6ifv36xFc+k16VLHiYGWUA+R4+vuS7ZcuW/MuySQ0gG6SWLVvSrFmznAGcP38+bd++vRDyVq1a0ZAhQ2js2LHOAO7cudMZzYIbPwDy6KOP0nXXXVdsufB9ibzKWHRjY1q9enWFEsMuoQAUgAJQAApAgWxT4PDhw+7h1KwwgFOnTnWXbitXrpzPmR/W4H/nVTZesYt9CRgrgNnWgn
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"%matplotlib notebook\n",
"shotNum = \"0002\"\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 = (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": [
"## scan cMOT final amp"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'final_amp': array([3.00e-05, 5.50e-05, 8.00e-05, 1.05e-04, 1.30e-04, 1.55e-04,\n",
" 1.80e-04, 2.05e-04, 2.30e-04, 2.55e-04, 2.80e-04]), 'runs': array([0., 1., 2.])}\n"
]
},
{
"data": {
"application/javascript": "/* Put everything inside the global mpl namespace */\n/* global mpl */\nwindow.mpl = {};\n\nmpl.get_websocket_type = function () {\n if (typeof WebSocket !== 'undefined') {\n return WebSocket;\n } else if (typeof MozWebSocket !== 'undefined') {\n return MozWebSocket;\n } else {\n alert(\n 'Your browser does not have WebSocket support. ' +\n 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n 'Firefox 4 and 5 are also supported but you ' +\n 'have to enable WebSockets in about:config.'\n );\n }\n};\n\nmpl.figure = function (figure_id, websocket, ondownload, parent_element) {\n this.id = figure_id;\n\n this.ws = websocket;\n\n this.supports_binary = this.ws.binaryType !== undefined;\n\n if (!this.supports_binary) {\n var warnings = document.getElementById('mpl-warnings');\n if (warnings) {\n warnings.style.display = 'block';\n warnings.textContent =\n 'This browser does not support binary websocket messages. ' +\n 'Performance may be slow.';\n }\n }\n\n this.imageObj = new Image();\n\n this.context = undefined;\n this.message = undefined;\n this.canvas = undefined;\n this.rubberband_canvas = undefined;\n this.rubberband_context = undefined;\n this.format_dropdown = undefined;\n\n this.image_mode = 'full';\n\n this.root = document.createElement('div');\n this.root.setAttribute('style', 'display: inline-block');\n this._root_extra_style(this.root);\n\n parent_element.appendChild(this.root);\n\n this._init_header(this);\n this._init_canvas(this);\n this._init_toolbar(this);\n\n var fig = this;\n\n this.waiting = false;\n\n this.ws.onopen = function () {\n fig.send_message('supports_binary', { value: fig.supports_binary });\n fig.send_message('send_image_mode', {});\n if (fig.ratio !== 1) {\n fig.send_message('set_device_pixel_ratio', {\n device_pixel_ratio: fig.ratio,\n });\n }\n fig.send_message('refresh', {});\n };\n\n this.imageObj.onload = function () {\n if (fig.image_mode === 'full') {\n // Full images could contain transparency (where diff images\n // almost always do), so we need to clear the canvas so that\n // there is no ghosting.\n fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n }\n fig.context.drawImage(fig.imageObj, 0, 0);\n };\n\n this.imageObj.onunload = function () {\n fig.ws.close();\n };\n\n this.ws.onmessage = this._make_on_message_function(this);\n\n this.ondownload = ondownload;\n};\n\nmpl.figure.prototype._init_header = function () {\n var titlebar = document.createElement('div');\n titlebar.classList =\n 'ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix';\n var titletext = document.createElement('div');\n titletext.classList = 'ui-dialog-title';\n titletext.setAttribute(\n 'style',\n 'width: 100%; text-align: center; padding: 3px;'\n );\n titlebar.appendChild(titletext);\n this.root.appendChild(titlebar);\n this.header = titletext;\n};\n\nmpl.figure.prototype._canvas_extra_style = function (_canvas_div) {};\n\nmpl.figure.prototype._root_extra_style = function (_canvas_div) {};\n\nmpl.figure.prototype._init_canvas = function () {\n var fig = this;\n\n var canvas_div = (this.canvas_div = document.createElement('div'));\n canvas_div.setAttribute(\n 'style',\n 'border: 1px solid #ddd;' +\n 'box-sizing: content-box;' +\n 'clear: both;' +\n 'min-height: 1px;' +\n 'min-width: 1px;' +\n 'outline: 0;' +\n 'overflow: hidden;' +\n 'position: relative;' +\n 'resize: both;'\n );\n\n function on_keyboard_event_closure(name) {\n return function (event) {\n return fig.key
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAIABJREFUeF7snQu8VVW1/8eB8IHxBgnk8LgEGFKAGg9Jg4scgryAqCBUV4kLBN4LyEPAzKAUNB/gFQmoEAQPWF6RR0ceBYhJmEJ5u8lDQ5HXP+OpyMOk8/+MiXtzHhvW3HOOsdbae//W5+NH4Mw55lzf75prjzPWY+cVFxcXEzYQAAEQAAEQAAEQAIGcIZCHBDBnXGNHQQAEQAAEQAAEQMAQQAKIAwEEQAAEQAAEQAAEcowAEsAcE47dBQEQAAEQAAEQAAEkgDgGQAAEQAAEQAAEQCDHCCABzDHh2F0QAAEQAAEQAAEQQAKIYwAEQAAEQAAEQAAEcowAEsAcE47dBQEQAAEQAAEQAAEkgDgGQAAEQAAEQAAEQCDHCCABzDHh2F0QAAEQAAEQAAEQQAKIYwAEQAAEQAAEQAAEcowAEsAcE47dBQEQAAEQAAEQAAEkgDgGQAAEQAAEQAAEQCDHCCABzDHh2F0QAAEQAAEQAAEQQAKofAz885//pP3791OVKlUoLy9PeTSEBwEQAAEQAAEQyAUCxcXF9NFHH1H9+vWpQoUKae8yEsC0kaXXYe/evZSfn59eJ7QGARAAARAAARAAAQsCe/bsoQYNGli0LN0ECWDayNLrcOzYMapevTqxoKpVq6bXOcNb/+Mf/6A1a9ZQQUEBVapUKcP3JnOnDw/Ru4OD6B3wDOAheg9wIOfgww8/NAWmo0ePUrVq1dIOjAQwbWTpdWBBLIYTwVxMAIuKiqhnz55IANM7bERb8wkXHkSRph0MDtJGptIBHlSwphUUDtLCdcHGvvkFEkA5Fykj+QpSnp5qeCx0VbzWweHBGpVaQzhQQ5tWYHhIC5dKYziQw+qbXyABlHOBBLAMASx05YPLMjw8WIJSbAYHinDTCA0PacBSagoHcmCRAMqxVInkK0hlUiEFxUIPCXTAMPAQvQc4iN4BzwAeovcAB3I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IE5Eb7rpJtqzZw/Vr1/ftFmyZAndeeed9MEHH1DVqlWtLCIBzM6vgrOSH5NGQSfcuD/FHBOMXtMIcuAVHJ2tCcCDNSq1hnAgh9Y3v4hdBTAoAfznP/9JN954I/Xu3ZtGjRplqnYlE0C+XMuXfLniV6NGjWS41q1bm0vJU6ZMoXnz5tGYMWPo6NGjpUzw5V++nDxo0CC6//77admyZfTmm28m2/Bl45o1a5pLwl26dLGy6CvIapCYNsJCj4cYeIjeAxxE74BnAA/Re4ADOQe++UXGJYDTpk2j9evXm+ofVwjLJoCFhYUmgeP7AEtuBQUF1KRJE5ozZw5NnTrVXB7euXNnqTbNmzc3fSdNmmQuCb/33nu0Zs2aUm0uvvhi03fAgAEpLfK4JcdmQVx9PHjwoHXVUO7wiDYSL/S1a9dSt27dqFKlStFOJodHh4fo5cNB9A4SCSDOSdG6wFqQ48/5Re3atYmvfNpelSxVZCsuTvVNpnIT9IlU9hIw38PHl3y3bt2avCxrmwByEtK0aVOaPXu2SQAXLFhAO3bsKDW9Zs2a0eDBg2nixIkmAdy9e7dJNEtu/ADIM888Q7fffnvKXeP7ErnKWHbjxLRy5co+ONAXBEAABEAABEAABAyBEydOmIdTcyIBnDFjhrl0W6FChaR+fliD/85VNq7YRX0JGBXAcysTv+nF4ywFD9F7gIPoHaACCAfxICA3i5yqAPKTuPxqmJIbP9Txne98x1y65Yc3Eg+BLFq0iPr162each9+BUzZh0Bee+01ateunWnDf+7QoUO5h0D4SeF69eqZNs8995x5EhgPgdgdwLjXw46Tdi
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"%matplotlib notebook\n",
"shotNum = \"0003\"\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 = (306, 872)\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/29'# 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": 22,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'runs': array([0., 1., 2., 3., 4., 5., 6., 7., 8., 9.])}\n"
]
},
{
"data": {
"image/png": "i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E8OCBE6pXl/Dyy91QrD2kBEPvVXq6Blu2ANeuNUBUVJCZolYPuRevIqpL3u7cuYPIyEikpqZi27ZtaNCgQZnHbtmyBYMHD0ZkZCRWrFhRKhnz9PTU27omj4vT1yon02q1hRMfinN2djbrh4q5z0+mw3ulLrxf6sF7pZxjx8TXdu00cHWt+B5UdK8iIsTXI0cckJfngGrVTBCkihn6/1rxCQuVcefOHTz55JM4f/484uPjC8em6bNlyxZER0cjPDwca9asgYuLS6ljWrZsiaSkpFL75X0tqjIHmoiIyMaYarKCLDgYqFcP0OmKzk0VU03yJidu586dQ1xcHNq2bVvmsXFxcYiOjkbXrl2xfv16vS1kADBo0CCcOnWqREmQvLw8LF++HB07doSfn5/JXwcREZFaVbU476OKL1LPYr2Gs4pu09jYWGRnZyMzUwx8PHHiROGKCFFRUdBoNOjTpw+OHDmCefPmIS8vD3v37i18vre3Nxo2bAgA2LVrF6Kjo1G3bl1MmjQJR48eLXGtZs2aFY5JGzVqFBYsWICYmBjMmTMHPj4+WLhwIU6fPo2tW7da4JUTERGpg04HyL9STdXyBohivatXs95bZVhF8vbqq6/i4sWLhd+vWrUKq1atAgCcP38eAHDgr/bUN954o9TzX3zxRSxduhQAsHXrVty/fx8XLlxAz549Sx27fft2RPzVya7VapGQkIAJEyZg3LhxyMnJQZs2bRAbG4vw8HBTvkQiIiJVS0kBHjwAatUCGjUy3Xnllrfdu4GCAqCcOYj0F6t
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"shotNum = \"0002\"\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, 980)\n",
"imageAnalyser.span = (80, 80)\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 = Ncount#calculate_mean(Ncount)\n",
"Ncount_std = None#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": 23,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<xarray.plot.facetgrid.FacetGrid at 0x2821278a490>"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAACnoAAAEcCAYAAADqLPiTAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOz9e7ydRXn3j187RxKSEEIACaclB0EKGE8IChjq+UA9f7WtrYdaT2jVXz1rRdRWtPI81ra2Wn0q1WopWPs8ImgrFVQUT5AKFVDQpZwkHLIlgXDYSX5/7HWt9Vkrn8+euXfWTnb2/rxfr7z2ZNZ9z8w9M9fMNXPfc10jW7du3RrGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxZtoxZ2cXwBhjjDHG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/zTP/1TXHDBBfG2t70ttm7dWrzXsmzM9ODP/uzPtpmPv/vd78bKlStj//33j0c/+tET3m9ZNmZ68JOf/CQe+9jHRrvdjo9+9KNx/vnnx4te9KJ43/veF7/7u79bvN+ybMzO5wc/+EGcfPLJsWnTpvjsZz8bn/3sZ+Pee++NJzzhCfHd7363eL/l2BizMxnZWrMTYGYt99xzTyxevHhnF2PKuOCCC+IZz3hGfP7zn+9Tvp/85CfH//zP/8SvfvWrmDt3rrz/4x//eJx22mnxne98J0444YSIiBgbG4uHPexhsWTJkvje97435c9gTA0zXZZzKhsZGYnbb7899t577zj99NOrrXpals2uwkyX5XXr1sU+++zTF7dx48Y47LDD4uijj46vf/3rE95vWTa7CjNdlhXHH3983HzzzfGrX/1qwussy2ZXYDbJ8amnnhojIyOxYsWKOO+882Ljxo3FeyzHZldhpsvyxRdfHKecckqce+658fznP7/x/ZZls6sw02X5pptuiiOOOCL+8A//MD7+8Y83vt+ybHYVZrosMy655JJYs2ZNvPvd7y5a6LUsm12FmS7L7373u+PP//zP47rrrotDDz20G/+qV70qPvnJT8add94Ze+65p7zfsmx2BWa6HD/1qU+NtWvXxs9//vPuc27YsCEOOeSQeMhDHlK07Gk5NsbsTGzR03R573vfGyMjI3H55ZfH85///Nhzzz27CuqaNWtizZo129zz0pe+NFqtVvf/7XY7RkZG4iMf+Uj8r//1v+LBD35wLFmyJE444YRt3E78/Oc/jxe96EWxatWqWLhwYey7777xhCc8IdauXTuFT9nPl770pViyZEm84AUv6It/2cteFjfffHNxEv7Sl74URxxxRHcCj4iYN29evPjFL47vf//7cdNNN01JuY2ZiNkoy+neZrJYls10ZDbK8uBHnhERS5YsiaOOOipuuOGG4v2WZTMdmY2yrFi5cmXMmzeveJ1l2Uw3ZrMcf+5zn4tLLrmk8UcllmMzHZnNsjxZLMtmOjIbZflTn/pU3H333fG2t71tUvdbls10ZDbKMuPTn/50jIyMxMtf/vLitZZlMx2ZjbI8f/78iIjYY489+uKXL18ec+bMiQULFkx4v2XZTDdmoxxfeumlsWbNmr6PWZcuXRonn3xyfOc734lbbrllwvstx8aYnUn5LZuZdTz3uc+NF73oRfHqV7867r777kml8bd/+7dx5JFHxkc/+tGIGHdJ8fSnPz1+8YtfdBXfpz/96bF58+b48Ic/HAcddFDcfvvt8Z3vfCdGR0cnTHvr1q2xefPmqnKUXiRfddVV8dCHPnSb64499tju74997GMnvP+kk07aJj7v/5//+Z/Yf//9q8pqzLCZTbK8vViWzXRmtsvyb37zm7j88svjt3/7t4vXWpbNdGY2yvKWLVtiy5YtsX79+jj33HPja1/7WvzN3/xN8T7LspmuzDY5XrduXbzxjW+MM888Mw444ICqdBPLsZnOzDZZjog47bTT4kUvelEsXrw4TjjhhPizP/uzOPHEE4v3WZbNdGY2yfI3v/nNWLFiRVxzzTXxrGc9K6666qpYsWJFPPe5z40Pf/jDsWzZsgnvtyyb6cxskuVBfvOb38R5550XT3jCE+LBD35w8XrLspnOzCZZfslLXhIf/ehH4zWveU186EMfir333jsuueSS+MQnPhGnnXZa7L777hPeb1k205XZJMf3339/LFy4cJv4jLvyyitjv/32k/dbjo0xOxN/6Gm24SUveUmcccYZ25XG0qVL4/zzz++6PV+1alUcd9xxceGFF8aLXvSiuOOOO+Laa6+Nj370o/HiF7+4e99zn/vcYtpnn312vOxlL6sqR7pzVtxxxx1xyCGHbBO/YsWK7u+l+/PaydxvzFQym2R5e7Esm+nMbJfl0047Le6+++5417veVbzWsmymM7NRll/72tfGJz7xiYiIWLBgQXzsYx+LV73qVcX7LMtmujLb5Pi1r31tHHHEEfGa17ymKk3EcmymM7NJlvfYY494wxveEGvWrIm99torrrvuuvjLv/zLWLNmTXzlK1+JpzzlKRPeb1k205nZJMs33XRT3HPPPfGCF7wg3vGOd8RHP/rR+MEPfhCnn356XHXVVfGtb31rQk83lmUznZlNsjzIF77whdi0aVP80R/9UdX1lmUznZlNstxqteK73/1uPOc5z+lz3f4nf/In3Y/bJsKybKYrs0mOjzrqqLjssstiy5YtMWfOuBPksbGxrrdXfyNijJnO+ENPsw3Pe97ztjuNZzzjGd0JPKJ3euGXv/xlRIxPcoceemj85V/+ZWzevDlOOeWUeNjDHtadSCfi1FNPjR/84AfbXcZkok2wGlfQ23u/MVPFbJPl7cWybKYrs1mW/+zP/iz++Z//Of76r/86HvnIR1bdY1k205XZKMvvfOc74xWveEWsW7cuvvzlL8frXve6uPvuu+PNb35z8V7LspmOzCY5/uIXvxhf/vKX44orrpi0zFmOzXRlNsnywx/+8Hj4wx/e/f9JJ50Uz3nOc+KYY46Jt771rcUPPSMsy2b
"text/plain": [
"<Figure size 3100x300 with 11 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"dataSet_cropOD.plot.pcolormesh(cmap='jet', vmin=0, vmax=5, col=scanAxis[0])"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [],
"source": [
"data = dataSet_cropOD#.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": 28,
"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: (runs: 10)\n",
"Coordinates:\n",
" * runs (runs) float64 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0\n",
"Data variables: (12/13)\n",
" BEC_amplitude (runs) object 622.325100923668+/-nan ... 622.4907683...\n",
" thermal_amplitude (runs) object 574.323330298593+/-nan ... 562.0410431...\n",
" BEC_centerx (runs) object 40.697673212791095+/-nan ... 41.846469...\n",
" BEC_centery (runs) object 38.68619529315486+/-nan ... 40.1657973...\n",
" thermal_centerx (runs) object 41.672856011589964+/-nan ... 42.186994...\n",
" thermal_centery (runs) object 40.50023901378942+/-nan ... 41.8611854...\n",
" ... ...\n",
" BEC_sigmay (runs) object 9.925094420566738+/-nan ... 9.27924633...\n",
" thermal_sigmax (runs) object 15.219058592618353+/-nan ... 14.193823...\n",
" thermal_sigmay (runs) object 18.262870311142024+/-nan ... 17.032587...\n",
" deltax (runs) object 18.54999801825887+/-nan ... 15.3119583...\n",
" thermalAspectRatio (runs) object 1.2+/-nan 1.2+/-nan ... 1.2+/-nan\n",
" condensate_fraction (runs) object 0.5200567557574306+/-nan ... 0.5255162...\n",
"Attributes:\n",
" IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n",
" IMAGE_VERSION: 1.2\n",
" IMAGE_WHITE_IS_ZERO: 0\n",
" x_start: 840\n",
" x_end: 920\n",
" y_end: 1020\n",
" y_start: 940\n",
" x_center: 880\n",
" y_center: 980\n",
" x_span: 80\n",
" y_span: 80</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-60c42fd0-1a85-4919-aa1c-bfb084af74a7' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-60c42fd0-1a85-4919-aa1c-bfb084af74a7' 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'>runs</span>: 10</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-dfa28b62-a15c-4172-838f-098c85289f06' class='xr-section-summary-in' type='checkbox' checked><label for='section-dfa28b62-a15c-4172-838f-098c85289f06' class='xr-section-summary' >Coordinates: <span>(1)</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'>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 3.0 ... 6.0 7.0 8.0 9.0</div><input id='attrs-e6821b36-8258-4c1c-9141-12274eebcbe3' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e6821b36-8258-4c1c-9141-12274eebcbe3' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-42cb0531-1f9a-4356-b7af-d199d488e654' class='xr-var-data-in' type='checkbox'><label for='data-42cb0531-1f9a-4356-b7af-d199d488e654' 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., 3., 4., 5., 6., 7., 8., 9.])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-0123b3c4-de0d-45ad-98f2-f83d620f53de' class='xr-section-summary-in' type='checkbox' checked><label for='section-0123b3c4-de0d-45ad-98f2-f83d620f53de' 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'>(runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>622.325100923668+/-nan ... 622.4...</div><input id='attrs-8c78ceea-4cd7-4c4d-ba36-89f2863c3371' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-8c78ceea-4cd7-4c4d-ba36-89f2863c3371' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-300ecd0d-3710-4646-8b23-417eafa347e6' class='xr-var-data-in' type='checkbox'><label for='data-300ecd0d-3710-4646-8b23-417eafa347e6' 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([622.325100923668+/-nan, 565.810960428506+/-nan,\n",
" 580.1085845591986+/-nan, 636.5250359081975+/-nan,\n",
" 600.2141025258858+/-nan, 577.2958286890241+/-nan,\n",
" 627.3808268148166+/-nan, 617.2187811344919+/-nan,\n",
" 641.2607989957359+/-nan, 622.4907683665502+/-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'>(runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>574.323330298593+/-nan ... 562.0...</div><input id='attrs-80a14f33-5cf0-4c13-9c0a-7576c6f3d980' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-80a14f33-5cf0-4c13-9c0a-7576c6f3d980' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-07353150-bab9-408e-bd57-bf3dc30b3157' class='xr-var-data-in' type='checkbox'><label for='data-07353150-bab9-408e-bd57-bf3dc30b3157' 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([574.323330298593+/-nan, 568.4626463236162+/-nan,\n",
" 583.7522671412466+/-nan, 520.5663944276968+/-nan,\n",
" 629.6233172781357+/-nan, 617.2121947211904+/-nan,\n",
" 602.967628810155+/-nan, 562.4835962828049+/-nan,\n",
" 604.8087834130785+/-nan, 562.0410431412295+/-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'>(runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>40.697673212791095+/-nan ... 41....</div><input id='attrs-b16c5c85-3efc-44ed-975a-7c700a2e5688' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b16c5c85-3efc-44ed-975a-7c700a2e5688' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0729c6f4-263c-403b-a41f-a4ce1ee63511' class='xr-var-data-in' type='checkbox'><label for='data-0729c6f4-263c-403b-a41f-a4ce1ee63511' 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([40.697673212791095+/-nan, 39.45883091234254+/-nan,\n",
" 41.22347787951619+/-nan, 40.89898530220542+/-nan,\n",
" 41.63210069803921+/-nan, 39.324681218279466+/-nan,\n",
" 38.275787736341755+/-nan, 39.60209353554154+/-nan,\n",
" 42.00470746236811+/-nan, 41.846469101560324+/-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'>(runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>38.68619529315486+/-nan ... 40.1...</div><input id='attrs-437dd93f-05d7-4298-92f4-44d43fa3b773' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-437dd93f-05d7-4298-92f4-44d43fa3b773' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-97a4586b-0749-4e60-b91b-6c4de93e6359' class='xr-var-data-in' type='checkbox'><label for='data-97a4586b-0749-4e60-b91b-6c4de93e6359' 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([38.68619529315486+/-nan, 42.61360351211025+/-nan,\n",
" 41.563561921615275+/-nan, 40.06131528825722+/-nan,\n",
" 43.90475816622681+/-nan, 44.50753547226045+/-nan,\n",
" 43.14256883489733+/-nan, 41.82261283543652+/-nan,\n",
" 41.53493261128381+/-nan, 40.165797300781946+/-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'>(runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>41.672856011589964+/-nan ... 42....</div><input id='attrs-07aeb4e6-91df-4d08-87d7-459104e1eba5' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-07aeb4e6-91df-4d08-87d7-459104e1eba5' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5f70a575-c0f1-4498-9777-7eba43808c0c' class='xr-var-data-in' type='checkbox'><label for='data-5f70a575-c0f1-4498-9777-7eba43808c0c' 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([41.672856011589964+/-nan, 41.10729207485836+/-nan,\n",
" 42.74513908785217+/-nan, 41.541130169383074+/-nan,\n",
" 41.44245089494752+/-nan, 40.150975380806294+/-nan,\n",
" 40.2004632958644+/-nan, 41.44977519532488+/-nan,\n",
" 42.69309201162166+/-nan, 42.18699416012472+/-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'>(runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>40.50023901378942+/-nan ... 41.8...</div><input id='attrs-88335c7f-0add-4a64-939d-704c48fe4979' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-88335c7f-0add-4a64-939d-704c48fe4979' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6f4c67a4-fa1c-4263-90df-7bd0431b4216' class='xr-var-data-in' type='checkbox'><label for='data-6f4c67a4-fa1c-4263-90df-7bd0431b4216' 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([40.50023901378942+/-nan, 44.81057142219622+/-nan,\n",
" 43.010161191179634+/-nan, 41.36490168879652+/-nan,\n",
" 45.17646234836704+/-nan, 45.95553486593841+/-nan,\n",
" 44.574513165193316+/-nan, 43.26958231838+/-nan,\n",
" 42.5998739671102+/-nan, 41.86118542627792+/-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'>(runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>27.10717775959619+/-nan ... 27.2...</div><input id='attrs-4a1c6250-a107-4a59-aed4-cb370052078a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-4a1c6250-a107-4a59-aed4-cb370052078a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1ee2b534-748c-4346-8ee5-528c67591da0' class='xr-var-data-in' type='checkbox'><label for='data-1ee2b534-748c-4346-8ee5-528c67591da0' 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([27.10717775959619+/-nan, 27.813248412756067+/-nan,\n",
" 27.180460059842797+/-nan, 28.359108484779306+/-nan,\n",
" 27.12902681300635+/-nan, 27.786783488553446+/-nan,\n",
" 27.56817106112974+/-nan, 28.162503921088394+/-nan,\n",
" 27.38249247770765+/-nan, 27.269511683790224+/-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'>(runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>9.925094420566738+/-nan ... 9.27...</div><input id='attrs-7ed7bedc-4010-4cfd-931e-10f017eecf44' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7ed7bedc-4010-4cfd-931e-10f017eecf44' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7d439e7e-f79d-4468-be0f-d8e065206781' class='xr-var-data-in' type='checkbox'><label for='data-7d439e7e-f79d-4468-be0f-d8e065206781' 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([9.925094420566738+/-nan, 8.320083964510589+/-nan,\n",
" 8.832237277118526+/-nan, 10.102464552278184+/-nan,\n",
" 8.87861409804287+/-nan, 8.215669300544008+/-nan,\n",
" 8.96268636585824+/-nan, 8.690636986312713+/-nan,\n",
" 9.739827034241756+/-nan, 9.279246332574647+/-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'>(runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>15.219058592618353+/-nan ... 14....</div><input id='attrs-56d1bd43-6cdc-4920-b6c7-1fdd6dd2d566' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-56d1bd43-6cdc-4920-b6c7-1fdd6dd2d566' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-060a01be-af83-46f3-bd5e-d170d23f33c1' class='xr-var-data-in' type='checkbox'><label for='data-060a01be-af83-46f3-bd5e-d170d23f33c1' 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([15.219058592618353+/-nan, 13.845036738454665+/-nan,\n",
" 14.10887047132501+/-nan, 13.982332369691441+/-nan,\n",
" 14.817239722846576+/-nan, 13.924008993096628+/-nan,\n",
" 14.06259374875233+/-nan, 13.970679478445314+/-nan,\n",
" 14.551516131029505+/-nan, 14.193823332828861+/-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'>(runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>18.262870311142024+/-nan ... 17....</div><input id='attrs-23e8b2e2-657a-42ed-961e-c77b59bfddbc' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-23e8b2e2-657a-42ed-961e-c77b59bfddbc' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1a635959-da98-4d4d-91d0-7ae15ed84d91' class='xr-var-data-in' type='checkbox'><label for='data-1a635959-da98-4d4d-91d0-7ae15ed84d91' 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([18.262870311142024+/-nan, 16.614044086145597+/-nan,\n",
" 16.93064456559001+/-nan, 16.77879884362973+/-nan,\n",
" 17.78068766741589+/-nan, 16.70881079171595+/-nan,\n",
" 16.875112498502794+/-nan, 16.764815374134376+/-nan,\n",
" 17.461819357235406+/-nan, 17.032587999394632+/-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'>(runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>18.54999801825887+/-nan ... 15.3...</div><input id='attrs-81b86ab2-05c4-46af-b7eb-dd9b8692e37d' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-81b86ab2-05c4-46af-b7eb-dd9b8692e37d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c10656fe-164c-4f8e-8e49-5e051c6c829b' class='xr-var-data-in' type='checkbox'><label for='data-c10656fe-164c-4f8e-8e49-5e051c6c829b' 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([18.54999801825887+/-nan, 13.721861802607926+/-nan,\n",
" 15.146151354132233+/-nan, 13.58788862429502+/-nan,\n",
" 17.322692355533373+/-nan, 13.985243490736439+/-nan,\n",
" 14.61961018512725+/-nan, 13.749534514247552+/-nan,\n",
" 16.272055915380868+/-nan, 15.311958314696358+/-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'>(runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>1.2+/-nan 1.2+/-nan ... 1.2+/-nan</div><input id='attrs-50e91101-69c3-41a3-886f-295285e5d10f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-50e91101-69c3-41a3-886f-295285e5d10f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-62611110-afac-4c3b-aec9-0af98ad5fbe9' class='xr-var-data-in' type='checkbox'><label for='data-62611110-afac-4c3b-aec9-0af98ad5fbe9' 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.2+/-nan, 1.2+/-nan, 1.2+/-nan, 1.2+/-nan, 1.2+/-nan, 1.2+/-nan,\n",
" 1.2+/-nan, 1.2+/-nan, 1.2+/-nan, 1.2+/-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'>(runs)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>0.5200567557574306+/-nan ... 0.5...</div><input id='attrs-6173a4af-0749-44b3-aae8-5a00f0fed341' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6173a4af-0749-44b3-aae8-5a00f0fed341' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f7f70436-1017-4f50-8a0f-05082a167cfe' class='xr-var-data-in' type='checkbox'><label for='data-f7f70436-1017-4f50-8a0f-05082a167cfe' 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.5200567557574306+/-nan, 0.4988311083501699+/-nan,\n",
" 0.49843465712558144+/-nan, 0.5501078127624015+/-nan,\n",
" 0.4880434542490436+/-nan, 0.4832917128851891+/-nan,\n",
" 0.5099212535656252+/-nan, 0.523198726178512+/-nan,\n",
" 0.5146267977716745+/-nan, 0.5255162945553884+/-nan], dtype=object)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-8e928194-cb1d-475c-84ab-5f5c80f99c34' class='xr-section-summary-in' type='checkbox' ><label for='section-8e928194-cb1d-475c-84ab-5f5c80f99c34' class='xr-section-summary' >Indexes: <span>(1)</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>runs</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-7968ab3e-c4a8-4426-8503-25aff64cc953' class='xr-index-data-in' type='checkbox'/><label for='index-7968ab3e-c4a8-4426-8503-25aff64cc953' 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, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0], dtype=&#x27;float64&#x27;, name=&#x27;runs&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-abed971f-e595-472e-81a4-10d6ecd56c03' class='xr-section-summary-in' type='checkbox' ><label for='section-abed971f-e595-472e-81a4-10d6ecd56c03' 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>840</dd><dt><span>x_end :</span></dt><dd>920</dd><dt><span>y_end :</span></dt><dd>1020</dd><dt><span>y_start :</span></dt><dd>940</dd><dt><span>x_center :</span></dt><dd>880</dd><dt><span>y_center :</span></dt><dd>980</dd><dt><span>x_span :</span></dt><dd>80</dd><dt><span>y_span :</span></dt><dd>80</dd></dl></div></li></ul></div></div>"
],
"text/plain": [
"<xarray.Dataset>\n",
"Dimensions: (runs: 10)\n",
"Coordinates:\n",
" * runs (runs) float64 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0\n",
"Data variables: (12/13)\n",
" BEC_amplitude (runs) object 622.325100923668+/-nan ... 622.4907683...\n",
" thermal_amplitude (runs) object 574.323330298593+/-nan ... 562.0410431...\n",
" BEC_centerx (runs) object 40.697673212791095+/-nan ... 41.846469...\n",
" BEC_centery (runs) object 38.68619529315486+/-nan ... 40.1657973...\n",
" thermal_centerx (runs) object 41.672856011589964+/-nan ... 42.186994...\n",
" thermal_centery (runs) object 40.50023901378942+/-nan ... 41.8611854...\n",
" ... ...\n",
" BEC_sigmay (runs) object 9.925094420566738+/-nan ... 9.27924633...\n",
" thermal_sigmax (runs) object 15.219058592618353+/-nan ... 14.193823...\n",
" thermal_sigmay (runs) object 18.262870311142024+/-nan ... 17.032587...\n",
" deltax (runs) object 18.54999801825887+/-nan ... 15.3119583...\n",
" thermalAspectRatio (runs) object 1.2+/-nan 1.2+/-nan ... 1.2+/-nan\n",
" condensate_fraction (runs) object 0.5200567557574306+/-nan ... 0.5255162...\n",
"Attributes:\n",
" IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n",
" IMAGE_VERSION: 1.2\n",
" IMAGE_WHITE_IS_ZERO: 0\n",
" x_start: 840\n",
" x_end: 920\n",
" y_end: 1020\n",
" y_start: 940\n",
" x_center: 880\n",
" y_center: 980\n",
" x_span: 80\n",
" y_span: 80"
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"fitAnalyser_1.get_fit_full_result(fitResult_1)"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Calibration of the magnetic fields"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Z Offset field = 0.489A"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'carrier_freq': array([9.525, 9.527, 9.529, 9.531, 9.533, 9.535, 9.537, 9.539, 9.541,\n",
" 9.543, 9.545, 9.547, 9.549, 9.551, 9.553, 9.555, 9.557, 9.559])}\n"
]
},
{
"data": {
"application/javascript": "/* Put everything inside the global mpl namespace */\n/* global mpl */\nwindow.mpl = {};\n\nmpl.get_websocket_type = function () {\n if (typeof WebSocket !== 'undefined') {\n return WebSocket;\n } else if (typeof MozWebSocket !== 'undefined') {\n return MozWebSocket;\n } else {\n alert(\n 'Your browser does not have WebSocket support. ' +\n 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n 'Firefox 4 and 5 are also supported but you ' +\n 'have to enable WebSockets in about:config.'\n );\n }\n};\n\nmpl.figure = function (figure_id, websocket, ondownload, parent_element) {\n this.id = figure_id;\n\n this.ws = websocket;\n\n this.supports_binary = this.ws.binaryType !== undefined;\n\n if (!this.supports_binary) {\n var warnings = document.getElementById('mpl-warnings');\n if (warnings) {\n warnings.style.display = 'block';\n warnings.textContent =\n 'This browser does not support binary websocket messages. ' +\n 'Performance may be slow.';\n }\n }\n\n this.imageObj = new Image();\n\n this.context = undefined;\n this.message = undefined;\n this.canvas = undefined;\n this.rubberband_canvas = undefined;\n this.rubberband_context = undefined;\n this.format_dropdown = undefined;\n\n this.image_mode = 'full';\n\n this.root = document.createElement('div');\n this.root.setAttribute('style', 'display: inline-block');\n this._root_extra_style(this.root);\n\n parent_element.appendChild(this.root);\n\n this._init_header(this);\n this._init_canvas(this);\n this._init_toolbar(this);\n\n var fig = this;\n\n this.waiting = false;\n\n this.ws.onopen = function () {\n fig.send_message('supports_binary', { value: fig.supports_binary });\n fig.send_message('send_image_mode', {});\n if (fig.ratio !== 1) {\n fig.send_message('set_device_pixel_ratio', {\n device_pixel_ratio: fig.ratio,\n });\n }\n fig.send_message('refresh', {});\n };\n\n this.imageObj.onload = function () {\n if (fig.image_mode === 'full') {\n // Full images could contain transparency (where diff images\n // almost always do), so we need to clear the canvas so that\n // there is no ghosting.\n fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n }\n fig.context.drawImage(fig.imageObj, 0, 0);\n };\n\n this.imageObj.onunload = function () {\n fig.ws.close();\n };\n\n this.ws.onmessage = this._make_on_message_function(this);\n\n this.ondownload = ondownload;\n};\n\nmpl.figure.prototype._init_header = function () {\n var titlebar = document.createElement('div');\n titlebar.classList =\n 'ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix';\n var titletext = document.createElement('div');\n titletext.classList = 'ui-dialog-title';\n titletext.setAttribute(\n 'style',\n 'width: 100%; text-align: center; padding: 3px;'\n );\n titlebar.appendChild(titletext);\n this.root.appendChild(titlebar);\n this.header = titletext;\n};\n\nmpl.figure.prototype._canvas_extra_style = function (_canvas_div) {};\n\nmpl.figure.prototype._root_extra_style = function (_canvas_div) {};\n\nmpl.figure.prototype._init_canvas = function () {\n var fig = this;\n\n var canvas_div = (this.canvas_div = document.createElement('div'));\n canvas_div.setAttribute(\n 'style',\n 'border: 1px solid #ddd;' +\n 'box-sizing: content-box;' +\n 'clear: both;' +\n 'min-height: 1px;' +\n 'min-width: 1px;' +\n 'outline: 0;' +\n 'overflow: hidden;' +\n 'position: relative;' +\n 'resize: both;'\n );\n\n function on_keyboard_event_closure(name) {\n return function (event) {\n return fig.key
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAIABJREFUeF7snQuUFdWV93eLiGBA3goBgSCQoAZxVFCjwhhAcCKIDAjJqIxKRp0o8lCJcYSoKHF8jcYIZgkMCJiPD1QUoiggqMFJUBMfgKKovGLk+UkQHLC/tUtv2910963e55y6t/r+ai2XdHedU1X//Tv7/mufOnWLiouLi4UNBVAABVAABVAABVCgYBQowgAWTKy5UBRAARRAARRAARSIFMAAAgIKoAAKoAAKoAAKFJgCGMACCziXiwIogAIogAIogAIYQBhAARRAARRAARRAgQJTAANYYAHnclEABVAABVAABVAAAwgDKIACKIACKIACKFBgCmAACyzgXC4KoAAKoAAKoAAKYABhAAVQAAVQAAVQAAUKTAEMYIEFnMtFARRAARRAARRAAQwgDKAACqAACqAACqBAgSmAASywgHO5KIACKIACKIACKIABhAEUQAEUQAEUQAEUKDAFMIAFFnAuFwVQAAVQAAVQAAUwgA4MfPnll7J582apX7++FBUVOfREUxRAARRAARRAgUJXoLi4WD777DNp2bKlHHLIIUHlwAA6yLtx40Zp3bq1Qw80RQEUQAEUQAEUQIGyCmzYsEFatWoVVBYMoIO8u3btkoYNG4oGqkGDBg49Vdz0f//3f+W5556T3r17S+3atb33n/YO0afyCKIN2ljHN+zADuxYFXBn5//9v/8XFZZ27twpRx55pP8TKdUjBtBBXg2UBkiNYCgDuHDhQunXrx8GsII46QcV+lR+84A2aGNJb4yrqj/EGVfoE3JchfYVpc8dA2iJ5NdtQgeKRFx1cNCHRGwZvnDDuLJwo21gB3ZCsxPaV2AArREs1y50oEg2JBsrqrCDOYYdqwKwY1WOvOPOTmhfgQG00o0B9KScn25INu7Jxk8k0tUL3HBjZSUWdmAnNDsYQKv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gm0BcFK8ZbS3c1Iwrj3cV6FO5TmiDAYw3ig7eKy47BW0Ar7rqKtFn6p588skyK3H19S36Ghd93cuFF14or732mjz99NPRAo/M1rhxYznssMPk/fffl8ceeyyqDOnDlPoKmdGjR0ftdcVwra+/+0sXhmzevFkmT54cdaGvgWnTpk3OXgNT3qjwTSAkm9DJxtp/mtvFTcRpvkaXc0cfDKCVH9hxZ6egDWBRZq6znI5Tp06VSy+9VD788MMKp4R1d60G6utfNmzYID/5yU+ixR+7d++OVuqed9550SpgNYmZbfv27Qe9CPrBBx/M6YugS182gwkDSCK2KuCeiP0fOR09kndgx0oq7LizU9AG0ApeLtqFDhSDCQNo5Rp23BOxVfu0t4Md2LEyDDvu7IT2FaXPMO+eAbSCl4t2oQPFYMIAWrmGHfdEbNU+7e1gB3asDMOOOzuhfQUG0Ep3uXahA8VgwgBaUYUd90Rs1T7t7WAHdqwMw447O6F9BQbQSjcG0JNyfroh2bgnGz+RSFcvcMONlZVY2IGd0OxgAK0KJ9wudKBINiQbK9KwgzmGHasCsGNVjrzjzk5oX0EF0Eo3FUBPyvnphmTjnmz8RCJdvcANN1ZWYmEHdkKzgwG0Kpxwu9CBItmQbKxIww7mGHasCsCOVTnyjjs7oX0FFUAr3VQAPSnnpxuSjXuy8ROJdPUCN9xYWYmFHdgJzQ4G0Kpwwu1CB4pkQ7KxIg07mGPYsSoAO1blyDvu7IT2FVQArXRTAfSknJ9uSDbuycZPJNLVC9xwY2UlFnZgJzQ7GECrwgm3Cx0okg3Jxoo07GCOYceqAOxYlSPvuLMT2ldQAbTSTQXQk3J+ui
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"%matplotlib notebook\n",
"shotNum = \"0008\"\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": {},
"outputs": [],
"source": [
"Ncount_mean_1 = Ncount_mean\n",
"Ncount_std_1 = Ncount_std\n",
"\n",
"fitAnalyser_1 = FitAnalyser(\"Gaussian With Offset\", fitDim=1)\n",
"# params = fitAnalyser.guess(Ncount_mean_1, x=scanAxis[0], guess_kwargs=dict(negative=True), dask=\"parallelized\")\n",
"params = fitAnalyser_1.fitModel.make_params()\n",
"params.add(name=\"amplitude\", value= -3000, max=np.inf, min=-np.inf, vary=True)\n",
"params.add(name=\"center\", value= 2.785, max=np.inf, min=-np.inf, vary=True)\n",
"params.add(name=\"sigma\", value= 0.1, max=np.inf, min= 0, vary=True)\n",
"params.add(name=\"offset\", value= 3000, max=np.inf, min=-np.inf, vary=True)\n",
"\n",
"fitResult_1 = fitAnalyser_1.fit(Ncount_mean_1, params, x=scanAxis[0]).load()\n",
"freqdata = np.linspace(2.76, 2.81, 500)\n",
"fitCurve_1 = fitAnalyser_1.eval(fitResult_1, x=freqdata, dask=\"parallelized\").load()\n",
"fitCurve_1 = fitCurve_1.assign_coords({'x':np.array(freqdata)})\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
"fitCurve_1.plot.errorbar(ax=ax, fmt='--g')\n",
"plt.xlabel('Center Frequency (MHz)')\n",
"plt.ylabel('NCount')\n",
"#plt.ylim([0, 3500])\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"f_1 = fitAnalyser_1.get_fit_value(fitResult_1).center\n",
"df_1 = fitAnalyser_1.get_fit_std(fitResult_1).center\n",
"\n",
"print('f = %.5f \\u00B1 %.5f kHz'% tuple([np.abs(f_1)* 1e3,df_1* 1e3]))\n",
"\n",
"s_1 = fitAnalyser_1.get_fit_value(fitResult_1).sigma\n",
"ds_1 = fitAnalyser_1.get_fit_std(fitResult_1).sigma\n",
"\n",
"fwhm_1 = 2.3548200*s_1 * 1e3\n",
"dfwhm_1 = 2.3548200*ds_1 * 1e3\n",
"\n",
"print('fwhm = %.5f \\u00B1 %.5f kHz'% tuple([np.abs(fwhm_1),dfwhm_1]))"
]
},
{
"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": []
},
{
"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 = \"0016\"\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": 29,
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[9.525, 9.527, 9.529, 9.531, 9.533, 9.535, 9.537, 9.539, 9.541, 9.543, 9.545, 9.547, 9.549, 9.551, 9.553, 9.555, 9.557, 9.559]\n",
"18\n"
]
},
{
"data": {
"text/plain": [
"9.542"
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"l = list(np.arange(9.525, 9.56, 0.002))\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
}