3218 lines
1.7 MiB
Plaintext
3218 lines
1.7 MiB
Plaintext
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"attachments": {},
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"# Import supporting package"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 1,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"import xarray as xr\n",
|
||
|
"import numpy as np\n",
|
||
|
"import copy\n",
|
||
|
"\n",
|
||
|
"from uncertainties import ufloat\n",
|
||
|
"from uncertainties import unumpy as unp\n",
|
||
|
"from uncertainties import umath\n",
|
||
|
"import random\n",
|
||
|
"import matplotlib.pyplot as plt\n",
|
||
|
"plt.rcParams['font.size'] = 12\n",
|
||
|
"\n",
|
||
|
"from DataContainer.ReadData import read_hdf5_file\n",
|
||
|
"from Analyser.ImagingAnalyser import ImageAnalyser\n",
|
||
|
"from Analyser.FitAnalyser import FitAnalyser\n",
|
||
|
"from Analyser.FitAnalyser import NewFitModel, DensityProfileBEC2dModel\n",
|
||
|
"from ToolFunction.ToolFunction import *\n",
|
||
|
"\n",
|
||
|
"from scipy.optimize import curve_fit\n",
|
||
|
"\n",
|
||
|
"from ToolFunction.HomeMadeXarrayFunction import errorbar, dataarray_plot_errorbar\n",
|
||
|
"xr.plot.dataarray_plot.errorbar = errorbar\n",
|
||
|
"xr.plot.accessor.DataArrayPlotAccessor.errorbar = dataarray_plot_errorbar\n",
|
||
|
"\n",
|
||
|
"imageAnalyser = ImageAnalyser()\n",
|
||
|
"\n",
|
||
|
"# %matplotlib notebook"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"attachments": {},
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## Start a client for parallel computing"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 2,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<div>\n",
|
||
|
" <div style=\"width: 24px; height: 24px; background-color: #e1e1e1; border: 3px solid #9D9D9D; border-radius: 5px; position: absolute;\"> </div>\n",
|
||
|
" <div style=\"margin-left: 48px;\">\n",
|
||
|
" <h3 style=\"margin-bottom: 0px;\">Client</h3>\n",
|
||
|
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">Client-8ba1675f-1745-11ee-81b0-80e82ce2fa8e</p>\n",
|
||
|
" <table style=\"width: 100%; text-align: left;\">\n",
|
||
|
"\n",
|
||
|
" <tr>\n",
|
||
|
" \n",
|
||
|
" <td style=\"text-align: left;\"><strong>Connection method:</strong> Cluster object</td>\n",
|
||
|
" <td style=\"text-align: left;\"><strong>Cluster type:</strong> distributed.LocalCluster</td>\n",
|
||
|
" \n",
|
||
|
" </tr>\n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:8787/status\" target=\"_blank\">http://127.0.0.1:8787/status</a>\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\"></td>\n",
|
||
|
" </tr>\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
" </table>\n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
" <details>\n",
|
||
|
" <summary style=\"margin-bottom: 20px;\"><h3 style=\"display: inline;\">Cluster Info</h3></summary>\n",
|
||
|
" <div class=\"jp-RenderedHTMLCommon jp-RenderedHTML jp-mod-trusted jp-OutputArea-output\">\n",
|
||
|
" <div style=\"width: 24px; height: 24px; background-color: #e1e1e1; border: 3px solid #9D9D9D; border-radius: 5px; position: absolute;\">\n",
|
||
|
" </div>\n",
|
||
|
" <div style=\"margin-left: 48px;\">\n",
|
||
|
" <h3 style=\"margin-bottom: 0px; margin-top: 0px;\">LocalCluster</h3>\n",
|
||
|
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">5686383f</p>\n",
|
||
|
" <table style=\"width: 100%; text-align: left;\">\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Dashboard:</strong> <a href=\"http://127.0.0.1:8787/status\" target=\"_blank\">http://127.0.0.1:8787/status</a>\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Workers:</strong> 8\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Total threads:</strong> 128\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Total memory:</strong> 149.01 GiB\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" \n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\"><strong>Status:</strong> running</td>\n",
|
||
|
" <td style=\"text-align: left;\"><strong>Using processes:</strong> True</td>\n",
|
||
|
"</tr>\n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
" </table>\n",
|
||
|
"\n",
|
||
|
" <details>\n",
|
||
|
" <summary style=\"margin-bottom: 20px;\">\n",
|
||
|
" <h3 style=\"display: inline;\">Scheduler Info</h3>\n",
|
||
|
" </summary>\n",
|
||
|
"\n",
|
||
|
" <div style=\"\">\n",
|
||
|
" <div>\n",
|
||
|
" <div style=\"width: 24px; height: 24px; background-color: #FFF7E5; border: 3px solid #FF6132; border-radius: 5px; position: absolute;\"> </div>\n",
|
||
|
" <div style=\"margin-left: 48px;\">\n",
|
||
|
" <h3 style=\"margin-bottom: 0px;\">Scheduler</h3>\n",
|
||
|
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">Scheduler-579b49b9-56d3-437e-8497-ccb704499216</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:58438\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Workers:</strong> 8\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Dashboard:</strong> <a href=\"http://127.0.0.1:8787/status\" target=\"_blank\">http://127.0.0.1:8787/status</a>\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Total threads:</strong> 128\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Started:</strong> Just now\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Total memory:</strong> 149.01 GiB\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" </table>\n",
|
||
|
" </div>\n",
|
||
|
" </div>\n",
|
||
|
"\n",
|
||
|
" <details style=\"margin-left: 48px;\">\n",
|
||
|
" <summary style=\"margin-bottom: 20px;\">\n",
|
||
|
" <h3 style=\"display: inline;\">Workers</h3>\n",
|
||
|
" </summary>\n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
" <div style=\"margin-bottom: 20px;\">\n",
|
||
|
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
|
||
|
" <div style=\"margin-left: 48px;\">\n",
|
||
|
" <details>\n",
|
||
|
" <summary>\n",
|
||
|
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 0</h4>\n",
|
||
|
" </summary>\n",
|
||
|
" <table style=\"width: 100%; text-align: left;\">\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Comm: </strong> tcp://127.0.0.1:58495\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:58496/status\" target=\"_blank\">http://127.0.0.1:58496/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:58441\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-fjkqs65s\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:58478\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:58481/status\" target=\"_blank\">http://127.0.0.1:58481/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:58442\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-2zpxzh7e\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:58485\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:58489/status\" target=\"_blank\">http://127.0.0.1:58489/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:58443\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-xj22aq7d\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:58483\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:58486/status\" target=\"_blank\">http://127.0.0.1:58486/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:58444\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-ywxt37o0\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:58460\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:58473/status\" target=\"_blank\">http://127.0.0.1:58473/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:58445\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-r165h314\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:58492\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:58493/status\" target=\"_blank\">http://127.0.0.1:58493/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:58446\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-y9scwwnw\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:58477\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:58479/status\" target=\"_blank\">http://127.0.0.1:58479/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:58447\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-6gncvkv7\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:58484\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:58488/status\" target=\"_blank\">http://127.0.0.1:58488/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:58448\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-4vducatr\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:58438' 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": 7,
|
||
|
"metadata": {
|
||
|
"scrolled": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"The detected scaning axes and values are: \n",
|
||
|
"\n",
|
||
|
"{'initial_freq': array([101. , 101.25, 101.5 , 101.75, 102. , 102.25, 102.5 , 102.75,\n",
|
||
|
" 103. , 103.25]), '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,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAIABJREFUeF7snQu0VVX1/ycgIBgI8jAQFEPE0AKsEDT7cVMgHAaKikIl8jMgH39AwAc+oQQlQDCf8CsVH4DlUAHjaYKY+EbNiofmg2eSIKQhmHT/Yy47l3svF9Zcd6671trnfPcYjdS95llzfz5nbSZzP0614uLiYsIGAiAAAiAAAiAAAiBQMASqoQAsGNc4UBAAARAAARAAARAwBFAA4osAAiAAAiAAAiAAAgVGAAVggQnH4YIACIAACIAACIAACkB8B0AABEAABEAABECgwAigACww4ThcEAABEAABEAABEEABiO8ACIAACIAACIAACBQYARSABSYchwsCIAACIAACIAACKADxHQABEAABEAABEACBAiOAArDAhONwQQAEQAAEQAAEQAAFIL4DIAACIAACIAACIFBgBFAAFphwHC4IgAAIgAAIgAAIoADEdwAEQAAE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xAIP8zRjG+2IKJHH33UPAlc+iGQa6+91jwEkns1zIQJE+hXv/oVHgIJvRLyYD7cA5MdiXCVDVf54KlQfjItH1yFXhV5dw/gp59+Su+8847h2LFjR7rtttvMAxf88AW/649fDbNy5Up66qmn6PDDDy/hzftzRRi/Bob38716/N/5nYD8Gpfyr4Hh+/X4nkDe+JLvUUcdtc9rYHgOfi8hP1TCTwDzgyS518BwsclPDH
|
||
|
],
|
||
|
"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')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"attachments": {},
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## scan Push freq"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"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",
|
||
|
"{'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,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAGJZJREFUeF7t1kEBAAAIAjHpX9ogNxswfLBzBAgQIECAAAECKYGl0gpLgAABAgQIECBwBqAnIECAAAECBAjEBAzAWOHiEiBAgAABAgQMQD9AgAABAgQIEIgJGICxwsUlQIAAAQIECBiAfoAAAQIECBAgEBMwAGOFi0uAAAECBAgQMAD9AAECBAgQIEAgJmAAxgoXlwABAgQIECBgAPoBAgQIECBAgEBMwACMFS4uAQIECBAgQMAA9AMECBAgQIAAgZiAARgrXFwCBAgQIECAgAHoBwgQIECAAAECMQEDMFa4uAQIECBAgAABA9APECBAgAABAgRiAgZgrHBxCRAgQIAAAQIGoB8gQIAAAQIECMQEDMBY4eISIECAAAECBAxAP0CAAAECBAgQiAkYgLHCxSVAgAABAgQIGIB+gAABAgQIECAQEzAAY4WLS4AAAQIECBAwAP0AAQIECBAgQCAmYADGCheXAAECBAgQIGAA+gECBAgQIECAQEzAAIwVLi4BAgQIECBAwAD0AwQIECBAgACBmIABGCtcXAIECBAgQICAAegHCBAgQIAAAQIxAQMwVri4BAgQIECAAAED0A8QIECAAAECBGICBmCscHEJECBAgAABAgagHyBAgAABAgQIxAQMwFjh4hIgQIAAAQIEDEA/QIAAAQIECBCICRiAscLFJUCAAAECBAgYgH6AAAECBAgQIBATMABjhYtLgAABAgQIEDAA/QABAgQIECBAICZgAMYKF5cAAQIECBAgYAD6AQIECBAgQIBATMAAjBUuLgECBAgQIEDAAPQDBAgQIECAAIGYgAEYK1xcAgQIECBAgIAB6AcIECBAgAABAjEBAzBWuLgECBAgQIAAAQPQDxAgQIAAAQIEYgIGYKxwcQkQIECAAAECBqAfIECAAAECBAjEBAzAWOHiEiBAgAABAgQMQD9AgAABAgQIEIgJGICxwsUlQIAAAQIECBiAfoAAAQIECBAgEBMwAGOFi0uAAAECBAgQMAD9AAECBAgQIEAgJmAAxgoXlwABAgQIECBgAPoBAgQIECBAgEBMwACMFS4uAQIECBAgQMAA9AMECBAgQIAAgZiAARgrXFwCBAgQIECAgAHoBwgQIECAAAECMQEDMFa4uAQIECBAgAABA9APECBAgAABAgRiAgZgrHBxCRAgQIAAAQIGoB8gQIAAAQIECMQEDMBY4eISIECAAAECBAxAP0CAAAECBAgQiAkYgLHCxSVAgAABAgQIGIB+gAABAgQIECAQEzAAY4WLS4AAAQIECBAwAP0AAQIECBAgQCAmYADGCheXAAECBAgQIGAA+gECBAgQIECAQEzAAIwVLi4BAgQIECBAwAD0AwQIECBAgACBmIABGCtcXAIECBAgQICAAegHCBAgQIAAAQIxAQMwVri4BAgQIECAAAED0A8QIECAAAECBGICBmCscHEJECBAgAABAgagHyBAgAABAgQIxAQMwFjh4hIgQIAAAQIEDEA/QIAAAQIECBCICRiAscLFJUCAAAECBAgYgH6AAAECBAgQIBATMABjhYtLgAABAgQIEDAA/QABAgQIECBAICZgAMYKF5cAAQIECBAgYAD6AQIECBAgQIBATMAAjBUuLgECBAgQIEDAAPQDBAgQIECAAIGYgAEYK1xcAgQIECBAgIAB6AcIECBAgAABAjEBAzBWuLgECBAgQIAAAQPQDxAgQIAAAQIEYgIGYKxwcQkQIECAAAECBqAfIECAAAECBAjEBAzAWOHiEiBAgAABAgQMQD9AgAABAgQIEIgJGICxwsUlQIAAAQIECBiAfoAAAQIECBAgEBMwAGOFi0uAAAECBAgQMAD9AAECBAgQIEAgJmAAxgoXlwABAgQIECBgAPoBAgQIECBAgEBMwACMFS4uAQIECBAgQMAA9AMECBAgQIAAgZiAARgrXFwCBAgQIECAgAHoBwgQIECAAAECMQEDMFa4uAQIECBAgAABA9APECBAgAABAgRiAgZgrHBxCRAgQIAAAQIGoB8gQIAAAQIECMQEDMBY4eISIECAAAECBAxAP0CAAAECBAgQiAkYgLHCxSVAgAABAgQIGIB+gAABAgQIECAQEzAAY4WLS4AAAQIECBAwAP0AAQIECBAgQCAmYADGCheXAAECBAgQIGAA+gECBAgQIECAQEzAAIwVLi4BAgQIECBAwAD0AwQIECBAgACBmIABGCtcXAIECBAgQICAAegHCBAgQIAAAQIxAQMwVri4BAgQIECAAAED0A8QIECAAAECBGICBmCscHEJECBAgAABAgagHyBAgAABAgQIxAQMwFjh4hIgQIAAAQIEDEA/QIAAAQIECBCICRiAscLFJUCAAAECBAgYgH6AAAECBAgQIBATMABjhYtLgAABAgQIEDAA/QABAgQIECBAICZgAMYKF5cAAQIECBAgYAD6AQIECBAgQIBATMAAjBUuLgECBAgQIEDAAPQDBAgQIECAAIGYgAEYK1xcAgQIECBAgIAB6AcIECBAgAABAjEBAzBWuLgECBAgQIAAAQPQDxAgQIAAAQIEYgIGYKxwcQkQIECAAAECBqAfIECAAAECBAjEBAzAWOHiEiBAgAABAgQMQD9AgAABAgQIEIgJGICxwsUlQIAAAQIECBiAfoAAAQIECBAgEBMwAGOFi0uAAAECBAgQMAD9AAECBAgQIEAgJmAAxgoXlwABAgQIECBgAPoBAgQIECBAgEBMwACMFS4uAQIECBAgQMAA9AMECBAgQIAAgZiAARgrXFwCBAgQIECAgAHoBwgQIECAAAECMQEDMFa4uAQIECBAgAABA9APECBAgAABAgRiAgZgrHBxCRAgQIAAAQIGoB8gQIAAAQIECMQEDMBY4eISIECAAAECBAxAP0CAAAECBAgQiAkYgLHCxSVAgAABAgQIGIB+gAABAgQIECAQEzAAY4WLS4AAAQIECBAwAP0AAQIECBAgQCAmYADGCheXAAECBAgQIGAA+gECBAgQIECAQEzAAIwVLi4BAgQIECBAwAD0AwQIECBAgACBmIABGCtcXAIECBAgQICAAegHCBAgQIAAAQIxAQMwVri4BAgQIECAAAED0A8QIECAAAECBGICBmCscHEJECBAgAABAgagHyBAgAABAgQIxAQMwFjh4hIgQIAAAQIEDEA/QIAAAQIECBCICRiAscLFJUCAAAECBAgYgH6AAAECBAgQIBATMABjhYtLgAABAgQIEDAA/QABAgQIECBAICZgAMYKF5cAAQIECBAgYAD6AQIECBAgQIBATMAAjBUuLgECBAgQIEDAAPQDBAgQIECAAIGYgAEYK1xcAgQIECBAgIAB6AcIECBAgAABAjEBAzBWuLgECBAgQIAAAQPQDxAgQIAAAQIEYgIGYKxwcQkQIECAAAECBqAfIECAAAECBAjEBAzAWOHiEiBAgAABAgQMQD9AgAABAgQIEIgJGICxwsUlQIAAAQIECBiAfoAAAQIECBAgEBMwAGOFi0uAAAECBAgQMAD9AAECBAgQIEAgJmAAxgoXlwABAgQIECBgAPoBAgQIECBAgEBMwACMFS4uAQIECBAgQMAA9AMECBAgQIAAgZiAARgrXFwCBAgQIECAgAHoBwgQIECAAAECMQEDMFa4uAQIECBAgAABA9APECBAgAABAgRiAgZgrHBxCRAgQIAAAQIGoB8gQIAAAQIECMQEDMBY4eISIECAAAECBAxAP0CAAAECBAgQiAkYgLHCxSVAgAABAgQIGIB+gAABAgQIECAQEzAAY4WLS4AAAQIECBAwAP0AAQIECBAgQCAmYADGCheXAAECBAgQIGAA+gECBAgQIECAQEzAAIwVLi4BAgQIECBAwAD0AwQIECBAgACBmIABGCtcXAIECBAgQICAAegHCBAgQIAAAQIxAQMwVri4BAgQIECAAAED0A8QIECAAAECBGICBmCscHEJECBAgAABAgagHyBAgAABAgQIxAQMwF
|
||
|
],
|
||
|
"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": 24,
|
||
|
"metadata": {
|
||
|
"scrolled": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"The detected scaning axes and values are: \n",
|
||
|
"\n",
|
||
|
"{'compZ_final_current': array([0.242 , 0.2427, 0.2434, 0.2441, 0.2448, 0.2455, 0.2462, 0.2469,\n",
|
||
|
" 0.2476, 0.2483, 0.249 , 0.2497, 0.2504, 0.2511, 0.2518]), '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,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAIABJREFUeF7tnQu4VkXZ/p/tFgmUkyAGsnWbBwo1sfKcCp8KUuYBCYH6VPL0qYlnxUyDFI08QR5SKxU1wC8+PKNiCeIhrTzlP0U0UdlAoshBRTBo/69n4bvdh3ezZmbNvd5Za93rurpSedYzM/dvZtbNzJr1VtXX19cLLypABagAFaACVIAKUIHCKFBFA1gY1mwoFaACVIAKUAEqQAUiBWgA2RGoABWgAlSAClABKlAwBWgACwaczaUCVIAKUAEqQAWoAA0g+wAVoAJUgApQASpABQqmAA1gwYCzuVSAClABKkAFqAAVoAFkH6ACVIAKUAEqQAWoQMEUoAEsGHA2lwpQASpABagAFaACNIDsA1SAClABKkAFqAAVKJgCNIAFA87mUgEqQAWoABWgAlSABpB9gApQASpABagAFaACBVOABrBgwNlcKkAFqAAVoAJUgArQALIPUAEqQAWoABWgAlSgYArQABYMOJtLBagAFaACVIAKUAEaQHAf+M9//iOLFi2SDh06SFVVFbg0pqcCVIAKUAEqQAXyokB9fb189NFH0rNnT9loo428NosG0KucLZPV1dVJTU0NuBSmpwJUgApQASpABfKqwIIFC6RXr15em0cD6FXOlslWrFghnTt3FoXXsWNH76X9+9//lpkzZ8qAAQOkTZs23vMzoZkC5GCmEzqKHNAKm+cnC3OtkJHkgFTXPLcrh5UrV0aLSMuXL5dOnTqZF2gQSQNoIFKSEIWn0NQIogzgjBkz5Dvf+Q4NYBJQCe/VwU0OCUX0cDs5eBDRUwqy8CRkwjTkkFBAT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1ECBrHGgARRB/yKJQbfJdUjWxkReYbhyQHoIGkBwb0PCowEEw7NI7zq4LYpgqIECWeNAAyiC/k1ig26T65CsjYm8wnDlgPQQNIDg3oaERwMIhmeR3nVwWxTBUAMFssaBBpArgAbdOlFI1sZEosYGfLMrB6SHoAEEdxgkPBpAMDyL9K6D26IIhhookDUONIBfvAOI+k1ig26T65CsjYm8wnDlgPQQwRnAK664QqZPny5z586Vdu3ayT777CPjx4+X3r17N/SL4447TiZNmtSkn+y5557y7LPPNvy3NWvWyLnnnitTpkyRTz/9VA488EC58cYbpVevXg0xy5Ytk1GjRsn9998f/bfDDjtMrrvuOuncuXNDzLvvviunnXaaPP7441F9RowYIVdddZVssskmRv0UCY8G0AhBKkGugzuVyhWokKxxoAFc3zmRv0lcoO5ftqlZGxN55eXKAekhgjOAhxxyiAwbNkx23313Wbt2rVx00UXyyiuvyKuvviqbbrpp1DfUAL733nty2223NfQVNWSbb755w7+fcsop8sADD8jtt98uXbt2lXPOOUc+/PBDef7556W6ujqKGzRokNTV1cktt9wS/ftJJ50ktbW10X16rVu3Tvr27StbbLGFXH311bJ06VI59thjZfDgwZFRNLmQ8GgATQikE+M6uNOpXXFKyRqHPH/42JYF6jeJXXu/nk5+8kmRxYtFevQQ2W8/kc8fHa4pK3KfLYeKVLIAhbpyQHqI4Axg837w/vvvS/fu3eWJJ56Q/fffv8EALl++XO69996y3WbFihWRabvzzjvl6KOPjmIWLVokNTU1MmPGDBk4cKC89tpr0qdPn2jVUFcP9dJ/3nvvvaPVR11xfPjhh+XQQw+VBQsWSM+ePaOYqVOnRgZ0yZIl0rFjx9hui4RHAxgrf2oBroM7tQoWpKAsccj7h49dWIRiiJXNGWeI1NV9MXB082jiRJHBg7M1mFw4ZKuF2aitKwekhwjeAL755puyww47RK
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"%matplotlib notebook\n",
|
||
|
"shotNum = \"0005\"\n",
|
||
|
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
|
||
|
"\n",
|
||
|
"dataSetDict = {\n",
|
||
|
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
|
||
|
" for i in [0, 1]\n",
|
||
|
"}\n",
|
||
|
"\n",
|
||
|
"dataSet = dataSetDict[\"camera_1\"]\n",
|
||
|
"\n",
|
||
|
"print_scanAxis(dataSet)\n",
|
||
|
"\n",
|
||
|
"scanAxis = get_scanAxis(dataSet)\n",
|
||
|
"\n",
|
||
|
"dataSet = auto_rechunk(dataSet)\n",
|
||
|
"\n",
|
||
|
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
|
||
|
"\n",
|
||
|
"imageAnalyser.center = (305, 870)\n",
|
||
|
"imageAnalyser.span = (400, 400)\n",
|
||
|
"imageAnalyser.fraction = (0.1, 0.1)\n",
|
||
|
"\n",
|
||
|
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
|
||
|
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
|
||
|
"\n",
|
||
|
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
|
||
|
"Ncount_mean = calculate_mean(Ncount)\n",
|
||
|
"Ncount_std = calculate_std(Ncount)\n",
|
||
|
"\n",
|
||
|
"fig = plt.figure()\n",
|
||
|
"ax = fig.gca()\n",
|
||
|
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
|
||
|
"plt.xlabel('comp Z current (A)')\n",
|
||
|
"plt.ylabel('NCount')\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"plt.grid(visible=1)\n",
|
||
|
"plt.show()\n",
|
||
|
"\n",
|
||
|
"# DB.create_global(shotNum, dataSet)\n",
|
||
|
"# DB.add_data(shotNum, dataSet_cropOD, engine='xarray')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"attachments": {},
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"# Evaporative Cooling"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 8,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"img_dir = '//DyLabNAS/Data/'\n",
|
||
|
"SequenceName = \"Evaporative_Cooling\" + \"/\"\n",
|
||
|
"folderPath = img_dir + SequenceName + '2023/06/30'# get_date()\n",
|
||
|
"\n",
|
||
|
"# mongoDB = mongoClient[SequenceName]\n",
|
||
|
"\n",
|
||
|
"# DB = MongoDB(mongoClient, mongoDB, date=get_date())"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"attachments": {},
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"# Check BEC"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 6,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"ename": "OSError",
|
||
|
"evalue": "no files to open",
|
||
|
"output_type": "error",
|
||
|
"traceback": [
|
||
|
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
|
||
|
"\u001b[1;31mOSError\u001b[0m Traceback (most recent call last)",
|
||
|
"\u001b[1;32mf:\\Jianshun\\analyseScript\\20230630_Data_Analysis_2.ipynb Cell 20\u001b[0m in \u001b[0;36m4\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis_2.ipynb#X25sZmlsZQ%3D%3D?line=0'>1</a>\u001b[0m shotNum \u001b[39m=\u001b[39m \u001b[39m\"\u001b[39m\u001b[39m0000\u001b[39m\u001b[39m\"\u001b[39m\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis_2.ipynb#X25sZmlsZQ%3D%3D?line=1'>2</a>\u001b[0m filePath \u001b[39m=\u001b[39m folderPath \u001b[39m+\u001b[39m \u001b[39m\"\u001b[39m\u001b[39m/\u001b[39m\u001b[39m\"\u001b[39m \u001b[39m+\u001b[39m shotNum \u001b[39m+\u001b[39m \u001b[39m\"\u001b[39m\u001b[39m/*.h5\u001b[39m\u001b[39m\"\u001b[39m\n\u001b[1;32m----> <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis_2.ipynb#X25sZmlsZQ%3D%3D?line=3'>4</a>\u001b[0m dataSetDict \u001b[39m=\u001b[39m {\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis_2.ipynb#X25sZmlsZQ%3D%3D?line=4'>5</a>\u001b[0m dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis_2.ipynb#X25sZmlsZQ%3D%3D?line=5'>6</a>\u001b[0m \u001b[39mfor\u001b[39;00m i \u001b[39min\u001b[39;00m [\u001b[39m0\u001b[39m]\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis_2.ipynb#X25sZmlsZQ%3D%3D?line=6'>7</a>\u001b[0m }\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis_2.ipynb#X25sZmlsZQ%3D%3D?line=8'>9</a>\u001b[0m dataSet \u001b[39m=\u001b[39m dataSetDict[\u001b[39m\"\u001b[39m\u001b[39mcamera_0\u001b[39m\u001b[39m\"\u001b[39m]\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis_2.ipynb#X25sZmlsZQ%3D%3D?line=10'>11</a>\u001b[0m print_scanAxis(dataSet)\n",
|
||
|
"\u001b[1;32mf:\\Jianshun\\analyseScript\\20230630_Data_Analysis_2.ipynb Cell 20\u001b[0m in \u001b[0;36m5\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis_2.ipynb#X25sZmlsZQ%3D%3D?line=0'>1</a>\u001b[0m shotNum \u001b[39m=\u001b[39m \u001b[39m\"\u001b[39m\u001b[39m0000\u001b[39m\u001b[39m\"\u001b[39m\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis_2.ipynb#X25sZmlsZQ%3D%3D?line=1'>2</a>\u001b[0m filePath \u001b[39m=\u001b[39m folderPath \u001b[39m+\u001b[39m \u001b[39m\"\u001b[39m\u001b[39m/\u001b[39m\u001b[39m\"\u001b[39m \u001b[39m+\u001b[39m shotNum \u001b[39m+\u001b[39m \u001b[39m\"\u001b[39m\u001b[39m/*.h5\u001b[39m\u001b[39m\"\u001b[39m\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis_2.ipynb#X25sZmlsZQ%3D%3D?line=3'>4</a>\u001b[0m dataSetDict \u001b[39m=\u001b[39m {\n\u001b[1;32m----> <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis_2.ipynb#X25sZmlsZQ%3D%3D?line=4'>5</a>\u001b[0m dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis_2.ipynb#X25sZmlsZQ%3D%3D?line=5'>6</a>\u001b[0m \u001b[39mfor\u001b[39;00m i \u001b[39min\u001b[39;00m [\u001b[39m0\u001b[39m]\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis_2.ipynb#X25sZmlsZQ%3D%3D?line=6'>7</a>\u001b[0m }\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis_2.ipynb#X25sZmlsZQ%3D%3D?line=8'>9</a>\u001b[0m dataSet \u001b[39m=\u001b[39m dataSetDict[\u001b[39m\"\u001b[39m\u001b[39mcamera_0\u001b[39m\u001b[39m\"\u001b[39m]\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis_2.ipynb#X25sZmlsZQ%3D%3D?line=10'>11</a>\u001b[0m print_scanAxis(dataSet)\n",
|
||
|
"File \u001b[1;32mf:\\Jianshun\\analyseScript\\DataContainer\\ReadData.py:150\u001b[0m, in \u001b[0;36mread_hdf5_file\u001b[1;34m(filePath, group, datesetOfGlobal, preprocess, join, parallel, engine, phony_dims, excludeAxis, maxFileNum, **kwargs)\u001b[0m\n\u001b[0;32m 139\u001b[0m kwargs\u001b[39m.\u001b[39mupdate(\n\u001b[0;32m 140\u001b[0m {\n\u001b[0;32m 141\u001b[0m \u001b[39m'\u001b[39m\u001b[39mjoin\u001b[39m\u001b[39m'\u001b[39m: join, \n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 146\u001b[0m }\n\u001b[0;32m 147\u001b[0m )\n\u001b[0;32m 149\u001b[0m \u001b[39mif\u001b[39;00m datesetOfGlobal \u001b[39mis\u001b[39;00m \u001b[39mNone\u001b[39;00m:\n\u001b[1;32m--> 150\u001b[0m datesetOfGlobal \u001b[39m=\u001b[39m xr\u001b[39m.\u001b[39;49mopen_mfdataset(\n\u001b[0;32m 151\u001b[0m fullFilePath, \n\u001b[0;32m 152\u001b[0m group\u001b[39m=\u001b[39;49m\u001b[39m\"\u001b[39;49m\u001b[39mglobals\u001b[39;49m\u001b[39m\"\u001b[39;49m, \n\u001b[0;32m 153\u001b[0m concat_dim\u001b[39m=\u001b[39;49m\u001b[39m\"\u001b[39;49m\u001b[39mfileNum\u001b[39;49m\u001b[39m\"\u001b[39;49m, \n\u001b[0;32m 154\u001b[0m combine\u001b[39m=\u001b[39;49m\u001b[39m\"\u001b[39;49m\u001b[39mnested\u001b[39;49m\u001b[39m\"\u001b[39;49m, \n\u001b[0;32m 155\u001b[0m preprocess\u001b[39m=\u001b[39;49m_read_shot_number_from_hdf5, \n\u001b[0;32m 156\u001b[0m engine\u001b[39m=\u001b[39;49m\u001b[39m\"\u001b[39;49m\u001b[39mh5netcdf\u001b[39;49m\u001b[39m\"\u001b[39;49m, \n\u001b[0;32m 157\u001b[0m phony_dims\u001b[39m=\u001b[39;49m\u001b[39m\"\u001b[39;49m\u001b[39maccess\u001b[39;49m\u001b[39m\"\u001b[39;49m, \n\u001b[0;32m 158\u001b[0m combine_attrs\u001b[39m=\u001b[39;49m_read_globals_attrs,\n\u001b[0;32m 159\u001b[0m parallel\u001b[39m=\u001b[39;49m\u001b[39mTrue\u001b[39;49;00m, )\n\u001b[0;32m 161\u001b[0m datesetOfGlobal\u001b[39m.\u001b[39mattrs[\u001b[39m'\u001b[39m\u001b[39mscanAxis\u001b[39m\u001b[39m'\u001b[39m] \u001b[39m=\u001b[39m np\u001b[39m.\u001b[39msetdiff1d(datesetOfGlobal\u001b[39m.\u001b[39mattrs[\u001b[39m'\u001b[39m\u001b[39mscanAxis\u001b[39m\u001b[39m'\u001b[39m], excludeAxis)\n\u001b[0;32m 163\u001b[0m _assgin_scan_axis \u001b[39m=\u001b[39m partial(_assign_scan_axis_partial, datesetOfGlobal\u001b[39m=\u001b[39mdatesetOfGlobal, fullFilePath\u001b[39m=\u001b[39mfullFilePath)\n",
|
||
|
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\backends\\api.py:947\u001b[0m, in \u001b[0;36mopen_mfdataset\u001b[1;34m(paths, chunks, concat_dim, compat, preprocess, engine, data_vars, coords, combine, parallel, join, attrs_file, combine_attrs, **kwargs)\u001b[0m\n\u001b[0;32m 944\u001b[0m paths \u001b[39m=\u001b[39m [os\u001b[39m.\u001b[39mfspath(p) \u001b[39mif\u001b[39;00m \u001b[39misinstance\u001b[39m(p, os\u001b[39m.\u001b[39mPathLike) \u001b[39melse\u001b[39;00m p \u001b[39mfor\u001b[39;00m p \u001b[39min\u001b[39;00m paths]\n\u001b[0;32m 946\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mnot\u001b[39;00m paths:\n\u001b[1;32m--> 947\u001b[0m \u001b[39mraise\u001b[39;00m \u001b[39mOSError\u001b[39;00m(\u001b[39m\"\u001b[39m\u001b[39mno files to open\u001b[39m\u001b[39m\"\u001b[39m)\n\u001b[0;32m 949\u001b[0m \u001b[39mif\u001b[39;00m combine \u001b[39m==\u001b[39m \u001b[39m\"\u001b[39m\u001b[39mnested\u001b[39m\u001b[39m\"\u001b[39m:\n\u001b[0;32m 950\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39misinstance\u001b[39m(concat_dim, (\u001b[39mstr\u001b[39m, DataArray)) \u001b[39mor\u001b[39;00m concat_dim \u001b[39mis\u001b[39;00m \u001b[39mNone\u001b[39;00m:\n",
|
||
|
"\u001b[1;31mOSError\u001b[0m: no files to open"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"shotNum = \"0000\"\n",
|
||
|
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
|
||
|
"\n",
|
||
|
"dataSetDict = {\n",
|
||
|
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
|
||
|
" for i in [0]\n",
|
||
|
"}\n",
|
||
|
"\n",
|
||
|
"dataSet = dataSetDict[\"camera_0\"]\n",
|
||
|
"\n",
|
||
|
"print_scanAxis(dataSet)\n",
|
||
|
"\n",
|
||
|
"scanAxis = get_scanAxis(dataSet)\n",
|
||
|
"\n",
|
||
|
"dataSet = auto_rechunk(dataSet)\n",
|
||
|
"\n",
|
||
|
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
|
||
|
"\n",
|
||
|
"imageAnalyser.center = (880, 990)\n",
|
||
|
"imageAnalyser.span = (150, 150)\n",
|
||
|
"imageAnalyser.fraction = (0.1, 0.1)\n",
|
||
|
"\n",
|
||
|
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
|
||
|
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
|
||
|
"\n",
|
||
|
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
|
||
|
"Ncount_mean = calculate_mean(Ncount)\n",
|
||
|
"Ncount_std = calculate_std(Ncount)\n",
|
||
|
"\n",
|
||
|
"fig = plt.figure()\n",
|
||
|
"ax = fig.gca()\n",
|
||
|
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='-ob')\n",
|
||
|
"plt.xlabel('comp Z current (A)')\n",
|
||
|
"plt.ylabel('NCount')\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"plt.grid(visible=1)\n",
|
||
|
"plt.show()\n",
|
||
|
"\n",
|
||
|
"# DB.create_global(shotNum, dataSet)\n",
|
||
|
"# DB.add_data(shotNum, dataSet_cropOD, engine='xarray')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 36,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"The detected scaning axes and values are: \n",
|
||
|
"\n",
|
||
|
"{'compZ_current_sg': array([0.195, 0.196, 0.197, 0.198, 0.199, 0.2 , 0.201, 0.202, 0.203,\n",
|
||
|
" 0.204]), 'runs': array([0., 1., 2.])}\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"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,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAIABJREFUeF7snQv8VlO+/z+VpOhGF6WoSWUYf8LI5bg0qGk4RDNF425kOjMTIyY5GuV+OSNORDHUiYoxQk0uGdLBcAgzLoWaXFJqumhqupD6v757e+rXr+fX3s/+7mfdns9+vXqhZ333d633Z+21P9bea+1amzZt2gQeJEACJEACJEACJEACFUOgFg1gxWjNhpIACZAACZAACZBARIAGkB2BBEiABEiABEiABCqMAA1ghQnO5pIACZAACZAACZAADSD7AAmQAAmQAAmQAAlUGAEawAoTnM0lARIgARIgARIgARpA9gESIAESIAESIAESqDACNIAVJjibSwIkQAIkQAIkQAI0gOwDJEACJEACJEACJFBhBGgAK0xwNpcESIAESIAESIAEaADZB0iABEiABEiABEigwgjQAFaY4GwuCZAACZAACZAACdAAsg+QAAmQAAmQAAmQQIURoAGsMMHZXBIgARIgARIgARKgAWQfIAESIAESIAESIIEKI0ADWGGCs7kkQAIkQAIkQAIk4JwBnDlzJm699VbMmjULixYtwuTJk9GrV6/NSj322GMYPXp09PuyZcvw1ltv4cADD9xKyWOPPRYvvvjiV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qIUBMXiA1QNIA2qDNnEoFQr7ekdvv+O3XzU0ETumk9CA2gom9p4StSBx
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"shotNum = \"0001\"\n",
|
||
|
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
|
||
|
"\n",
|
||
|
"dataSetDict = {\n",
|
||
|
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
|
||
|
" for i in [0]\n",
|
||
|
"}\n",
|
||
|
"\n",
|
||
|
"dataSet = dataSetDict[\"camera_0\"]\n",
|
||
|
"\n",
|
||
|
"print_scanAxis(dataSet)\n",
|
||
|
"\n",
|
||
|
"scanAxis = get_scanAxis(dataSet)\n",
|
||
|
"\n",
|
||
|
"dataSet = auto_rechunk(dataSet)\n",
|
||
|
"\n",
|
||
|
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
|
||
|
"\n",
|
||
|
"imageAnalyser.center = (880, 990)\n",
|
||
|
"imageAnalyser.span = (150, 150)\n",
|
||
|
"imageAnalyser.fraction = (0.1, 0.1)\n",
|
||
|
"\n",
|
||
|
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
|
||
|
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
|
||
|
"\n",
|
||
|
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
|
||
|
"Ncount_mean = calculate_mean(Ncount)\n",
|
||
|
"Ncount_std = calculate_std(Ncount)\n",
|
||
|
"\n",
|
||
|
"fig = plt.figure()\n",
|
||
|
"ax = fig.gca()\n",
|
||
|
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='-ob')\n",
|
||
|
"plt.xlabel('comp Z current (A)')\n",
|
||
|
"plt.ylabel('NCount')\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"plt.grid(visible=1)\n",
|
||
|
"plt.show()\n",
|
||
|
"\n",
|
||
|
"# DB.create_global(shotNum, dataSet)\n",
|
||
|
"# DB.add_data(shotNum, dataSet_cropOD, engine='xarray')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"attachments": {},
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## Measure magnification of side-imaging again"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 99,
|
||
|
"metadata": {
|
||
|
"scrolled": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"The detected scaning axes and values are: \n",
|
||
|
"\n",
|
||
|
"{'TOF_free': array([0.005, 0.006, 0.007, 0.008, 0.009, 0.01 , 0.011, 0.012, 0.013,\n",
|
||
|
" 0.014, 0.015, 0.016, 0.017, 0.018, 0.019, 0.02 , 0.021]), '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,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAAIABJREFUeF7tnQtwVdXVx1eMVOSZQIGCBKE8fEBF1BaR0Q8GCcJoedTyajuUdoChD4Tyam1tofIQGRWnAwJ1BhgwoZX6KDSCVASstNMWtHW0olaLmFApj6IoAUzzzT7xhptww703WXuvde/6nxlnSrPP2mf991rrd/c++5yTU1lZWUk4oAAUgAJQAApAgaAK5ADAQfVGZ1AACkABKAAFIgUAYAQCFIACUAAKQAEBBQBgAdHRJRSAAlAACkABABgxAAWgABSAAlBAQAEAWEB0dAkFoAAUgAJQAABGDEABKAAFoAAUEFAAABYQHV1CASgABaAAFACAEQNQAApAASgABQQUAIAFREeXUAAKQAEoAAUAYMQAFIACUAAKQAEBBQBgAdHRJRSAAlAACkABABgxAAWgABSAAlBAQAEAWEB0dAkFoAAUgAJQAABmioH//e9/VFZWRs2bN6ecnBwmqzADBaAAFIAC2aoAAMw0su+99x4VFBQwWYMZKAAFoAAUyHYFAGCmET5x4gTl5eXRwYMHqUWLFkxWdZg5e/YsPfvss1RYWEiNGjXScVEBrsKi3xZ9dqEEv+3ktqaxBoCZCvkHH3xALVu2JAfibARwSUkJDRs2zByArfntipM1n2MAht82flxrinEAGABOqoCmgE16sYwNLPpt0WcA2NaPa00xDgAzFWzMgJmEVGRGU6KGksWizwAwABwqv2r3AwAzKQ8AMwmpyIxFGFn0GQAGgKXKDgDMpDwAzCSkIjMWYWTRZwAYAJ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TML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"shotNum = \"0005\"\n",
|
||
|
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
|
||
|
"\n",
|
||
|
"dataSetDict = {\n",
|
||
|
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
|
||
|
" for i in [0]\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 = (550, 990)\n",
|
||
|
"imageAnalyser.span = (1000, 200)\n",
|
||
|
"imageAnalyser.fraction = (0.1, 0.1)\n",
|
||
|
"\n",
|
||
|
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
|
||
|
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
|
||
|
"\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('TOF (s)')\n",
|
||
|
"plt.ylabel('NCount')\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"plt.grid(visible=1)\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 100,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"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,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAAIABJREFUeF7tnQ2QVmXZx691IZGv3QWB4GVJQtCEQszCZPKFQRZhNJCMr5pR6gWGLAT5KsuC5CNyVJgGAt5mgAF3mSLEdl1BEhc03qaCLKYCM4xgIQnYFhGWr/ad+zw967MPz3I+r3NdZ+//M+OMuve5zrmv67r/v/u6z33Oyauvr68n/OABeAAegAfgAXggVg/kAcCx+hsngwfgAXgAHoAHHA8AwEgEeAAegAfgAXhAw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VVMCogFEBexsrcbRCBdyElwHgONJP7hwAMCpgueyL/8yS+Y4KGBWw74wHgH27LFEHSAqSpKNQAaMCRgUsOQIbnxsVMCpg63YCm5ADwKiA9cgw/5VI5jsqYFTAvjMcFbBvlyXqAClBkhYjVMAyFbB03KXy3YiCzX13E0VUwKiAUQHH+HUYaTECgAFgLEG7YTG+vwPAADAAbBGAz5whKihIJX15+WUaMaIFefxEdnyqxHQmVIGYfMQ9+XBLZQAYAAaALQHwli1E06cTVVd/kPTduxMtX040ZoybVCT/7wAwAAwAJ2Qc4x5wQgIV8DKlxFhqCdrA96GHzJvksnZh5qX+e/Pm5g9hqZjbfh9UKufTmS4Zdzd5QgWMChgVcDOvgK9cIbrpJqKjR3Mne14ekamE33mHmvVytKQQ2wwhm/sOALt5AAAGgJs5gKuqiIYMcR8Ir71GNHiwe7uktgCAsQSNJeiEjF
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"remove_bad_shots(dataSet_cropOD, TOF_free=0.005)\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('TOF (s)')\n",
|
||
|
"plt.ylabel('NCount')\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"plt.grid(visible=1)\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 101,
|
||
|
"metadata": {
|
||
|
"scrolled": false
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"dataSet_cropOD = dataSet_cropOD[1:-1, :, :, :]\n",
|
||
|
"dataSet_cropOD_chunk = dataSet_cropOD.chunk((1, 1, 1000, 200))\n",
|
||
|
"fitAnalyser = FitAnalyser(\"Gaussian-2D\", fitDim=2)\n",
|
||
|
"params = fitAnalyser.guess(dataSet_cropOD_chunk, dask=\"parallelized\")\n",
|
||
|
"fitResult = fitAnalyser.fit(dataSet_cropOD_chunk, params, dask=\"parallelized\").load()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 102,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"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,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAAIABJREFUeF7tnQmYFcXV/l9gQCSyCwQEBRE+I3wfoiYY+RshCAjGAGpAMFFHBYIxArIpiQqRRSRRNEIAFyAgkLgmIIsojBgxRsElJooLiGyKLOLGzvyf0+0dLsPMVM+t293Tdd56Hh91bnX3PW+9Vb97qqury+Xn5+eDhQpQASpABagAFYhUgXIEcKR682JUgApQASpABTwFCGAagQpQASpABahADAoQwDGIzktSASpABagAFSCA6QEqQAWoABWgAjEoQADHIDovSQWoABWgAlSAAKYHqAAVoAJUgArEoAABHIPovCQVoAJUgApQAQKYHqACVIAKUAEqEIMCBHAMovOSVIAKUAEqQAUIYHqAClABKkAFqEAMChDAMYjOS1IBKkAFqAAVIIDpASpABagAFaACMShAAMcgOi9JBagAFaACVIAApgeoABWgAlSACsSgAAEcg+i8JBWgAlSAClABApgeoAJUgApQASoQgwIEcAyi85JUgApQASpABQhgeoAKUAEqQAWoQAwKEMAxiM5LUgEqQAWoABUggOkBKkAFqAAVoAIxKEAAxyA6L0kFqAAVoAJUgACmB6gAFaACVIAKxKAAARyD6LwkFaACVIAKUAECmB6gAlSAClABKhCDAgRwDKLzklSAClABKkAFCGB6gApQASpABahADAoQwDGIzktSASpABagAFSCA6QEqQAWoABWgAjEoQADHIDovSQWoABWgAlSAAKYHqAAVoAJUgArEoAABHIPovCQVoAJUgApQAQKYHqACVIAKUAEqEIMCBHAMovOSVIAKUAEqQAUIYHqAClABKkAFqEAMChDAMYjOS1IBKkAFqAAVIIDpASpABagAFaACMShAAMcgOi9JBagAFaACVIAApgeoABWgAlSACsSgAAEcg+i8JBWgAlSAClABApgeoAJUgApQASoQgwIEcAyi85JUgApQASpABQhgeoAKUAEqQAWoQAwKEMAxiM5LUgEqQAWoABUggOkBKkAFqAAVoAIxKEAAxyA6L0kFqAAVoAJUgACmB6gAFaACVIAKxKAAARy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066+/Drm/e+2113qAlSL/TkG5WbNmGDduHPLy8o55DGnhwoXeY0i1atXyngnesWMHH0MK0jNCruN6xzPJpz1+ApgA1uCBRAL4yy+/xG233YannnoK27Zt8xZayern22+/HZUqVfLGttRGHALp9I04WrZsWTD27d2717uXLIuo0jfikCnuIIVT0EFUyqyOdgBpj1/D4GvqGfSA+z9CEglgk3Gj+pwADk9p7YOP9vgJYPfhE2T0cL0fEMBBXFBMHQLYQjzDoa53PJNy2uMngAlgDR4ggE0jYQmfE8AW4hHAJSpAABNA9ID7HiCALRhCAFuIRwATwPQAPaDcAwSwBUMIYAvxlHc8k3LMftzPfugBkwLue4AANnug2BoEsIV4BDCzH3qAHlDuAQLYgiEEsIV4yjueSTlmwO5nP/SASQH3PUAAmz3ADNhCo0wP1Q4g7fGLb7RroD1+DR4ggDMlBABmwBbiMQPm9CM9QA8o9wABbMEQAthCPOUdz6Qcsx9mwPSA+x4ggE0jYQmfE8AW4hHAzH7oAXpAuQcIYAuGEMAW4inveCblmP24n/3QAyYF3PcAAWz2ABdhWWiU6aHaAaQ9fg0LcEx9gx4ggE0eUf05M+Dwml/74KM9fgLYffgEGT1c7wfMgIO4oJg6BLCFeJyC5v0/eoAeUO4BAtiCIQSwhXjKO55JOdd/+ZviZwbMDFiDBwjgICMBM2ALlTI7VDuAtMevYfA19Qx6wP0fIQSwqReU8D
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"val = fitAnalyser.get_fit_value(fitResult)\n",
|
||
|
"std = fitAnalyser.get_fit_std(fitResult)\n",
|
||
|
"\n",
|
||
|
"fitCurve = fitAnalyser.eval(fitResult, x=np.arange(990), y=np.arange(350), dask=\"parallelized\").load()\n",
|
||
|
"\n",
|
||
|
"# dataKey = 'sigmax'\n",
|
||
|
"dataKey = 'centerx'\n",
|
||
|
"# dataKey = 'sigmay'\n",
|
||
|
"# dataKey = 'centery'\n",
|
||
|
"\n",
|
||
|
"val_mean = val[dataKey].mean(dim='runs')\n",
|
||
|
"std_mean = val[dataKey].std(dim='runs')\n",
|
||
|
"\n",
|
||
|
"fig = plt.figure()\n",
|
||
|
"ax = fig.gca()\n",
|
||
|
"\n",
|
||
|
"val_mean.plot.errorbar(yerr=std_mean, fmt='--ob')\n",
|
||
|
"\n",
|
||
|
"plt.grid()\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 103,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"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,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQm41mP6vk+ntKChpIkTlRLSRPyZqUFZogwlWSr7kl1FZBlLY80yiskSKaRCslO2shuELCNZ0m6rNA0VLf/rfr++4zunc873e7/f/p77va6u6px3e+7ned7797xr0bp169ZBSQgIASEgBISAEIgUgSIRcKR4qzEhIASEgBAQAgYBEbAMQQgIASEgBIRADAiIgGMAXU0KASEgBISAEBABywaEgBAQAkJACMSAgAg4BtDVpBAQAkJACAgBEbBsQAgIASEgBIRADAiIgGMAXU0KASEgBISAEBABywaEgBAQAkJACMSAgAg4BtDVpBAQAkJACAgBEbBsQAgIASEgBIRADAiIgGMAXU0KASEgBISAEBABywaEgBAQAkJACMSAgAg4BtDVpBAQAkJACAgBEbBsQAgIASEgBIRADAiIgGMAXU0KASEgBISAEBABywaEgBAQAkJACMSAgAg4BtDVpBAQAkJACAgBEbBsQAgIASEgBIRADAiIgGMAXU0KASEgBISAEBABywaEgBAQAkJACMSAgAg4BtDVpBAQAkJACAgBEbBsQAgIASEgBIRADAiIgGMAXU0KASEgBISAEBABywaEgBAQAkJACMSAgAg4BtDVpBAQAkJACAgBEbBsQAgIASEgBIRADAiIgGMAXU0KASEgBISAEBABywaEgBAQAkJACMSAgAg4BtDVpBAQAkJACAgBEbBsQAgIASEgBIRADAiIgGMAXU0KASEgBISAEBABywaEgBAQAkJACMSAgAg4BtDVpBAQAkJACAgBEbBsQAgIASEgBIRADAiIgGMAXU0KASEgBISAEBABywaEgBAQAkJACMSAgAg4BtDVpBAQAkJACAgBEbBsQAgIASEgBIRADAiIgGMAXU0KASEgBISAEBABywaEgBAQAkJACMSAgAg4BtDVpBAQAkJACAgBEbBsQAgIASEgBIRADAiIgGMAXU0KASEgBISAEBABywaEgBAQAkJACMSAgAg4BtDVpBAQAkJACAgBEbBsQAgIASEgBIRADAiIgG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LFi2wxRZbmLVh3g9NcmbiZhGSMv8Umlq3bm3WyPln6623LrQaU+6aa67BM888gw8//NBsdvvpp582qO+FF17ApZdeis8++8xsNDvuuONMOR4BySZuirn55psxcuRIsya35ZZbmo+RSy65pDTPgw8+iBtuuMFssOM1pAcddBBuuukmNGzYsDTPo48+issuuwxfffUVtttuO9MOMc0mHku78sorwbq+/fZbswP2hBNOwN///vfS9Xf+fsKECeaeccq02267mXr23HPPCrHKfmCMHj0ad955J+bOnWt016tXL1x33XWlyyDUHWUrn84880yMGDHC/Jib8S666CI8/vjjWLx4sdH3ueeea7Dwmr755htw+SWbaD/bbLONkZN6KOT1MMpIXbBfVeHSqVMnvPLKK2W6etRRRxk8K0vEe8iQIWV+3bhxY6OfbGLf77vvvjJ5qI+333679GennXYaXnzxRfNKGu2sQ4cOGDp0KHbYYYdK2xYBe7Wq5OcTAUeoIxcJ+IEHHjCEUtEgnYXWLwG//vrr6Nu3L/76179ip512MgOyn3TFFVeYRzH4OtWoUaM2IOCPPvoI//d//4fzzz/fEACPhp1++uk4+OCDjazZRJLhgxQk2LZt25o7vn/88Ufsv//+Jgv7vc8+++CWW27BIYccggULFph6WrVqhccee8zkeeutt7DXXnvhqquuMqTLn19++eWmbJY8SaSsg4N5mzZt8N577+HEE0/E1Vdfjf79+5t6xo0bZz4A+BHE42HM/8gjj+DLL780u+rLJ5LTPffcY4jy3nvvNQP/rFmzjLwkH5Znyu64zZb/5JNPcMABB2Dq1KkgcTGdeuqp5v+sj7omJiRoflh0797dk6qyBEwyooyrVq0yGJxyyin417/+hZNPPtlTPbmZKCP1y42NLVu2rBQXyrH99tvjH//4R2lxHq/jB1NliQTMWR/2N5uyJxiy/yeW3333HfiRk038OGrQoEHp//nxRrLlx8aSJUvMhxY/DPmhyfoqSiJga1NIbAERcISqcY2AjznmGIwfP74UQQ50HEg5oGWnoCuKLhg52iSSzR//+EdDZmeddZYhlUIiovJtjhkzxkTl5SNgRk2MgPknu8ubUVTv3r3x/fffm8iekfGf/vQnkJAYnVeUSNZ33HGHiWyz6bbbbjOEzYiMiWRHu3juuedK8zBK3nzzzUux/dvf/gZGVySTbDr88MPNbnl+AFWUsrZGgthvv/02yEJyYvT19ddfm5202cSPjnfeeQevvfZahfUSr6efftpE9Fkd7LzzzkYORvHZxAicD3Xww8JLyhIwlzBoO9nEvpOgstG2l7qyeSpaRqgIl1x79Vo/iZI2QbKsLJGAaVvM5zXx469du3bGxjkbUlESAXtFM/n5RMAR6qhQAv7558o7yY/k3E3TVeXlcd26dX+vq6K8G2/sDRAObiQRRmV333033n333dIzzLkDGr/qOaD069fPREpMJFMmDuCMDjhQVZaWL19uplz//e9/m4GY088k/c6dO5cWYVQ5duzYKjv+n//8x0QZuakyAs6S0FNPPVVKwFOmTDHTx9nIjyRKQqRcjND4UcHIlz/PRjhvvvmm6Sej2q5duxryPvLII7HjjjuaaV8m9mngwIHmTzYx+uT6eXZW4frrrzf5GVkyUpsxY4Z5BpJ5+FFQPvGs6K233moiZA7knFoun6g/Yk9ZWe8ee+xhyJhR/vHHH2+mlCuqd6uttsJ5551XZpqd+E+fPt0QDX/P5YhDDz3UfFRw1sJLqoiAGekz2h4+fLhZAmDiNDw/HKpKd911l5kxKU/AleFCe/3000+NDvmhQ11xliS7hFJRWyTgG2
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"M = 2.3513 ± 0.0036 \n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"def free_fall(x, A, B):\n",
|
||
|
" return A*(x**2) + B\n",
|
||
|
"\n",
|
||
|
"fitModel_freefall = NewFitModel(free_fall)\n",
|
||
|
"fitAnalyser_freefall = FitAnalyser(fitModel_freefall, fitDim=1)\n",
|
||
|
"\n",
|
||
|
"params = fitAnalyser_freefall.fitModel.make_params()\n",
|
||
|
"params.add(name=\"A\", value= 1e6, max = np.inf, min =-np.inf, vary = True)\n",
|
||
|
"params.add(name=\"B\", value= 1000, max = np.inf, min =-np.inf, vary = True)\n",
|
||
|
"\n",
|
||
|
"fitResult_freefall = fitAnalyser_freefall.fit(val_mean, params, x='TOF_free', dask=\"parallelized\")\n",
|
||
|
"\n",
|
||
|
"val = fitAnalyser_freefall.get_fit_value(fitResult_freefall)\n",
|
||
|
"std = fitAnalyser_freefall.get_fit_std(fitResult_freefall)\n",
|
||
|
"\n",
|
||
|
"fit_vals = tuple([val['A'].item(), val['B'].item()])\n",
|
||
|
"\n",
|
||
|
"fig = plt.figure()\n",
|
||
|
"ax = fig.gca()\n",
|
||
|
"val_mean.plot.errorbar(ax=ax, yerr=std_mean, fmt='or')\n",
|
||
|
"tof = np.linspace(5,21,50)*1e-3\n",
|
||
|
"plt.plot(tof, free_fall(tof, *fit_vals), 'b--',label='fit: A=%5.3f, B=%5.3f' % fit_vals)\n",
|
||
|
"plt.grid(visible =1)\n",
|
||
|
"plt.xlabel('TOF (s)')\n",
|
||
|
"plt.ylabel('Cloud Center (pixels)')\n",
|
||
|
"plt.legend()\n",
|
||
|
"plt.show()\n",
|
||
|
"\n",
|
||
|
"#pixel= 3.45e-6\n",
|
||
|
"pixel = 5.86e-6\n",
|
||
|
"g = 9.80998\n",
|
||
|
"M = val['A'].item() * 2 * pixel/g\n",
|
||
|
"dM = std['A'].item() * 2 * pixel/g\n",
|
||
|
"\n",
|
||
|
"print('M = %.4f \\u00B1 %.4f '% tuple([M,dM]))"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"attachments": {},
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## Measure temperature at the end of evaporative cooling 2, truncation 0.7"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 9,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"The detected scaning axes and values are: \n",
|
||
|
"\n",
|
||
|
"{'TOF_free': array([0.002, 0.003, 0.004, 0.005, 0.006, 0.007, 0.008, 0.009, 0.01 ,\n",
|
||
|
" 0.011, 0.012, 0.013, 0.014, 0.015]), 'runs': array([0., 1., 2.])}\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHPCAYAAAAFwj37AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABPQ0lEQVR4nO3dfVxUdd7/8fcoOCBqBgjeYVZusniDRaXurutdIKWsivqr9Uelru5em7fZL1ZTC/KOtpvVdbFdi1VLrV1btbRUELTaTLO8ulZ07bqutDLMUMBwQXDQ8/uDZWJkwAMOzhx5PR8PHsv5nu/5zvd8nGbfnHPmHJthGIYAAABgCc28PQEAAACYR3gDAACwEMIbAACAhRDeAAAALITwBgAAYCGENwAAAAshvAEAAFiIn7cncL24dOmSTp48qdatW8tms3l7OgAAwGIMw9C5c+fUsWNHNWtW+/E1wpuHnDx5UhEREd6eBgAAsLgTJ06oc+fOta4nvHlI69atJVUWvE2bNh4f3+FwKDMzU3FxcfL39/f4+NcL6mQetTKHOplDncyhTuY1xVoVFxcrIiLCmSlqQ3jzkKpTpW3atGm08NayZUu1adOmybyJG4I6mUetzKFO5lAnc6iTeU25Vle6/IovLAAAAFgI4Q0AAMBCCG8AAAAWQngDAACwEMIbAACAhRDeAAAALITwBgAAYCGENwAAAAshvAEAAFgI4Q0AAMBCCG8AAAAWQngDAACwEMIbAACAhRDeAAAALITwBgAAYCF+3p4AAPiqkhKpVSt/SSNVVORQ27benhEAcOQNAADAUghvAAAAFkJ4Aw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p2APAmwhsAXGbTJmnsWCkvz7U9L6+ynQAHwJsIbwBQzcWL0syZkmHUXFfVNmuWOIUKwGsIbwBQzfvvS19/Xft6w5BOnKjsBwDeQHgDgGq++caz/QDA0whvAFBNhw6e7QcAnkZ4A4BqBgyQOneWbDb36202KSKish8AeAPhDQCqad5cWr688vfLA1zV8rJllf0AwBsIbwBwmcRE6Y03pI4dXds7d65sT0z0zrwAQCK8AYBbiYnSkSPfL2/dWqHjxwluALyP8AYAtah+avQnPzE4VQrAJxDeAAAALITwBgAAYCGENwAAAAshvAEA0ISVlFTeBsdmq/wdvo/wBgAAYCGENwAAAAvx8/YEAADWVlIitWrlL2mkioocatvW2zMCrm8ceQMAALAQwhsAAICFEN4AAAAsxOvhLScnR5MmTVJkZKSCgoLUqVMnjRw5Up988olLP5vNVutPZGSkqb5paWk1Xj8/P18TJkxQaGioWrZsqf79+ys7O7tR9xkAAKChvP6FhRdffFEFBQWaOXOmoqKidPr0aT3//PPq16+fdu7cqSFDhkiSPvzwwxrb7t+/X7NmzdLo0aNrrBs7dqwee+wxl7YuXbq4LJeXl2vo0KE6e/asli9frrCwMKWnpys+Pl67du3SwIEDPbinAAAAV8/r4S09PV1hYWEubfHx8erWrZuWLFniDG/9+vWrse2f/vQn2Ww2/eIXv6ixLjw83O021WVkZCg3N1d79+5V//79JUmDBw9WdHS0kpOTtX///obuFgAAQKPw+mnTy4ObJLVq1UpRUVE6ceJErdudO3dOGzdu1MCBA9WtW7cGvfbmzZvVvXt3Z3CTJD8/PyUlJemjjz5SXl5eg8YFAABoLF4/8ubOd999p4MHDzqPurnz+uuvq6SkRJMnT3a7fsOGDcrIyNClS5fUs2dPTZs2TRMnTnTpk5ubqwEDBtTYtnfv3pKkw4cPq1OnTm7HLy8vV3l5uXO5uLhYkuRwOORwOOrewQaoGrM
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"shotNum = \"0007\"\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 = (350, 990)\n",
|
||
|
"imageAnalyser.span = (650, 200)\n",
|
||
|
"imageAnalyser.fraction = (0.1, 0.1)\n",
|
||
|
"\n",
|
||
|
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
|
||
|
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
|
||
|
"\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('TOF (s)')\n",
|
||
|
"plt.ylabel('NCount')\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"plt.grid(visible=1)\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 10,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"dataSet_cropOD_chunk = dataSet_cropOD.chunk((1, 1, 650, 200))\n",
|
||
|
"fitAnalyser = FitAnalyser(\"Gaussian-2D\", fitDim=2)\n",
|
||
|
"params = fitAnalyser.guess(dataSet_cropOD_chunk, dask=\"parallelized\")\n",
|
||
|
"fitResult = fitAnalyser.fit(dataSet_cropOD_chunk, params, dask=\"parallelized\").load()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 18,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"3.769727404282448\n",
|
||
|
"0.07242840439128356\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"data = fitAnalyser.get_fit_value(fitResult)\n",
|
||
|
"\n",
|
||
|
"print(data.amplitude.sel(TOF_free=0.01).mean('runs').item() * 147 / 1e5)\n",
|
||
|
"print(data.amplitude.sel(TOF_free=0.01).std('runs').item() * 147 / 1e5)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 123,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"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,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAAIABJREFUeF7tnQvYllP2/7+FcoiakBjSZMSMU0kGzaBxGOMQJmOcO+mADDIoI9O4RkkjhYohU8ph/EMTP4ehesmEqTSGEKVmDHIaSipF/a/13N56e3uf99n3vda9n73re19X129+3r3X/t6ftfZaz75Pu86aNWvWgAcJkAAJkAAJBEqgTp06dQKVppJVhwVYxY+dSYAESIAEcibAApwzYJonARIgARIggZoIsAAzLkiABEiABEigDARYgMsAnUOSAAmQAAmQAAswY4AESIAESIAEykCABbgM0DkkCZAACZAACbAAMwZIgARIgARIoAwEWIDLAJ1DkgAJkAAJkAALMGOABEiABEiABMpAgAW4DNA5JAmQAAmQAAmwADMGSIAESIAESKAMBFiAywCdQ5IACZAACZAACzBjgARIgARIgATKQIAFuAzQOSQJkAAJkAAJsAAzBkiABEiABEigDARYgMsAnUOSAAmQAAmQAAswY4AESIAESIAEykCABbgM0DkkCZAACZAACbAAMwZIgARIgARIoAwEWIDLAJ1DkgAJkAAJkAALMGOABEiABEiABMpAgAW4DNA5JAmQAAmQAAmwADMGSIAESIAESKAMBFiAywCdQ5IACZAACZAACzBjgARIgARIgATKQIAFuAzQOSQJkAAJkAAJsAAzBkiABEiABEigDARYgMsAnUOSAAmQAAmQAAswY4AESIAESIAEykCABbgM0DkkCZAACZAACbAAMw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TML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"val = fitAnalyser.get_fit_value(fitResult)\n",
|
||
|
"std = fitAnalyser.get_fit_std(fitResult)\n",
|
||
|
"\n",
|
||
|
"fitCurve = fitAnalyser.eval(fitResult, x=np.arange(990), y=np.arange(350), dask=\"parallelized\").load()\n",
|
||
|
"\n",
|
||
|
"dataKey = 'sigmax'\n",
|
||
|
"# dataKey = 'centerx'\n",
|
||
|
"# dataKey = 'sigmay'\n",
|
||
|
"# dataKey = 'centery'\n",
|
||
|
"\n",
|
||
|
"val_mean = val[dataKey].mean(dim='runs')\n",
|
||
|
"std_mean = val[dataKey].std(dim='runs')\n",
|
||
|
"\n",
|
||
|
"fig = plt.figure()\n",
|
||
|
"ax = fig.gca()\n",
|
||
|
"\n",
|
||
|
"val_mean.plot.errorbar(yerr=std_mean, fmt='--ob')\n",
|
||
|
"\n",
|
||
|
"plt.grid()\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 119,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"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,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAAIABJREFUeF7tnQm0VcW1rn9QsQNB7DAvQYKJmogKwrEJNwSuXRIVe6+xB6TxSqKSGMUrXp/PQAzRGOVCCKgg2MSgEDC2NEcxdnR6FVFBsYnGPoAIctDDG3OvHDjdPrvWmnPVroJ/jcGIgVmz/vXVrDl3ra6abdiwYQN4kAAJkAAJkECgBJo1a9YsUGkqWc1YgFX82JgESIAESCBnAizAOQOmexIgARIgARJojAALMOOCBEiABEiABMpAgAW4DNDZJQmQAAmQAAmwADMGSIAESIAESKAMBFiAywCdXZIACZAACZAACzBjgARIgARIgATKQIAFuAzQ2SUJkAAJkAAJsAAzBkiABEiABEigDARYgMsAnV2SAAmQAAmQAAswY4AESIAESIAEykCABbgM0NklCZAACZAACbAAMwZIgARIgARIoAwEWIDLAJ1dkgAJkAAJkAALMGOABEiABEiABMpAgAW4DNDZJQmQAAmQAAmwADMGSIAESIAESKAMBFiAywCdXZIACZAACZAACzBjgARIgARIgATKQIAFuAzQ2SUJkAAJkAAJsAAzBkiABEiABEigDARYgMsAnV2SAAmQAAmQAAswY4AESIAESIAEykCABbgM0NklCZAACZAACbAAMwZIgARIgARIoAwEWIDLAJ1dkgAJkAAJkAALMGOABEiABEiABMpAgAW4DNDZJQmQAAmQAAmwADMGSIAES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|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"val = fitAnalyser.get_fit_value(fitResult)\n",
|
||
|
"std = fitAnalyser.get_fit_std(fitResult)\n",
|
||
|
"\n",
|
||
|
"fitCurve = fitAnalyser.eval(fitResult, x=np.arange(990), y=np.arange(950), dask=\"parallelized\").load()\n",
|
||
|
"\n",
|
||
|
"# dataKey = 'sigmax'\n",
|
||
|
"# dataKey = 'centerx'\n",
|
||
|
"dataKey = 'sigmay'\n",
|
||
|
"# dataKey = 'centery'\n",
|
||
|
"\n",
|
||
|
"val_mean = val[dataKey].mean(dim='runs')\n",
|
||
|
"std_mean = val[dataKey].std(dim='runs')\n",
|
||
|
"\n",
|
||
|
"fig = plt.figure()\n",
|
||
|
"ax = fig.gca()\n",
|
||
|
"\n",
|
||
|
"val_mean.plot.errorbar(yerr=std_mean, fmt='--ob')\n",
|
||
|
"\n",
|
||
|
"plt.grid()\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 125,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"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,iVBORw0KGgoAAAANSUhEUgAAAasAAAFACAYAAAACklMsAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQeYFUXWPTNEFSQoCKsMQQQVVMKgBBH4EdcA6CoqSclJCYqCwIoEFUSCCUEEySIKKAKuqIRBWAGJBpQcBl1JooPkNP93q3njY+aF6q6qfv2mb30fn+xSdavuObfqvKqukJCenp4OTowAI8AIMAKMgEcRSKDEYuVRdrhZjAAjwAgwAgIBFisOBEaAEWAEGAHPI8Bi5XmKuIGMACPACDACLFYcA4wAI8AIMAKeR4DFyvMUcQMZAUaAEWAEWKw4BhgBRoARYAQ8jwCLlecp4gYyAowAI8AIsFhxDDACjAAjwAh4HgEWK89TxA1kBBgBRoARiBuxKlWqFMqUKaPE2F9//YX8+fMr2Yh1YfYh1gxY9TMPzIMuBPweSzt37sTu3bujwhk3YvV///d/WLJkSVSHImX473//i1q1ainZiHVh9iHWDFj1Mw/Mgy4E/B5LsmM7i5WuiHPJjt8D2yWYo1bDPESFyJUMzIMrMEetRIUHFqsQ8KoAGpUtlzKwDy4BHaUa5oF50IWA32OJxYrFSldf0m7H751TO6AODTIPDoHTXMzvPPhCrI4cOYKDBw/i7NmzdCNv1BA6fvw4Lr300qj5vJyBffAGO6o80Ks8OXPmRJEiRXD55ZfHxCm/D5IxAZ1/RGdBwB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Zt5UEP2jz
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"T = 0.526 ± 0.006 uK\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"def expansion(x, A, B):\n",
|
||
|
" return np.sqrt(A*x*x+B)\n",
|
||
|
"\n",
|
||
|
"val_truncated = val_mean[0:]\n",
|
||
|
"std_mean_truncated = std_mean[0:]\n",
|
||
|
"\n",
|
||
|
"fitModel_temperature = NewFitModel(expansion)\n",
|
||
|
"fitAnalyser_temperature = FitAnalyser(fitModel_temperature, fitDim=1)\n",
|
||
|
"\n",
|
||
|
"params = fitAnalyser_temperature.fitModel.make_params()\n",
|
||
|
"params.add(name=\"A\", value= 1e6, max = np.inf, min = 1, vary = True)\n",
|
||
|
"params.add(name=\"B\", value= 1000, max = np.inf, min = 0, vary = True)\n",
|
||
|
"\n",
|
||
|
"fitResult_temperature = fitAnalyser_temperature.fit(val_truncated, params, x='TOF_free', dask=\"parallelized\")\n",
|
||
|
"\n",
|
||
|
"val = fitAnalyser_temperature.get_fit_value(fitResult_temperature)\n",
|
||
|
"std = fitAnalyser_temperature.get_fit_std(fitResult_temperature)\n",
|
||
|
"\n",
|
||
|
"fit_vals = tuple([val['A'].item(), val['B'].item()])\n",
|
||
|
"fit_vals_std = tuple([std['A'].item(), std['B'].item()])\n",
|
||
|
"\n",
|
||
|
"tof = (np.arange(2,16,0.1)*1e-3)\n",
|
||
|
"\n",
|
||
|
"fig = plt.figure()\n",
|
||
|
"ax = fig.gca()\n",
|
||
|
"val_mean.plot.errorbar(ax=ax, yerr=std_mean, fmt='or')\n",
|
||
|
"plt.plot(tof, expansion(tof, *fit_vals), 'b--',\n",
|
||
|
" label='fit: A=%.3f, B=%.3f' % tuple(fit_vals))\n",
|
||
|
"plt.xlabel('TOF (s)')\n",
|
||
|
"plt.ylabel('Cloud Width - Vertical (pixels)')\n",
|
||
|
"#plt.ylabel('Cloud Width - Horizontal (pixels)')\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"plt.grid(visible=1)\n",
|
||
|
"plt.legend()\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"m = 164*1.673e-27\n",
|
||
|
"kb = 1.38e-23\n",
|
||
|
"pixel = 5.86e-6\n",
|
||
|
"M = 2.3513\n",
|
||
|
"\n",
|
||
|
"T = fit_vals[0] * (m/kb) * ((pixel*pixel)/(M*M)) / (1e-6)\n",
|
||
|
"dT = fit_vals_std[0] * (m/kb) * ((pixel*pixel)/(M*M)) / (1e-6)\n",
|
||
|
"\n",
|
||
|
"print('T = %.3f \\u00B1 %.3f uK'% tuple([T,dT]))"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"attachments": {},
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## Measure temperature at the end of evaporative cooling 2, truncation 0.65"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 19,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"The detected scaning axes and values are: \n",
|
||
|
"\n",
|
||
|
"{'TOF_free': array([0.002, 0.003, 0.004, 0.005, 0.006, 0.007, 0.008, 0.009, 0.01 ,\n",
|
||
|
" 0.011, 0.012, 0.013, 0.014, 0.015]), 'runs': array([0., 1., 2.])}\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHQCAYAAAD3Qo21AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZ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gIUQ3gAAACyE8AYAAGAhhDcAAAALIbwBAABYCLcKARohboEBANbFyhsAAFdBUJB0/rxD7777noKCvD0bWJnXw9sXX3yhwYMHq3379goICFBISIji4uK0du1at74HDhzQnXfeqeDgYLVq1UojR47UkSNHqhx3+fLlio6Olt1u1w033KCUlBQ5HA63fnl5eZowYYLCwsIUGBiouLg4ZWVleXw/AQAAPMHr4e3MmTOKiorSokWLtGXLFv35z39Whw4ddP/992vBggXOfocPH1a/fv10/vx5vf322/rTn/6k//3f/1WfPn108uRJlzEXLlyoadOmaeTIkdq+fbsefvhhLVq0SFOmTHHpV1paqoEDByorK0vLli3Te++9p4iICCUmJuqjjz66KvsPAABQG14/561fv37q16+fS9uQIUN09OhRrVy5UnPnzpUkPfXUU7Lb7frggw/UsmVLSVJsbKx+8YtfaPHixXruueckSfn5+VqwYIEeeOABLVq0yPkaDodDc+fO1fTp09W5c2dJUnp6unJycrR7927FxcVJkvr376+YmBglJSVp7969V6MEAAAApnl95a06YWFh8vMrz5ZlZWX64IMPNGrUKGdwk6T
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"shotNum = \"0008\"\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 = (350, 990)\n",
|
||
|
"imageAnalyser.span = (650, 200)\n",
|
||
|
"imageAnalyser.fraction = (0.1, 0.1)\n",
|
||
|
"\n",
|
||
|
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
|
||
|
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
|
||
|
"\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('TOF (s)')\n",
|
||
|
"plt.ylabel('NCount')\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"plt.grid(visible=1)\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 20,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"dataSet_cropOD_chunk = dataSet_cropOD.chunk((1, 1, 650, 200))\n",
|
||
|
"fitAnalyser = FitAnalyser(\"Gaussian-2D\", fitDim=2)\n",
|
||
|
"params = fitAnalyser.guess(dataSet_cropOD_chunk, dask=\"parallelized\")\n",
|
||
|
"fitResult = fitAnalyser.fit(dataSet_cropOD_chunk, params, dask=\"parallelized\").load()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 21,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"4.158908069274802\n",
|
||
|
"0.17858152215917347\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"data = fitAnalyser.get_fit_value(fitResult)\n",
|
||
|
"\n",
|
||
|
"print(data.amplitude.sel(TOF_free=0.01).mean('runs').item() * 147 / 1e5)\n",
|
||
|
"print(data.amplitude.sel(TOF_free=0.01).std('runs').item() * 147 / 1e5)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 109,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"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,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAAIABJREFUeF7tnQu4lUXZ/m8QUBOVL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Dmqp8qcunN0trJKSszFfGUzjaVLgXXrijfetCnw8MPACScoQRhV18yVRhKcwtCAnTDFUUiTVCkN8Pq0U9VO3WHHTaq8U1sBX3ghMHZs8bSi0iUvWfXpA4weHbbPy7WmmStD3gENOCRtZVuapOLkpISfo3qqzKk7R2crq6TE/KCDgOef3/yGO3UCZs9WgjCqrpkrjSQ4haEBO2GKo5AmqVIa4FwBVzffUs2VVHWntAKWjTWOPx746KNNc1RWwH37AjU11c3dUuuauTLkHdCAQ9JWtqVJKk5OSvg5qqfKnLpzdLaySgrMx4wpnmJ0+OHAP/4ByKlG8hhazFd21J03L/u5vUpsZatr5kpfmhqKSwMOSVvZliapUhjg5fCkqp26lQmfsXqqvFNZAT/2GPDII8Dw4cCbbwKDBgGTJgHduxfffm7dOmOHeSyumSs9ytosNA04JG1lW5qk4uSkhJ+jeqrMqTtHZyurxMpc3ni+5RZgxIjim851r7rfA95jDyUA4+qaudJYSqPhaMAhaSvb0iRVrAPcBUmq2qnbpXftyqTKO9YVsHzee/rpwA47AE88Aey11+Z9FStzzVxpl5GVI9GAKzOKpoQmqWIdKC5wU9VO3S69a1cmVd6xGbBsISk7WskjZjlI4Ze/BD772Yb7KVbmmrnSLiMrR6IBV2YUTQlNUsU6UFzgpq
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"val = fitAnalyser.get_fit_value(fitResult)\n",
|
||
|
"std = fitAnalyser.get_fit_std(fitResult)\n",
|
||
|
"\n",
|
||
|
"fitCurve = fitAnalyser.eval(fitResult, x=np.arange(990), y=np.arange(350), dask=\"parallelized\").load()\n",
|
||
|
"\n",
|
||
|
"dataKey = 'sigmax'\n",
|
||
|
"# dataKey = 'centerx'\n",
|
||
|
"# dataKey = 'sigmay'\n",
|
||
|
"# dataKey = 'centery'\n",
|
||
|
"\n",
|
||
|
"val_mean = val[dataKey].mean(dim='runs')\n",
|
||
|
"std_mean = val[dataKey].std(dim='runs')\n",
|
||
|
"\n",
|
||
|
"fig = plt.figure()\n",
|
||
|
"ax = fig.gca()\n",
|
||
|
"\n",
|
||
|
"val_mean.plot.errorbar(yerr=std_mean, fmt='--ob')\n",
|
||
|
"\n",
|
||
|
"plt.grid()\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 112,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"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,iVBORw0KGgoAAAANSU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l0VJTK/PQUywmDdgnbeVYmqRicVLCz9A9VubUnWGylV1iY/7228CwYUBV1QocdlhTfPIJIEeZDxoEXHFFcopROS9NrfSpmwbsk7ZyLE1SxbbAa6KKVTt1KxM+ZfdYece2AxbzbdcOWLYsOTKw+hoxIvneN4RLUyt96qcB+6StHEuTVCxOSvgZusfKnLozTLayS0zM5dSi0aNrm6/seOUVk6NGKUEYddfUSiMJTmFowE6YwmikSaqYFnhd2rFqp26/6yZW3rHtgDt0SI4JrHvJ8YHypqsQLk2t9KmfBuyTtnIsTVKxOCnhZ+geK3PqzjDZyi6xMF+3Ljmn9+WXa39g2QH36ZO8bCOES1MrfeqnAfukrRxLk1SxLPD6EMWqnbqVCZ+ye6y8Y9kBf/RRcoDCtGnAdtsBn3+e3IYW823eHJgzB2jZMuWk5dRcUytzklRvWBqwT9rKsTRJxeKkhJ+he6zMqTvDZCu7hM5cfmbUsSPw1lvA//t/wD77AEOGAI8++jmOPbYJ/vu/wzFfmQpNrVROZaruNOBUuMrbWJNUoS/whsjGqp26/a6XWHmHvgOu3uXOmJGY7F57bZrXUJlraqXPrKUB+6StHEuTVKEuFBcksWqnbpfZtWsTK+9QDViM9/e/B+bNAx56KDlGsO4VKnNNrbTLyNKRaMClGQXTQpNUoS4UF7ixaqdul9m1axMr7xANWF6sIYcpPPkkMHw48Nvf1n+YQqjMNbXSLiNLR6IBl2YUTA
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"val = fitAnalyser.get_fit_value(fitResult)\n",
|
||
|
"std = fitAnalyser.get_fit_std(fitResult)\n",
|
||
|
"\n",
|
||
|
"fitCurve = fitAnalyser.eval(fitResult, x=np.arange(990), y=np.arange(950), dask=\"parallelized\").load()\n",
|
||
|
"\n",
|
||
|
"# dataKey = 'sigmax'\n",
|
||
|
"# dataKey = 'centerx'\n",
|
||
|
"dataKey = 'sigmay'\n",
|
||
|
"# dataKey = 'centery'\n",
|
||
|
"\n",
|
||
|
"val_mean = val[dataKey].mean(dim='runs')\n",
|
||
|
"std_mean = val[dataKey].std(dim='runs')\n",
|
||
|
"\n",
|
||
|
"fig = plt.figure()\n",
|
||
|
"ax = fig.gca()\n",
|
||
|
"\n",
|
||
|
"val_mean.plot.errorbar(yerr=std_mean, fmt='--ob')\n",
|
||
|
"\n",
|
||
|
"plt.grid()\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 114,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"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,iVBORw0KGgoAAAANSUhEUgAAAasAAAFACAYAAAACklMsAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQl4VEXWPUnYRJRNGFGJgoggi0TIqIAIo6g/m8soiqjsm7IoiiIDiKgsoggqIBI2QYdRUBREZUcYlR1G2QRZgguCIkH2Jfm/W03HTtLdr96rqtev8259Xz5CuupW3XNu1emqV68qISsrKwucGAFGgBFgBBgBjyKQQInFyqPscLMYAUaAEWAEBAIsVhwIjAAjwAgwAp5HgMXK8xRxAxkBRoARYARYrDgGGAFGgBFgBDyPAIuV5yniBjICjAAjwAiwWHEMMAKMACPACHgeARYrz1PEDWQEGAFGgBFgseIYYAQYAUaAEfA8AixWnqeIG8gIMAKMACMQN2J1xRVXoGLFikqM/fnnn7jggguUbMS6MPsQawYC9TMPzIMuBPweSzt37sTu3bst4YwbsfrHP/6BxYsXWzoULcN///tf1KtXT8lGrAuzD7FmIFA/88A86ELA77EkO7azWOmKOJfs+D2wXYLZshrmwRIiVzIwD67AbFmJCg8sVmHgVQHUki2XMrAPLgFtUQ3zwDzoQsDvscRixWKlqy9pt+P3zqkdUIcGmQeHwGku5ncefCFWhw8fxoEDB3DmzBk6kdcyhI4dO4aiRYta5vNyBvbBG+yo8kC38hQoUABlypTBhRdeGBOn/D5IxgR0/hKdBwFfiNX333+Pyy+/HIULF5aKuyNHjqBYsWJSeb2aiX3wBjM6eDh58iT27NmDypUrx8QpFquYwJ6nUr/z4BuxstPRdQwwsQ5v9iHWDATq18UDfeGyE8M6vff7IKkTSxVbfueBxSpM9OgaYMh09+7dsXHjRnTr1g2ffPIJZsyYId4V2LBhA+666y7L2M3MzBSzwk6dOmHgwIGW+SnD0qVLcf/996Nq1aoi/8svv4y///3vGDVqFN577z0UKVIEl156KaZMmSJmm4MGDRLtuvjii0X++fPno1ChQmjbtq1oZ4kSJVCqVCl8+OGH4vPff/8dPXr0wK+//oqzZ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UljXp7yxW/h7oc3uvMtDrQ1LOEj2mp5Uq+pK/aRNQvTqLVR7kvPTMihoXbmZFgzDtnCtbtqx4PkQzk9zPrEhY/vnPf4pnMsFEv9Nuuo8//jhqxJAQ0kBMmwFoeW/SpEniX3oeRYN0cKMCPYOiQZ6W6WjGQGJ10003YcSIEcI+LU9RW2nmQ9/+g7v7aBmRdgPS0hiJHokYzbRoQwEJFi3hUX7aMUeJZhI0SNMSIm2moPrJX3qORc/yqG4SMVrWIwGkv5133nliQKclSXq+R/WQKNIM7I8//hDLmCSmtFOSNmTQczVa8rz22mtzzHKCHFCd5B/NGsm/Ro0aRcWQBL906dJiqZN2T1IiwUlOThbLsiSSJFz0nI2WCSk98MADYldlaAqdWYX+PXRmRV8GyH/6UkFtpJlf7m3qPLOSGyQj5YqngT6efSBxGj0aoIUZGqaaNMnpjQoPvpxZWYW9rg0WVvWY/NyPPpD4kkiT0Hkl6eKBxUqNUZVBUq1mfaW97kNGBtChAzBrFvDkk8DQocC5BYlsEFR8YLEKE0u6Bhh9YWrfEvtgHzMTJXTxwGKlxo7KIKlWs77SXvaBlv1uuw3Yvx+YPBm4557wfqv4wGLFYqWvN2m2pGug19wsW+Z0+cBiZQv2PJlVBkm1mvWV9rIPtIu6a1egf3+gUqXIPqv4wGLFYqWvN2m2pGug19wsW+Z0+cBiZQt2Fis1uKRKHzsGPP44ndID1KwpVYR3A4bCFGmDBe0ekzlxnWzpGmDk6DOTi30wg6tdqzp4oE
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"T = 0.649 ± 0.005 uK\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"def expansion(x, A, B):\n",
|
||
|
" return np.sqrt(A*x*x+B)\n",
|
||
|
"\n",
|
||
|
"val_truncated = val_mean[2:]\n",
|
||
|
"std_mean_truncated = std_mean[2:]\n",
|
||
|
"\n",
|
||
|
"fitModel_temperature = NewFitModel(expansion)\n",
|
||
|
"fitAnalyser_temperature = FitAnalyser(fitModel_temperature, fitDim=1)\n",
|
||
|
"\n",
|
||
|
"params = fitAnalyser_temperature.fitModel.make_params()\n",
|
||
|
"params.add(name=\"A\", value= 1e6, max = np.inf, min = 1, vary = True)\n",
|
||
|
"params.add(name=\"B\", value= 1000, max = np.inf, min = 0, vary = True)\n",
|
||
|
"\n",
|
||
|
"fitResult_temperature = fitAnalyser_temperature.fit(val_truncated, params, x='TOF_free', dask=\"parallelized\")\n",
|
||
|
"\n",
|
||
|
"val = fitAnalyser_temperature.get_fit_value(fitResult_temperature)\n",
|
||
|
"std = fitAnalyser_temperature.get_fit_std(fitResult_temperature)\n",
|
||
|
"\n",
|
||
|
"fit_vals = tuple([val['A'].item(), val['B'].item()])\n",
|
||
|
"fit_vals_std = tuple([std['A'].item(), std['B'].item()])\n",
|
||
|
"\n",
|
||
|
"tof = (np.arange(2,16,0.1)*1e-3)\n",
|
||
|
"\n",
|
||
|
"fig = plt.figure()\n",
|
||
|
"ax = fig.gca()\n",
|
||
|
"val_mean.plot.errorbar(ax=ax, yerr=std_mean, fmt='or')\n",
|
||
|
"plt.plot(tof, expansion(tof, *fit_vals), 'b--',\n",
|
||
|
" label='fit: A=%.3f, B=%.3f' % tuple(fit_vals))\n",
|
||
|
"plt.xlabel('TOF (s)')\n",
|
||
|
"#plt.ylabel('Cloud Width - Vertical (pixels)')\n",
|
||
|
"plt.ylabel('Cloud Width - Horizontal (pixels)')\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"plt.grid(visible=1)\n",
|
||
|
"plt.legend()\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"m = 164*1.673e-27\n",
|
||
|
"kb = 1.38e-23\n",
|
||
|
"pixel = 5.86e-6\n",
|
||
|
"M = 2.3513\n",
|
||
|
"\n",
|
||
|
"T = fit_vals[0] * (m/kb) * ((pixel*pixel)/(M*M)) / (1e-6)\n",
|
||
|
"dT = fit_vals_std[0] * (m/kb) * ((pixel*pixel)/(M*M)) / (1e-6)\n",
|
||
|
"\n",
|
||
|
"print('T = %.3f \\u00B1 %.3f uK'% tuple([T,dT]))"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"attachments": {},
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## Measure temperature at the end of evaporative cooling 2, truncation 0.6"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 22,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"The detected scaning axes and values are: \n",
|
||
|
"\n",
|
||
|
"{'TOF_free': array([0.002, 0.003, 0.004, 0.005, 0.006, 0.007, 0.008, 0.009, 0.01 ,\n",
|
||
|
" 0.011, 0.012, 0.013, 0.014, 0.015]), 'runs': array([0., 1., 2.])}\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHQCAYAAAD3Qo21AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABT40lEQVR4nO3de1yUdd7/8fcoOHLQDBDUwKzcZPGAxSayu6ZmEp7WQ3pX/mhTo/ptmlpt5AEL1kPunbWai7WVq+ahg61aVioIWnvnMd3uBVu7f5vWGq2heMBAcdDr9wf3TIwDeoGDM5e8no8Hj5zv9Z3vfL8fxuntdRqbYRiGAAAAYAlNfD0BAAAAmEd4AwAAsBDCGwAAgIUQ3gAAACyE8AYAAGAhhDcAAAALIbwBAABYCOENAADAQgJ8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WChJ6tq1q1t727ZtFRER4dru7NutWzePuTjb9u3b55W1AcDVrKxMatYsUMOGDVVZma9n47+oE7zF54dNnR599FH96U9/kiQ1a9ZML730kh555BHX9vj4eMXHx6tLly6SpI8//lh/+MMflJeXp927dyv0f++EWlJSIrvdrpAa7oYaFhamkpIS1+OSkhKFhYXV2M+5vTYVFRWqqKhwPS4tLZUkORyOGi+MuFzOMRti7KtFVWkC//fPDvlDqfxxTk68p8yhTpfmz+9zf+KvdfLfeTW+v3tm1+o34W3atGlKS0tTcXGx1q9frwkTJqisrEy//e1vJUmPP/64W//+/fvrlltu0ciRI/Xaa6+5bbfZbLW+zoXb6tK3uueee05ZWVke7Tk5OQoODq71eZcrNze3wca2ujNnmkoaLEnKz89X8+bnfDshuc9p06ZNfjGnC/GeMoc61c4f/+75I3+tk79/TjWmv3vl5eWm+vlNeGvfvr3at28vSRo4cKAkaerUqXrggQfUunXrGp8zfPhwhYSEaMeOHa628PBwnTlzRuXl5R4h6tixY0pISHDrW9PeNeeh2Jr2yjlNnTpVTzzxhOtxaWmpYmJilJycrJYtW15quXXmcDiUm5ur/v37KzAw0OvjXw2qH4a444471KqV7+tUfU533XWXX309Fu8pc6jTpfnj3z1/5K918tfPqcb4d895FO9S/Ca8XahHjx565ZVXdODAgVrDmyQZhqEmTX48dc95rltBQYESExNd7YcPH9bRo0ddh12dfQsKCjzGdLZV73shu90uu93u0R4YGNigb7KGHt/KqpfFX+rkOSffzaU2/lIrf0edauePf/f8kb/Wyd8/p/ypVg3N7Dr95oKFC23ZskVNmjTRjTfeWGufd999V+Xl5W63D0lJSVHz5s21dOlSt75Lly6VzWbTsGHDXG3Dhw/X/v373W4JUllZqRUrVigxMVHt2rXz2noAAAC8wed73h5++GG1bNlSPXr0UFRUlI4eParVq1fr7bff1lNPPaXWrVvrm2++0ejRo3XvvfeqY8eOstls+vjjjzV//nx17txZaWlprvHCwsKUkZGhGTNmKCwszHWT3szMTKWlpbnu8SZJ48aNU3Z2tkaNGqW5c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+j9MdAKRHegAbhj+dIAA3FH7+azh/3enP7i4vzx/Mo/TFQSoQ3wOv89RwJoLHwx73e/nr7C3/ij+dR+mOglAhvgNf56zkSQGPgj3u9/XFO1YWEVH0uGUbVn33J386j9MdAKRHeAK/z13MkgKudP+719sc5+Tt/O4/S3wKlRHgDvM5fz5EArnb+uNfbH+dkBf52HuWFgfKjj+TTQBngm5cFrl7OcySKimr+17bNVrXdlzcvLSuTQkMDJQ3V8eMOtWrlu7kA3uKPe739cU6on+oB8vbbfXsPQ5/vefv88881aNAgtW/fXkFBQQoLC1NSUpJ
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"shotNum = \"0009\"\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 = (350, 990)\n",
|
||
|
"imageAnalyser.span = (650, 200)\n",
|
||
|
"imageAnalyser.fraction = (0.1, 0.1)\n",
|
||
|
"\n",
|
||
|
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
|
||
|
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
|
||
|
"\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('TOF (s)')\n",
|
||
|
"plt.ylabel('NCount')\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"plt.grid(visible=1)\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 23,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"dataSet_cropOD_chunk = dataSet_cropOD.chunk((1, 1, 650, 200))\n",
|
||
|
"fitAnalyser = FitAnalyser(\"Gaussian-2D\", fitDim=2)\n",
|
||
|
"params = fitAnalyser.guess(dataSet_cropOD_chunk, dask=\"parallelized\")\n",
|
||
|
"fitResult = fitAnalyser.fit(dataSet_cropOD_chunk, params, dask=\"parallelized\").load()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 24,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"4.809698089774189\n",
|
||
|
"0.160561481247611\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"data = fitAnalyser.get_fit_value(fitResult)\n",
|
||
|
"\n",
|
||
|
"print(data.amplitude.sel(TOF_free=0.01).mean('runs').item() * 147 / 1e5)\n",
|
||
|
"print(data.amplitude.sel(TOF_free=0.01).std('runs').item() * 147 / 1e5)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 134,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"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,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAAIABJREFUeF7tnQeYlsXV/u9FBc0nYDAQjQkisYMGRGzEQiwxiQ1DErsgUvwHRTHEElA+oihiwS8IGlFBscSgEjBWmsFoIs2GDRR717CIKEX4X+d9srC77LvvPM85z7wzcM917ZXIzpy5n9+cOWfnKTMVa9asWQMWEiABEiABEgiUQEVFRUWg0lSyKpiAVfzYmARIgARIIGcCTMA5A6Z5EiABEiABEqiLABMw/YIESIAESIAEykCACbgM0NklCZAACZAACTAB0wdIgARIgARIoAwEmIDLAJ1dkgAJkAAJ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D2GMPQJ7/yotWH38MnH8+MGEC0LUrcM014SRf4amJlT69lgnYJ21lXxqnYnBSws/QPFbm1J1hsJVNQmUu20nKjlbf+lay6t1mm3UX+sEHwB/+8DYuv7wltt1WCcC4uSZWGkup1xwTsE/ayr40ThXqBHdBEqt26nYZXbs6sfIOcQUsnxj9v/8H3H03cNttyQYbdZVQmWtipZ1HlrbEBFyaUTA1NE4V6kRxgRurdup2GV27OrHyDi0BT58OnH46sGRJ8lLVSScVH6NQmWtipZ1HlrbEBFyaUTA1NE4V6kRxgRurdup2GV27OrHyDikBv/wy0KYNcPDByY5WpV6qCpW5JlbaeWRpS0zApRkFU0PjVKFOFBe4sWqnbpfRta
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"val = fitAnalyser.get_fit_value(fitResult)\n",
|
||
|
"std = fitAnalyser.get_fit_std(fitResult)\n",
|
||
|
"\n",
|
||
|
"fitCurve = fitAnalyser.eval(fitResult, x=np.arange(990), y=np.arange(350), dask=\"parallelized\").load()\n",
|
||
|
"\n",
|
||
|
"dataKey = 'sigmax'\n",
|
||
|
"# dataKey = 'centerx'\n",
|
||
|
"# dataKey = 'sigmay'\n",
|
||
|
"# dataKey = 'centery'\n",
|
||
|
"\n",
|
||
|
"val_mean = val[dataKey].mean(dim='runs')\n",
|
||
|
"std_mean = val[dataKey].std(dim='runs')\n",
|
||
|
"\n",
|
||
|
"fig = plt.figure()\n",
|
||
|
"ax = fig.gca()\n",
|
||
|
"\n",
|
||
|
"val_mean.plot.errorbar(yerr=std_mean, fmt='--ob')\n",
|
||
|
"\n",
|
||
|
"plt.grid()\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 132,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"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,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAAIABJREFUeF7tnQuYV1W5xt9BwUwQtCQ1I8Q0DFIQyAtHBc0uXtDMzBsK4gAW6QlFhcRjahCa5gUhAw2UtDyYBGapCGOYWYBoSoioeDmYYV4GCBERzvPt3cAwzH/+a+/v2+u/Frz7eeYpmbW+9e7f+tZ6Z+3bqtqwYcMG8CABEiABEiCBQAlUVVVVBSpNJauKBqzix8okQAIkQAIFE6ABFwyY4UmABEiABEigMQI0YOYFCZAACZAACVSAAA24AtDZJAmQAAmQAA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Ouf0yePBnyI8fSpUsxZcqUXGTF/OvayhWggpVi1U7dfpMmVt5CKVTtQ4d+AYsWtcR3v/sKjjtu+Rbfcw5V98iRIzFr1iy/CZijNV6CzgEtTxVZ6cr936qqqsRs5cGruXPnbjTFGTNmYNKkSbjvvvu4AuYKOE+KmdWJdSUZq+7QVsCvvAL8+99Ap07pq0WyRth998bTK1TmXAGbTQe5AgW3An722WcxZMgQNGvWDPJE9IUXXoiPfexjuOqqq5JL0C1atEguQ7dv354GTAPOlfRWlUKdVMudX6y6QzFgeaf35pvTD2rI5eYHHihHHAiVOQ24fN8VWSI4A7Y4WU1ShTpQXLjEqp26XXrXrkysvEMw4GeeAc47L329aMiQdDcj2Uaw3BEqc81cWe6cLX/PS9CWNAuOpUmqUA
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"val = fitAnalyser.get_fit_value(fitResult)\n",
|
||
|
"std = fitAnalyser.get_fit_std(fitResult)\n",
|
||
|
"\n",
|
||
|
"fitCurve = fitAnalyser.eval(fitResult, x=np.arange(990), y=np.arange(950), dask=\"parallelized\").load()\n",
|
||
|
"\n",
|
||
|
"# dataKey = 'sigmax'\n",
|
||
|
"# dataKey = 'centerx'\n",
|
||
|
"dataKey = 'sigmay'\n",
|
||
|
"# dataKey = 'centery'\n",
|
||
|
"\n",
|
||
|
"val_mean = val[dataKey].mean(dim='runs')\n",
|
||
|
"std_mean = val[dataKey].std(dim='runs')\n",
|
||
|
"\n",
|
||
|
"fig = plt.figure()\n",
|
||
|
"ax = fig.gca()\n",
|
||
|
"\n",
|
||
|
"val_mean.plot.errorbar(yerr=std_mean, fmt='--ob')\n",
|
||
|
"\n",
|
||
|
"plt.grid()\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 136,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"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,iVBORw0KGgoAAAANSUhEUgAAAasAAAFACAYAAAACklMsAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQm8VVP7fu5tlOqWT6lwyxBR0khJk/BHg4/QPE830kQhRSKkQZHSIE1fQimllEbySTQZmhRN+iqFbqNS9/5/7zr3XKfbOWevvdda++xz97t+v/sz3LXetd7nedd67lp7DQnp6enp4MQIMAKMACPACHgUgQRKLFYeZYebxQgwAowAIyAQYLHiQGAEGAFGgBHwPAIsVp6niBvICDACjAAjwGLFMcAIMAKMAC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Pf/8N0EZZWugYNgzIWNzJdEnFB1/OrKzCXNcGC6t6TP7ejz7QIE+zJRI6ryRdPPDMSo1RlUFSrWZ9pb3uA73eQZ9uaRHn5ZcDQhWyGVkAoeIDi1WYWNI1wOgLU/uW2Af7mJkooYsHFis1dlQGSbWa9ZX2sg+HDwN0wQodd3zvPaBatfB+q/jAYsVipa83abaka6DX3Cxb5nT5wGJlC/YLMqsMkmo16yvtRR9OnwboyCNduUob1Bo0oIP6kX1W8YHFisVKX2/SbEnXQK+5WbbM6fKBxcoW7CxWanBJld66FWjSBKAjgd27SxXhZcBQmCJtsChdurTUjetkS9cAI0efmVzsgxlc7VrVwQNtDKGdlXw3oF30/8mv8he981r1lvSSD1OmAI8+CtCpmvffB26+Wc5XFR98MbOig620nblw4cJSgqVjgJGjzl
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"T = 0.858 ± 0.004 uK\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"def expansion(x, A, B):\n",
|
||
|
" return np.sqrt(A*x*x+B)\n",
|
||
|
"\n",
|
||
|
"val_truncated = val_mean[2:]\n",
|
||
|
"std_mean_truncated = std_mean[2:]\n",
|
||
|
"\n",
|
||
|
"fitModel_temperature = NewFitModel(expansion)\n",
|
||
|
"fitAnalyser_temperature = FitAnalyser(fitModel_temperature, fitDim=1)\n",
|
||
|
"\n",
|
||
|
"params = fitAnalyser_temperature.fitModel.make_params()\n",
|
||
|
"params.add(name=\"A\", value= 1e6, max = np.inf, min = 1, vary = True)\n",
|
||
|
"params.add(name=\"B\", value= 1000, max = np.inf, min = 0, vary = True)\n",
|
||
|
"\n",
|
||
|
"fitResult_temperature = fitAnalyser_temperature.fit(val_truncated, params, x='TOF_free', dask=\"parallelized\")\n",
|
||
|
"\n",
|
||
|
"val = fitAnalyser_temperature.get_fit_value(fitResult_temperature)\n",
|
||
|
"std = fitAnalyser_temperature.get_fit_std(fitResult_temperature)\n",
|
||
|
"\n",
|
||
|
"fit_vals = tuple([val['A'].item(), val['B'].item()])\n",
|
||
|
"fit_vals_std = tuple([std['A'].item(), std['B'].item()])\n",
|
||
|
"\n",
|
||
|
"tof = (np.arange(2,16,0.1)*1e-3)\n",
|
||
|
"\n",
|
||
|
"fig = plt.figure()\n",
|
||
|
"ax = fig.gca()\n",
|
||
|
"val_mean.plot.errorbar(ax=ax, yerr=std_mean, fmt='or')\n",
|
||
|
"plt.plot(tof, expansion(tof, *fit_vals), 'b--',\n",
|
||
|
" label='fit: A=%.3f, B=%.3f' % tuple(fit_vals))\n",
|
||
|
"plt.xlabel('TOF (s)')\n",
|
||
|
"plt.ylabel('Cloud Width - Vertical (pixels)')\n",
|
||
|
"# plt.ylabel('Cloud Width - Horizontal (pixels)')\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"plt.grid(visible=1)\n",
|
||
|
"plt.legend()\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"m = 164*1.673e-27\n",
|
||
|
"kb = 1.38e-23\n",
|
||
|
"pixel = 5.86e-6\n",
|
||
|
"M = 2.3513\n",
|
||
|
"\n",
|
||
|
"T = fit_vals[0] * (m/kb) * ((pixel*pixel)/(M*M)) / (1e-6)\n",
|
||
|
"dT = fit_vals_std[0] * (m/kb) * ((pixel*pixel)/(M*M)) / (1e-6)\n",
|
||
|
"\n",
|
||
|
"print('T = %.3f \\u00B1 %.3f uK'% tuple([T,dT]))"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"attachments": {},
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## Measure temperature at the end of evaporative cooling 2, truncation 0.675"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 25,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"The detected scaning axes and values are: \n",
|
||
|
"\n",
|
||
|
"{'TOF_free': array([0.002, 0.003, 0.004, 0.005, 0.006, 0.007, 0.008, 0.009, 0.01 ,\n",
|
||
|
" 0.011, 0.012, 0.013, 0.014, 0.015]), 'runs': array([0., 1., 2.])}\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHPCAYAAAAFwj37AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABKyUlEQVR4nO3de3hU5b328XsgYcgBxCQEAgSxUk0jEDRVSFvKSWJEKeet5cUKNLRv5ahuU46aKCBu0UJptFVTQAFtcYOKCiQkoFYOIrzuEizuvRUVghgIYGhCwiSs9480Y4aZkJUwyayVfD/XlcvMs571zLN+TmZu1mkchmEYAgAAgC20CvQEAAAAYB7hDQAAwEYIbwAAADZCeAMAALARwhsAAICNEN4AAABshPAGAABgI0GBnkBzcfHiRR0/flzt2rWTw+EI9HQAAIDNGIahc+fOqUuXLmrVqvb9a4Q3Pzl+/LhiY2MDPQ0AAGBzR48eVbdu3WpdTnjzk3bt2kmqKnj79u39Pr7L5VJ2draSk5MVHBzs9/GbC+pkHrUyhzqZQ53MoU7mtcRaFRcXKzY21p0pakN485PqQ6Xt27dvtPAWGhqq9u3bt5gXcUNQJ/OolTnUyRzqZA51Mq8l16qu06+4YAEAAMBGCG8AAAA2QngDAACwEcIbAACAjRDeAAAAbITwBgAAYCOENwAAABshvAEAANgI4Q0AAMBGCG8AAAA2QngDAACwkYCHt48//lh33nmnunfvrpCQEEVERCgpKUlr16716nvgwAHddtttCg8PV4cOHTRmzBh9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gDAKCFef996dix2pcbhnT0aFU/WA/hDQCAFubrr/3bD02L8AYAQAsTE+PffmhaQYGeAADA3kpKpPDwYEkjdeaMSx06BHpGqMuAAVK3blUXJ/g6783hqFo+YEDTzw11Y88bAAAtTOvW0ooVVb87HJ7Lqh8vX17VD9ZDeAMAoAUaM0Z67TWpSxfP9m7dqtrHjAnMvFA3DpsCANBCjRkj3XabdNVVVY/feUdKTmaPm9Wx5w0AgBasZlD76U8JbnZAeAMAGykpqTonyeGQZb5iCUDTIrwBAADUwUr/cCK8AQAA2AjhDQAAwEYIbwAAADZCeAMANDtWOj8J8DfCGwAAgI0Q3gAAAOpQWfnd7++95/m4qRHeAAAALmPjRik+/rvHw4dLPXpUtQcC4Q0AAKAWGzdK48ZJBQWe7QUFVe2BCHCENwAAAB8qK6VZsyTD8F5W3TZ7dtMfQiW8AQAA+PD++9KxY7UvNwzp6NGqfk2J8AYAuCI19zr87W+OgJ7IDfjT11/7t5+/EN4AAA126YncI0YEBfREbsCfYmL8289fAh7e8vLyNGXKFMXFxSksLExdu3bVyJEjtX//fo9+Doej1p+4uDhTfZcuXer1/IWFhZo0aZKioqIUGhqqpKQk5ebmNuo2o+XgRqFozqx4IjfgTwMGSN26Vb2H++JwSLGxVf2aUlDTPp235557TkVFRZo1a5bi4+N18uRJPf300+rfv7+2bdumIUOGSJJ2797tte7evXs1e/ZsjR492mvZuHHj9NBDD3m0de/e3eNxeXm5hg4dqrNnz2rFihWKjo5WZmamUlJStH37dg0cONCPWwoAzUddJ3I7HFUnco8cKbVu3eTTA/yidWtpxYqqf4w4HJ6v9+pAt3x507/GAx7eMjMzFR0d7dGWkpKinj17asmSJe7w1r9/f691//SnP8nhcOiXv/yl17JOnTr5XKemrKws5efna9euXUpKSpIkDR48WAkJCUpLS9PevXsbulkA0KzV50TuQYOabFqA340ZI732mjRzpude5m7dqoLbmDFNP6eAHza9NLhJUnh
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"shotNum = \"0010\"\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 = (350, 990)\n",
|
||
|
"imageAnalyser.span = (650, 200)\n",
|
||
|
"imageAnalyser.fraction = (0.1, 0.1)\n",
|
||
|
"\n",
|
||
|
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
|
||
|
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
|
||
|
"\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('TOF (s)')\n",
|
||
|
"plt.ylabel('NCount')\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"plt.grid(visible=1)\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 26,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"dataSet_cropOD_chunk = dataSet_cropOD.chunk((1, 1, 650, 200))\n",
|
||
|
"fitAnalyser = FitAnalyser(\"Gaussian-2D\", fitDim=2)\n",
|
||
|
"params = fitAnalyser.guess(dataSet_cropOD_chunk, dask=\"parallelized\")\n",
|
||
|
"fitResult = fitAnalyser.fit(dataSet_cropOD_chunk, params, dask=\"parallelized\").load()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 27,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"4.027352128668683\n",
|
||
|
"0.03427747912979168\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"data = fitAnalyser.get_fit_value(fitResult)\n",
|
||
|
"\n",
|
||
|
"print(data.amplitude.sel(TOF_free=0.01).mean('runs').item() * 147 / 1e5)\n",
|
||
|
"print(data.amplitude.sel(TOF_free=0.01).std('runs').item() * 147 / 1e5)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 147,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"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,iVBORw0KGgoAAAANSUhEUgAAAkAAAAGwCAYAAABB4NqyAAAAAXNSR0IArs4c6QAAIABJREFUeF7tfQm0FcXV9WZUVJRBcWAQFRQVx0+NQtREEyLGBEREEAwIGkH0DxBUYqKA4vgligmCEI2gMogG+ZQIRjQmwQBR0OCsaESRxCFCVARk+tfp9sF7j/ferbr33L7ddXavxeLCPd1dZ59d5+xbXV1Va+vWrVvBgwgQASJABIgAESACRhCoJQcFkJFo000iQASIABEgAkQgQoACiEQgAkSACBABIkAEzCFAAWQu5HSYCBABIkAEiAARoAAiB4gAESACRIAIEAFzCFAAmQs5HSYCRIAIEAEiQAQogMgBIkAEiAARIAJEwBwCFEDmQk6HiQARIAJEgAgQAQogcoAIEAEiQASIABEwhwAFkLmQ02EiQASIABEgAkSAAogcIAJEgAgQASJABMwhQAFkLuR0mAgQASJABIgAEaAAIgeIABEgAkSACBABcwhQAJkLOR0mAkSACBABIkAEKIDIASJABIgAESACRMAcAhRA5kJOh4kAESACRIAIEAEKIHKACBABIkAEiAARMIcABZC5kNNhIkAEiAARIAJEgAKIHCACRIAIEAEiQATMIUABZC7kdJgIEAEiQASIABGgACIHiAARIAJEgAgQAXMIUACZCzkdJgJEgAgQASJABCiAyAEiQASIABEgAkTAHAIUQOZCToeJABEgAkSACBABCiBygAgQASJABIgAETCHAAWQuZDTYSJABIgAESACRIACiBwgAkSACBABIkAEzCFAAWQu5HSYCBABIkAEiAARoAAiB4gAESACRIAIEAFzCFAAmQs5HSYCRIAIEAEiQAQogMgBIkAEiAARIAJEwBwCFEDmQk6HiQARIAJEgAgQAQogcoAIEAEiQASIABEwhwAFkLmQ02EiQASIABEgAkSAAogcIAJEgAgQASJABMwhQAFkLuR0mAgQASJABIgAEaAAIgeIABEgAkSACBABcwhQAJkLOR0mAkSACBABIkAEKIDIASJABIgAESACRMAcAhRA5kJOh4kAESACRIAIEAEKIHKACBABIkAEiAARMIcABZC5kNNhIkAEiAARIAJEgAKIHCACRIAIEAEiQATMIUABZC7kdJgIEAEiQASIABGgACIHiAARIAJEgAgQAXMIUACZCzkdJgJEgAgQASJABCiAyAEiQASIABEgAkTAHAIUQOZCToeJABEgAkSACBABCiBygAgQASJABIgAETCHAAWQuZDTYSJABIgAESACRIACiBwgAkSACBABIkAEzCFAAeQQ8lq1ajlY0YQIEAEiQASIQDgIbN26NRxnqvAkGAF0+eWXY/bs2fjvf/+Lhg0b4txzz8Wtt96K+vXro1+/fpg2bVr0uex48skncdJJJzkFVwSQJhH+7//+D126dHG6d2hGVn236rfw16rv9Du07JXbn5Birl33cqOXvEUwAui1115Dq1atsOuuu+Ljjz9Gjx49cPrpp+MXv/hFJIAaNWqEsWPH5oWwNhFC6iS+gFr13arfFED2fuiQ62HEXLvu+daKJOyDEUDlwRIB1LNnT7Ro0QJTpkyhAEqCSY73sJocrfpNARRGMXTs3pEZuR5GzCmAfFifAtubb74ZN9xwA7744gs0bdoU8+bNw3HHHRcJIOmUEtB9990XAwYMwJAhQ1C7dm2nVmsTgQkijAThRJ6vjRhzxtyHL1m2JdfD4Lp23Usjp4McAZLHYVOnTsXAgQOjUaClS5eiZcuWaNKkCZ577rno8djQoUOjP1Udo0aNwujRoyt8JfOLeBABIkAEiAARsIBA165dVee+phGzIAWQAP3QQw9h4sSJmD9//g64jx8/Hvfddx8WLVrkFBNt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"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"val = fitAnalyser.get_fit_value(fitResult)\n",
|
||
|
"std = fitAnalyser.get_fit_std(fitResult)\n",
|
||
|
"\n",
|
||
|
"fitCurve = fitAnalyser.eval(fitResult, x=np.arange(990), y=np.arange(350), dask=\"parallelized\").load()\n",
|
||
|
"\n",
|
||
|
"dataKey = 'sigmax'\n",
|
||
|
"# dataKey = 'centerx'\n",
|
||
|
"# dataKey = 'sigmay'\n",
|
||
|
"# dataKey = 'centery'\n",
|
||
|
"\n",
|
||
|
"val_mean = val[dataKey].mean(dim='runs')\n",
|
||
|
"std_mean = val[dataKey].std(dim='runs')\n",
|
||
|
"\n",
|
||
|
"fig = plt.figure()\n",
|
||
|
"ax = fig.gca()\n",
|
||
|
"\n",
|
||
|
"val_mean.plot.errorbar(yerr=std_mean, fmt='--ob')\n",
|
||
|
"\n",
|
||
|
"plt.grid()\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 150,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"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,iVBORw0KGgoAAAANSUhEUgAAAkAAAAGwCAYAAABB4NqyAAAAAXNSR0IArs4c6QAAIABJREFUeF7tfQu8V1P6/tNFCYmi0EUSuRvzH7cyDM2gMKWSUqYUQ+6lchm6oHGbSY0UZswUuqikoR9jlDFEhVyHUrmlMmhILt3r/3n3dupU55zvWt/vu/d37bWe/fn0mTPOu/de7/M8613PWXvttStt2rRpE3gQASJABIgAESACRCAQBCrJQQMUCNtMkwgQASJABIgAEYgQoAGiEIgAESACRIAIEIHgEKABCo5yJkwEiAARIAJEgAjQAFEDRIAIEAEiQASIQHAI0AAFRzkTJgJEgAgQASJABGiAqAEiQASIABEgAkQgOARogIKjnAkTASJABIgAESACNEDUABEgAkSACBABIhAcAjRAwVHOhIkAESACRIAIEAEaIGqACBABIkAEiAARCA4BGqDgKGfCRIAIEAEiQASIAA0QNUAEiAARIAJEgAgEhwANUHCUM2EiQASIABEgAkSABogaIAJEgAgQASJABIJDgAYoOMqZMBEgAkSACBABIkADRA0QASJABIgAESACwSFAAxQc5UyYCBABIkAEiAARoAGiBogAESACRIAIEIHgEKABCo5yJkwEiAARIAJEgAjQAFEDRIAIEAEiQASIQHAI0AAFRzkTJgJEgAgQASJABGiAqAEiQASIABEgAkQgOARogIKjnAkTASJABIgAESACNEDUABEgAkSACBABIhAcAjRAwVH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Python.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"val = fitAnalyser.get_fit_value(fitResult)\n",
|
||
|
"std = fitAnalyser.get_fit_std(fitResult)\n",
|
||
|
"\n",
|
||
|
"fitCurve = fitAnalyser.eval(fitResult, x=np.arange(990), y=np.arange(950), dask=\"parallelized\").load()\n",
|
||
|
"\n",
|
||
|
"# dataKey = 'sigmax'\n",
|
||
|
"# dataKey = 'centerx'\n",
|
||
|
"dataKey = 'sigmay'\n",
|
||
|
"# dataKey = 'centery'\n",
|
||
|
"\n",
|
||
|
"val_mean = val[dataKey].mean(dim='runs')\n",
|
||
|
"std_mean = val[dataKey].std(dim='runs')\n",
|
||
|
"\n",
|
||
|
"fig = plt.figure()\n",
|
||
|
"ax = fig.gca()\n",
|
||
|
"\n",
|
||
|
"val_mean.plot.errorbar(yerr=std_mean, fmt='--ob')\n",
|
||
|
"\n",
|
||
|
"plt.grid()\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 152,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"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,iVBORw0KGgoAAAANSUhEUgAAAkAAAAGwCAYAAABB4NqyAAAAAXNSR0IArs4c6QAAIABJREFUeF7sfQeYVEXa9ZkZgoAgSZSkqOgC5rCugoppDaCiQ5AoiKgEEywqfipBxbgqBpIRVKKKrCKsOaGgAgLqosKvZBVQkggIzPzPey8NPT3d09V1q25XT596Hr+dj66ucOq873u6Yk5hYWEhmIgAESACRIAIEAEikCUI5EiiAMqS0WY3iQARIAJEgAgQAQ8BCiASgQgQASJABIgAEcg6BCiAsm7I2WEiQASIABEgAkSAAogcIAJEgAgQASJABLIOAQqgrBtydpgIEAEiQASIABGgACIHiAARIAJEgAgQgaxDgAIo64acHSYCRIAIEAEiQAQogMgBIkAEiAARIAJEIOsQoADKuiFnh4kAESACRIAIEAEKIHKACBABIkAEiAARyDoEKICybsjZYSJABIgAESACRIACiBwgAkSACBABIkAEsg6BrBBAOTk5WTew7DARIAJEgAgQgWxCINV33Z0RQNdffz2mTp2KjRs3onLlymjbti0efPBBlCtXDt26dcP48eO9vyPpnXfewamnnqo0tiKAUgVGqWAA//nPf9CqVSvV7KU2H3Hwh5Y4EIdYIycnyIloTpAPdvigE+edEUCLFi3CQQcdhEqVKmHt2rVo164dzjnnHNxxxx2eAKpatSqGDRumJSB0gFGtiGS2Q2ZV/F3LRz6QDxRA8a2StkHbsCkEdeK8MwIoGhgRQ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70P5M4cswxxRu1YYO6AcU+BCv3H0UEkJQSbwaod+/eXgXyiztRkuUbCTCyVCNl9OvXz3teJJJKOtovj9bKqbxIkqApIkOWPwSL2CUw+VzuWpIAF+/zSDly95PM0IjIiVxNsGDBAnTv3t1rp9QrQV6E1ueffx63a3J6UERURPAce+yxXpk9evTYk19OEgo2rVq1QqrlSyEl9UeW8wTHRO09+eSTvesdRMB+8803aNy4sSc0/v73vyuRIlYAya3p8miwLKHJcqKkY445Zo+IiVeoiJN46V//+pc3+xYRIDIOUqYsXUmZstQoS21SZ7wLCKPzy1iJwCkpf2x9Mh6yxClLfJHUrFkzT+DdeOONRZpMAaREF6cymQ54TnUuhcZkIw7btgELFgD/+MdeoEzjQAGUgITZJoCS2aLs5xCRIEH6kksuwW233eYFva+//jrZV4t9LrMB11xzjbekJL/WYwVO5HO54kBmA0oSQBLIJdA++uije+qR2RYJfs8///yeSytlVkICZWySpafILEJkj09k34rcHRVJRx55pNdnmTFLpXz5frL+yOyO7KtK1F6ZqZFZKOmDiB6ZKZK9WLL8o3KflAggEZqVKlXy9i/JviiZLZNlqyDPucg+MNk/NXPmzD3YikAWPGV5TcZt33339WZjZMkxXkolf7z6ZPxFcMmer0iSWcpTTz0Vd9xxBwVQytbp1hdMBzy3eqfemmzDYedOoFkz4NtvgS+/BBo39rEyjQMFkAEBpE5jP6ft0y46M0DJ+vDEE094e1DkF7tswv3uu++8mQiZVZEZCtUkv8Jl74osWYkgkQAeLXCiPz/99NO9YhMJoJ9++snbZCszS7LfJJJkCevnn3/2lur2339/b0lQZrhk5iYiciSvvB0ns1jvvPOOJ6IiSWaAZJlL9lJFkiyhyeZfmXFQLV++q9IfESOy2TpRe2WvkmAln0eSPOkgG7VlE3KyFDsDJNh07NjRW2KUDeE6ScSrLKeKIBYREkkifmQWR0TPIYcc4i0rSj5ZPhVcY1N0ftkjJGMZL3+i+mQ8ZOyEm5F02m
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"T = 0.553 ± 0.004 uK\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"def expansion(x, A, B):\n",
|
||
|
" return np.sqrt(A*x*x+B)\n",
|
||
|
"\n",
|
||
|
"val_truncated = val_mean[2:]\n",
|
||
|
"std_mean_truncated = std_mean[2:]\n",
|
||
|
"\n",
|
||
|
"fitModel_temperature = NewFitModel(expansion)\n",
|
||
|
"fitAnalyser_temperature = FitAnalyser(fitModel_temperature, fitDim=1)\n",
|
||
|
"\n",
|
||
|
"params = fitAnalyser_temperature.fitModel.make_params()\n",
|
||
|
"params.add(name=\"A\", value= 1e6, max = np.inf, min = 1, vary = True)\n",
|
||
|
"params.add(name=\"B\", value= 1000, max = np.inf, min = 0, vary = True)\n",
|
||
|
"\n",
|
||
|
"fitResult_temperature = fitAnalyser_temperature.fit(val_truncated, params, x='TOF_free', dask=\"parallelized\")\n",
|
||
|
"\n",
|
||
|
"val = fitAnalyser_temperature.get_fit_value(fitResult_temperature)\n",
|
||
|
"std = fitAnalyser_temperature.get_fit_std(fitResult_temperature)\n",
|
||
|
"\n",
|
||
|
"fit_vals = tuple([val['A'].item(), val['B'].item()])\n",
|
||
|
"fit_vals_std = tuple([std['A'].item(), std['B'].item()])\n",
|
||
|
"\n",
|
||
|
"tof = (np.arange(2,16,0.1)*1e-3)\n",
|
||
|
"\n",
|
||
|
"fig = plt.figure()\n",
|
||
|
"ax = fig.gca()\n",
|
||
|
"val_mean.plot.errorbar(ax=ax, yerr=std_mean, fmt='or')\n",
|
||
|
"plt.plot(tof, expansion(tof, *fit_vals), 'b--',\n",
|
||
|
" label='fit: A=%.3f, B=%.3f' % tuple(fit_vals))\n",
|
||
|
"plt.xlabel('TOF (s)')\n",
|
||
|
"# plt.ylabel('Cloud Width - Vertical (pixels)')\n",
|
||
|
"plt.ylabel('Cloud Width - Horizontal (pixels)')\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"plt.grid(visible=1)\n",
|
||
|
"plt.legend()\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"m = 164*1.673e-27\n",
|
||
|
"kb = 1.38e-23\n",
|
||
|
"pixel = 5.86e-6\n",
|
||
|
"M = 2.3513\n",
|
||
|
"\n",
|
||
|
"T = fit_vals[0] * (m/kb) * ((pixel*pixel)/(M*M)) / (1e-6)\n",
|
||
|
"dT = fit_vals_std[0] * (m/kb) * ((pixel*pixel)/(M*M)) / (1e-6)\n",
|
||
|
"\n",
|
||
|
"print('T = %.3f \\u00B1 %.3f uK'% tuple([T,dT]))"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"attachments": {},
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## Measure temperature at the end of evaporative cooling 2, truncation 0.725"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 28,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"The detected scaning axes and values are: \n",
|
||
|
"\n",
|
||
|
"{'TOF_free': array([0.002, 0.003, 0.004, 0.005, 0.006, 0.007, 0.008, 0.009, 0.01 ,\n",
|
||
|
" 0.011, 0.012, 0.013, 0.014, 0.015]), 'runs': array([0., 1., 2.])}\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHPCAYAAAAFwj37AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABT7klEQVR4nO3df1xUdb7H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pJSdHWrVu1YsUKFRUVafjw4dq5c6fXfbKysvSPf/yj3jGXLFmilJQUJSYmavv27Zo1a5YyMzM1e/Zsj36VlZUaN26c8vPztWLFCm3ZskXdu3dXfHy83nzzTZ8eJwC0JFZfuYE5vLnDngL8PYGsrCx169bNoy0+Pl5XX321MjMzNXbsWI9tx44d04IFC/TSSy8p0cuzq7i4WIsXL1ZycrIyMzMlSaNHj5bL5VJaWprmzp2rgf9/U6I1a9aooKBAe/bsUUxMjCRpzJgxGjJkiFJTU7Vv377mOGQAaBFqVm7mzPG8XUjv3tXBjQBgD7UD9siRBG478PvK24XBTZI6dOiggQMH6vjx43W23XfffYqNjVVCQoLX8XJyclRRUaGkpCSP9qSkJBmGoc2bN7vbNm3apAEDBriDmyQFBARo6tSp2r9/vwovvHkRAMADF5cDl5/fV968+eabb/T+++/XWXVbvXq19u/frw9rv1JcoKCgQJIUFRXl0R4REaHw8HD39pq+I7xckDF48GBJ0uHDh9WrVy+vP6eyslKVlZXux6WlpZIkl8vl9dq6S1UzZnO
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"shotNum = \"0011\"\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 = (350, 990)\n",
|
||
|
"imageAnalyser.span = (650, 200)\n",
|
||
|
"imageAnalyser.fraction = (0.1, 0.1)\n",
|
||
|
"\n",
|
||
|
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
|
||
|
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
|
||
|
"\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('TOF (s)')\n",
|
||
|
"plt.ylabel('NCount')\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"plt.grid(visible=1)\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 29,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"dataSet_cropOD_chunk = dataSet_cropOD.chunk((1, 1, 650, 200))\n",
|
||
|
"fitAnalyser = FitAnalyser(\"Gaussian-2D\", fitDim=2)\n",
|
||
|
"params = fitAnalyser.guess(dataSet_cropOD_chunk, dask=\"parallelized\")\n",
|
||
|
"fitResult = fitAnalyser.fit(dataSet_cropOD_chunk, params, dask=\"parallelized\").load()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 30,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"3.338057111672083\n",
|
||
|
"0.07935760046682089\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"data = fitAnalyser.get_fit_value(fitResult)\n",
|
||
|
"\n",
|
||
|
"print(data.amplitude.sel(TOF_free=0.01).mean('runs').item() * 147 / 1e5)\n",
|
||
|
"print(data.amplitude.sel(TOF_free=0.01).std('runs').item() * 147 / 1e5)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 160,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"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,iVBORw0KGgoAAAANSUhEUgAAAkAAAAGwCAYAAABB4NqyAAAAAXNSR0IArs4c6QAAIABJREFUeF7tfQu8VlP+/tNFuUxKkUtFFMNMrjMTyjDGfyLDlCQlJuRSGL8iMYYursMMxaRcxkyhi5g0BjFyGaJiwrhllEu6GHJJpFLp//nu7dQ5p/ec97ve9/vud++1nv35+Dic7957fZ/nWd/1nLXX3qvO+vXr14MHESACRIAIEAEiQAQCQaCOHDRAgbDNNIkAESACRIAIEIEIARogCoEIEAEiQASIABEIDgEaoOAoZ8JEgAgQASJABIgADRA1QASIABEgAkSACASHAA1QcJQzYSJABIgAESACRIAGiBogAkSACBABIkAEgkOABig4ypkwESACRIAIEAEiQANEDRABIkAEiAARIALBIUADFBzlTJgIEAEiQASIABGgAaIGiAARIAJEgAgQgeAQoAEKjnImTASIABEgAkSACNAAUQNEgAgQASJABIhAcAjQAAVHORMmAkSACBABIkAEaICoASJABIgAESACRCA4BGiAgqOcCRMBIkAEiAARIAI0QNQAESACRIAIEAEiEBwCNEDBUc6EiQARIAJEgAgQARogaoAIEAEiQASIABEIDgEaoOAoZ8JEgAgQASJABIgADRA1QASIABEgAkSACASHAA1QcJQzYSJABIgAESACRIAGiBogAkSACBABIkAEgkOABig4ypkwESACRIAIEAEiQANEDRABIkAEiAARIALBIUADFBzlTJgIEAEiQASIABGgAaIGiAARIAJEgAgQgeAQoAEKjnImTASIABEgAkSACNAAUQNEgAgQASJABIhAcAjQAAVHORMmAkSACBABIkAEaICoASJABIgAESACRCA4BGiAgqOcCRMBIkAEiAARIAI0QNQAESACRIAIEAEiEBwCNEDBUc6EiQARIAJEgAgQARogaoAIEAEiQASIABEIDgEaoOAoZ8JEgAgQASJABIgADRA1QASIABEgAkSACASHAA1QcJQzYSJABIgAESACRIAGiBogAkSACBABIkAEgkOABig4ypkwESACRIAIEAEiQANEDRABIkAEiAARIALBIUADFBzlTJgIEAEiQASIABGgAaIGiAARIAJEgAgQgeAQoAEKjnImTASIABEgAkSACNAAUQNEgAgQASJABIhAcAjQAAVHORMmAkSACBABIkAEaICoASJABIgAESACRCA4BGiAgqOcCRMBIkAEiAARIAI0QNQAESACRIAIEAEiEBwCNE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tbjXvIZ5L8jDVB+jGiAFBhpQ0ItjqHmLboINXfmra0K/sQVw7m84j5qFHDBBYA8/jrtNOCWW4AttigPPjRA5cE9dXe1FkIxnSR14Dg2KNTcQ82bBqi42QDH7pWKcGrdnfMVK4CzzgImTIgfd4kRklfeZU+vch3W41658qjtvpwBUrBiLQQWCPcCoaAp1SHknJynWqCGjaPW3bUu3/hp3x74+uv4Ffcf/9iQkAIvZT3uFdiMkp5GA6SA11oILBDuBUJBU6pDyDk5T7VADRtHreu1vnLlxkdc8q2fxo2Bbbc1JKOIS1mPe0U0pWSn0gApoLUWAguEvkAo6MlECDkn55kQqkEjqfX8Wpc1PpddBjz8MDBrFrDVVgbAG1/Cetwzbp7J5WiAFDBaC4EFIn+BUNCSqRByTs4zJdgiGkut1671jz+Ot6p48sl4xufxxwHZ2T1th/W4l7b8pD00QApWrIXAAsHBUCE7b0JC1Tvz9kbC6kTycS6zPd27A4sXA/vuG6/3adNGfflEA63HvUQbr7wZDZACKGsh5OskiiZlNiTU3EPNW4Qaau
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"val = fitAnalyser.get_fit_value(fitResult)\n",
|
||
|
"std = fitAnalyser.get_fit_std(fitResult)\n",
|
||
|
"\n",
|
||
|
"fitCurve = fitAnalyser.eval(fitResult, x=np.arange(990), y=np.arange(350), dask=\"parallelized\").load()\n",
|
||
|
"\n",
|
||
|
"dataKey = 'sigmax'\n",
|
||
|
"# dataKey = 'centerx'\n",
|
||
|
"# dataKey = 'sigmay'\n",
|
||
|
"# dataKey = 'centery'\n",
|
||
|
"\n",
|
||
|
"val_mean = val[dataKey].mean(dim='runs')\n",
|
||
|
"std_mean = val[dataKey].std(dim='runs')\n",
|
||
|
"\n",
|
||
|
"fig = plt.figure()\n",
|
||
|
"ax = fig.gca()\n",
|
||
|
"\n",
|
||
|
"val_mean.plot.errorbar(yerr=std_mean, fmt='--ob')\n",
|
||
|
"\n",
|
||
|
"plt.grid()\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 162,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"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,iVBORw0KGgoAAAANSUhEUgAAAkAAAAGwCAYAAABB4NqyAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQu4V1P6frso11TuUkLkktu4pVzHSLmVJKVMkUsXM1PE32VGF/cZ10FhBoUuYpqGSJTLiAqRGCJG6IKSXFLp9n/W3nPqnNM55/et3+/b+7f2Wu9+Ho/D+fbe63vfd33rPWuvvVe1devWrQMPIkAEiAARIAJEgAgEgkA1c9AABcI20yQCRIAIEAEiQAQiBGiAKAQiQASIABEgAkQgOARogIKjnAkTASJABIgAESACNEDUABEgAkSACBABIhAcAjRAwVHOhIkAESACRIAIEAEaIGqACBABIkAEiAARCA4BGqDgKGfCRIAIEAEiQASIAA0QNUAEiAARIAJEgAgEhwANUHCUM2EiQASIABEgAkSABogaIAJEgAgQASJABIJDgAYoOMqZMBEgAkSACBABIkADRA0QASJABIgAESACwSFAAxQc5UyYCBABIkAEiAARoAGiBogAESACRIAIEIHgEKABCo5yJkwEiAARIAJEgAjQAFEDRIAIEAEiQASIQHAI0AAFRzkTJgJEgAgQASJABGiAqAEiQASIABEgAkQgOARogIKjnAkTASJABIgAESACNEDUABEgAkSACBABIhAcAjRAwVHOhIkAESACRIAIEAEaIGqACBABIkAEiAARCA4BGqDgKGfCRIAIEAEiQASIAA0QNUAEiAARIAJEgAgEhwANUHCUM2EiQASIABEgAkSABogaIAJEgAgQASJABIJDgAYoOMqZMBEgAkSACBABIkADRA0QASJABIgAESACwSFAAxQc5UyYCBABIkAEiAARoAGiBogAESACRIAIEIHgEKABCo5yJkwEiAARIAJEgAjQAFEDRIAIEAEiQASIQHAI0AAFRzkTJgJEgAgQASJABGiAqAEiQASIABEgAkQgOARogIKjnAkTASJABIgAESACNEDUABEgAkSACBABIhAcAjRAwVHOhIkAESACRIAIEAEaIGqACBABIkAEiAARCA4BGqDgKGfCRIAIEAEiQASIAA0QNUAEiAARIAJEgAgEhwANUHCUM2EiQASIABEgAkSABogaIAJEgAgQASJABIJDgAYoOMqZMBEgAkSACBABIkADRA0QASJABIgAESACwSFAAxQc5UyYCBABIkAEiAARoAGiBogAESACRIAIEIHgEKABCo5yJkwEiAARIAJEgAjQAFEDRIAIEAEiQASIQHAI0AAFRzkTJgJEgAgQASJABGiAqAEiQASIABEgAkQ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O4CIaAlUyHknJxnSrAFNJZar1zrZpbnrruA/v3j/bt+/3vg1lvj7S1cO7THPdfyM+2hARKwoi0EFggOhgLZeRMSqt6ZtzcSFidSFec//wxcdBEwYgSw6abA/fcDv/2t+NKpB2qPe6knILghDZAMJH4IUYCTJISDggQlv2LIuV985somVL4NLpXl/u238Vte5qOGjRoBY8cChxySC8ni/p4GqLj4O3N3bSGwQHAGyBlxp9CQUPXOvFMQl0O3qFsXWLVqFZYt2/h51tq1QNu2gNnT6/HH3VzzUx5K7XHPIarWN4UzQAJWtIUQamGs6i8kAQ2ZDiHnNL2ZFrBF40PVenkDZNb7fP450LhxDN5PP8WPvmrWtACziKHa414RU6n01jRAAla0hRBqgaABCs8EkPPwOA+tvpnZnVGjgG7dzMLmdWjRohp69ACefx544QXgrbeA3XYTDDSOhWiPe46lFzWHBkjAirYQQisQpSEONfdQ86YBogESlNjMhhjz06lTvKbHvNUVD6rxN33MYdb7jB8fb2
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"val = fitAnalyser.get_fit_value(fitResult)\n",
|
||
|
"std = fitAnalyser.get_fit_std(fitResult)\n",
|
||
|
"\n",
|
||
|
"fitCurve = fitAnalyser.eval(fitResult, x=np.arange(990), y=np.arange(950), dask=\"parallelized\").load()\n",
|
||
|
"\n",
|
||
|
"# dataKey = 'sigmax'\n",
|
||
|
"# dataKey = 'centerx'\n",
|
||
|
"dataKey = 'sigmay'\n",
|
||
|
"# dataKey = 'centery'\n",
|
||
|
"\n",
|
||
|
"val_mean = val[dataKey].mean(dim='runs')\n",
|
||
|
"std_mean = val[dataKey].std(dim='runs')\n",
|
||
|
"\n",
|
||
|
"fig = plt.figure()\n",
|
||
|
"ax = fig.gca()\n",
|
||
|
"\n",
|
||
|
"val_mean.plot.errorbar(yerr=std_mean, fmt='--ob')\n",
|
||
|
"\n",
|
||
|
"plt.grid()\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 164,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"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,iVBORw0KGgoAAAANSUhEUgAAAkAAAAGwCAYAAABB4NqyAAAAAXNSR0IArs4c6QAAIABJREFUeF7sXQeUFUXavTNDVjIGHBB0TSC6psUFTKirIopKkuQSDaAoIGYRMWNEJSkmVJIo8iviGlFBAQUE0cXAKiCgIIKASJ75z9fNY97EV6+6qrvevFvn7HGW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ZCbC8iSTQkvIoIaN/bxMY1DygugGG3kq1YcpwynywiLfPnHT3nI3zJ1Il+jMkpUMEmQkEWh8Sm2ZiL2b+KgDzroIG+9iepaoigMTkZzROTJ+gpJEuhkDYwIBEnytS+/yQiMapKgLGtG/vvf/3prdyQ4y2JUER6xxcWq7yqYT07olXfE3i3rU2TtSNOmTb2ssmhXpp9iAkZErExzytogETgyhSRTLDJNItNlskZI1u7I1J6MFknQlNE/aX/8SISMQkkwLW5UUMSelDNlyhQ0atSoUPMSPV/wgeLyy+hPw4YNvbUysSRTRzKCKWuPYinZ8mLPyUeCCFWxD0lylcvll1/ura2RdUc6SUaL/v73v3sLxYv6oJAPEhnJEgFZ0mJ5maqUOrzxxhueOLv66qu9dXwyOvWvf/3L6x8RUbGpbKmrjFrJqFyvXr0S/h7fNnm/9LWsMZLF2UxEgAi4i8CXX+6Hjz+ui6uuWoQKFXZbqagsgRC9kExy9jZ4+UqUICL/lREgOb
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"T = 0.432 ± 0.004 uK\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"def expansion(x, A, B):\n",
|
||
|
" return np.sqrt(A*x*x+B)\n",
|
||
|
"\n",
|
||
|
"val_truncated = val_mean[3:]\n",
|
||
|
"std_mean_truncated = std_mean[3:]\n",
|
||
|
"\n",
|
||
|
"fitModel_temperature = NewFitModel(expansion)\n",
|
||
|
"fitAnalyser_temperature = FitAnalyser(fitModel_temperature, fitDim=1)\n",
|
||
|
"\n",
|
||
|
"params = fitAnalyser_temperature.fitModel.make_params()\n",
|
||
|
"params.add(name=\"A\", value= 1e6, max = np.inf, min = 1, vary = True)\n",
|
||
|
"params.add(name=\"B\", value= 1000, max = np.inf, min = 0, vary = True)\n",
|
||
|
"\n",
|
||
|
"fitResult_temperature = fitAnalyser_temperature.fit(val_truncated, params, x='TOF_free', dask=\"parallelized\")\n",
|
||
|
"\n",
|
||
|
"val = fitAnalyser_temperature.get_fit_value(fitResult_temperature)\n",
|
||
|
"std = fitAnalyser_temperature.get_fit_std(fitResult_temperature)\n",
|
||
|
"\n",
|
||
|
"fit_vals = tuple([val['A'].item(), val['B'].item()])\n",
|
||
|
"fit_vals_std = tuple([std['A'].item(), std['B'].item()])\n",
|
||
|
"\n",
|
||
|
"tof = (np.arange(2,16,0.1)*1e-3)\n",
|
||
|
"\n",
|
||
|
"fig = plt.figure()\n",
|
||
|
"ax = fig.gca()\n",
|
||
|
"val_mean.plot.errorbar(ax=ax, yerr=std_mean, fmt='or')\n",
|
||
|
"plt.plot(tof, expansion(tof, *fit_vals), 'b--',\n",
|
||
|
" label='fit: A=%.3f, B=%.3f' % tuple(fit_vals))\n",
|
||
|
"plt.xlabel('TOF (s)')\n",
|
||
|
"# plt.ylabel('Cloud Width - Vertical (pixels)')\n",
|
||
|
"plt.ylabel('Cloud Width - Horizontal (pixels)')\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"plt.grid(visible=1)\n",
|
||
|
"plt.legend()\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"m = 164*1.673e-27\n",
|
||
|
"kb = 1.38e-23\n",
|
||
|
"pixel = 5.86e-6\n",
|
||
|
"M = 2.3513\n",
|
||
|
"\n",
|
||
|
"T = fit_vals[0] * (m/kb) * ((pixel*pixel)/(M*M)) / (1e-6)\n",
|
||
|
"dT = fit_vals_std[0] * (m/kb) * ((pixel*pixel)/(M*M)) / (1e-6)\n",
|
||
|
"\n",
|
||
|
"print('T = %.3f \\u00B1 %.3f uK'% tuple([T,dT]))"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"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": 78,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"The detected scaning axes and values are: \n",
|
||
|
"\n",
|
||
|
"{'carrier_freq': array([8.325, 8.33 , 8.335, 8.34 , 8.345, 8.35 , 8.355, 8.36 , 8.365,\n",
|
||
|
" 8.37 , 8.375, 8.38 , 8.385, 8.39 , 8.395, 8.4 , 8.405, 8.41 ,\n",
|
||
|
" 8.415, 8.42 , 8.425, 8.43 , 8.435, 8.44 , 8.445])}\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,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAIABJREFUeF7tnQmUVcW1/neDLYqCyGSYIYgmqEGMEZwlCghJBMGAkjyVp2IwiRMY1GiEIBgkCj4VAfMEHgj4whMcAlEUcSJkcEiMAoqiMgVl/EsQDNr/tQ+5bXfT3bf2OV/dvnXPd9ZyJcCu75767V1V360z3KKSkpIS4UECJEACJEACJEACJJAaAkU0gKnJNTtKAiRAAiRAAiRAAhEBGkAWAgmQAAmQAAmQAAm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dSh41apQ89NBDcv3114saybKH6k2YMEEGDx7sNA5oAJ0wxQoKcTDG6qjnRuSIA5yPLH0stj40y2YhHznq+dFcYcZKqL+xm691SQNYxgA+8sgjcuihh0qbNm1kzZo1cuutt8revXujy7t16tSR2bNnRwZO7wMse/To0UPatWsnU6ZMkbFjx0aXh99+++1yMUcddVTU9qabbqqUuWqW1VUDqDuLmzdvlvr164sW0OLFi6V79+5SXFyMGU0pVSFLTOLJEcNRVfKR5dy5RXLxxQdk7eT//M9eufDCkqxxGqAL+JFHHiAbNui9cP+++a1My6KiEmnRQuSdd/bKv++ocdLNBOUjRz23558vku7ds7NcvHivnHmmG0sTGIdg37lxOAWnkPnzi+TCC/fdblW2hrR29Jg793M5//yaYVhVB/K1LrMZwMaNG4te+VQPYj2KSkoq3u5qlfAXX9kl4Iqfpg+KqBmcO3eu9OvXr0oDqK
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"%matplotlib notebook\n",
|
||
|
"shotNum = \"0024\"\n",
|
||
|
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
|
||
|
"\n",
|
||
|
"dataSetDict = {\n",
|
||
|
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i], excludeAxis = ['sweep_start_freq', 'sweep_stop_freq'])\n",
|
||
|
" for i in [0]\n",
|
||
|
"}\n",
|
||
|
"\n",
|
||
|
"dataSet = dataSetDict[\"camera_0\"]\n",
|
||
|
"\n",
|
||
|
"print_scanAxis(dataSet)\n",
|
||
|
"\n",
|
||
|
"scanAxis = get_scanAxis(dataSet)\n",
|
||
|
"\n",
|
||
|
"dataSet = auto_rechunk(dataSet)\n",
|
||
|
"\n",
|
||
|
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
|
||
|
"\n",
|
||
|
"imageAnalyser.center = (135, 990)\n",
|
||
|
"imageAnalyser.span = (250, 250)\n",
|
||
|
"imageAnalyser.fraction = (0.1, 0.1)\n",
|
||
|
"\n",
|
||
|
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
|
||
|
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
|
||
|
"\n",
|
||
|
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
|
||
|
"Ncount_mean = calculate_mean(Ncount)\n",
|
||
|
"Ncount_std = calculate_std(Ncount)\n",
|
||
|
"\n",
|
||
|
"fig = plt.figure()\n",
|
||
|
"ax = fig.gca()\n",
|
||
|
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
|
||
|
"\n",
|
||
|
"plt.ylabel('NCount')\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"#plt.ylim([0, 3500])\n",
|
||
|
"plt.grid(visible=1)\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 81,
|
||
|
"metadata": {
|
||
|
"scrolled": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"[0.002, 0.003, 0.004, 0.005, 0.006, 0.007, 0.008, 0.009, 0.01, 0.011, 0.012, 0.013, 0.014, 0.015]\n",
|
||
|
"14\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"0.008499999999999999"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 81,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"l = list(np.arange(2e-3, 16e-3, 1e-3))\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.6 / 1e3"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"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": 165,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"14.912\n",
|
||
|
"1.171\n",
|
||
|
"299.302\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"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.062\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": 166,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"1.874\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"v = 0.842\n",
|
||
|
"P_arm2 = 2.302 * v - 0.06452\n",
|
||
|
"print(round(P_arm2, 3))"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
}
|
||
|
],
|
||
|
"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
|
||
|
}
|