analyseScript/Example.ipynb

2079 lines
173 KiB
Plaintext
Raw Normal View History

2023-05-07 23:41:31 +02:00
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Import supporting package"
]
},
{
"cell_type": "code",
2023-05-16 15:51:13 +02:00
"execution_count": 1,
2023-05-07 23:41:31 +02:00
"metadata": {},
"outputs": [],
"source": [
"import xarray as xr\n",
"import numpy as np\n",
"\n",
"from uncertainties import ufloat\n",
"from uncertainties import unumpy as unp\n",
"from uncertainties import umath\n",
"\n",
"import matplotlib.pyplot as plt\n",
"\n",
"from DataContainer.ReadData import read_hdf5_file\n",
"from Analyser.ImagingAnalyser import ImageAnalyser\n",
"from Analyser.FitAnalyser import FitAnalyser\n",
"from Analyser.FitAnalyser import NewFitModel\n",
2023-05-07 23:41:31 +02:00
"from ToolFunction.ToolFunction import *\n",
"\n",
"from ToolFunction.HomeMadeXarrayFunction import errorbar, dataarray_plot_errorbar\n",
"xr.plot.dataarray_plot.errorbar = errorbar\n",
"xr.plot.accessor.DataArrayPlotAccessor.errorbar = dataarray_plot_errorbar\n",
"\n",
"imageAnalyser = ImageAnalyser()"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Start a client for parallel computing"
]
},
{
"cell_type": "code",
2023-05-16 15:51:13 +02:00
"execution_count": 2,
2023-05-07 23:41:31 +02:00
"metadata": {},
"outputs": [
2023-05-19 18:52:33 +02:00
{
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\data\\AppData\\Roaming\\Python\\Python39\\site-packages\\distributed\\node.py:182: UserWarning: Port 8787 is already in use.\n",
"Perhaps you already have a cluster running?\n",
"Hosting the HTTP server on port 59281 instead\n",
" warnings.warn(\n"
]
},
2023-05-07 23:41:31 +02:00
{
"data": {
"text/html": [
"<div>\n",
" <div style=\"width: 24px; height: 24px; background-color: #e1e1e1; border: 3px solid #9D9D9D; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <h3 style=\"margin-bottom: 0px;\">Client</h3>\n",
2023-05-19 18:52:33 +02:00
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">Client-778ff951-f4cc-11ed-962c-80e82ce2fa8e</p>\n",
2023-05-07 23:41:31 +02:00
" <table style=\"width: 100%; text-align: left;\">\n",
"\n",
" <tr>\n",
" \n",
" <td style=\"text-align: left;\"><strong>Connection method:</strong> Cluster object</td>\n",
" <td style=\"text-align: left;\"><strong>Cluster type:</strong> distributed.LocalCluster</td>\n",
" \n",
" </tr>\n",
"\n",
" \n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:59281/status\" target=\"_blank\">http://127.0.0.1:59281/status</a>\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" \n",
"\n",
" </table>\n",
"\n",
" \n",
"\n",
" \n",
" <details>\n",
" <summary style=\"margin-bottom: 20px;\"><h3 style=\"display: inline;\">Cluster Info</h3></summary>\n",
" <div class=\"jp-RenderedHTMLCommon jp-RenderedHTML jp-mod-trusted jp-OutputArea-output\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #e1e1e1; border: 3px solid #9D9D9D; border-radius: 5px; position: absolute;\">\n",
" </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <h3 style=\"margin-bottom: 0px; margin-top: 0px;\">LocalCluster</h3>\n",
2023-05-19 18:52:33 +02:00
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">ee5b2908</p>\n",
2023-05-07 23:41:31 +02:00
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Dashboard:</strong> <a href=\"http://127.0.0.1:59281/status\" target=\"_blank\">http://127.0.0.1:59281/status</a>\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Workers:</strong> 6\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads:</strong> 60\n",
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total memory:</strong> 55.88 GiB\n",
" </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <td style=\"text-align: left;\"><strong>Status:</strong> running</td>\n",
" <td style=\"text-align: left;\"><strong>Using processes:</strong> True</td>\n",
"</tr>\n",
"\n",
" \n",
" </table>\n",
"\n",
" <details>\n",
" <summary style=\"margin-bottom: 20px;\">\n",
" <h3 style=\"display: inline;\">Scheduler Info</h3>\n",
" </summary>\n",
"\n",
" <div style=\"\">\n",
" <div>\n",
" <div style=\"width: 24px; height: 24px; background-color: #FFF7E5; border: 3px solid #FF6132; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <h3 style=\"margin-bottom: 0px;\">Scheduler</h3>\n",
2023-05-19 18:52:33 +02:00
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">Scheduler-92ff3858-7467-4cdb-985b-821ffd168aa8</p>\n",
2023-05-07 23:41:31 +02:00
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Comm:</strong> tcp://127.0.0.1:59282\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Workers:</strong> 6\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Dashboard:</strong> <a href=\"http://127.0.0.1:59281/status\" target=\"_blank\">http://127.0.0.1:59281/status</a>\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads:</strong> 60\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Started:</strong> Just now\n",
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total memory:</strong> 55.88 GiB\n",
" </td>\n",
" </tr>\n",
" </table>\n",
" </div>\n",
" </div>\n",
"\n",
" <details style=\"margin-left: 48px;\">\n",
" <summary style=\"margin-bottom: 20px;\">\n",
" <h3 style=\"display: inline;\">Workers</h3>\n",
" </summary>\n",
"\n",
" \n",
" <div style=\"margin-bottom: 20px;\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <details>\n",
" <summary>\n",
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 0</h4>\n",
" </summary>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:59309\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads: </strong> 10\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:59310/status\" target=\"_blank\">http://127.0.0.1:59310/status</a>\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Memory: </strong> 9.31 GiB\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:59285\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-4zzx3ytb\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" </tr>\n",
"\n",
" \n",
"\n",
" \n",
"\n",
" </table>\n",
" </details>\n",
" </div>\n",
" </div>\n",
" \n",
" <div style=\"margin-bottom: 20px;\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <details>\n",
" <summary>\n",
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 1</h4>\n",
" </summary>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:59321\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads: </strong> 10\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:59322/status\" target=\"_blank\">http://127.0.0.1:59322/status</a>\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Memory: </strong> 9.31 GiB\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:59286\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-a1vzuzts\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" </tr>\n",
"\n",
" \n",
"\n",
" \n",
"\n",
" </table>\n",
" </details>\n",
" </div>\n",
" </div>\n",
" \n",
" <div style=\"margin-bottom: 20px;\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <details>\n",
" <summary>\n",
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 2</h4>\n",
" </summary>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:59314\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads: </strong> 10\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:59319/status\" target=\"_blank\">http://127.0.0.1:59319/status</a>\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Memory: </strong> 9.31 GiB\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:59287\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-o4dck2c3\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" </tr>\n",
"\n",
" \n",
"\n",
" \n",
"\n",
" </table>\n",
" </details>\n",
" </div>\n",
" </div>\n",
" \n",
" <div style=\"margin-bottom: 20px;\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <details>\n",
" <summary>\n",
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 3</h4>\n",
" </summary>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:59312\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads: </strong> 10\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:59316/status\" target=\"_blank\">http://127.0.0.1:59316/status</a>\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Memory: </strong> 9.31 GiB\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:59288\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-fc2gkd9y\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" </tr>\n",
"\n",
" \n",
"\n",
" \n",
"\n",
" </table>\n",
" </details>\n",
" </div>\n",
" </div>\n",
" \n",
" <div style=\"margin-bottom: 20px;\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <details>\n",
" <summary>\n",
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 4</h4>\n",
" </summary>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:59313\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads: </strong> 10\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:59315/status\" target=\"_blank\">http://127.0.0.1:59315/status</a>\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Memory: </strong> 9.31 GiB\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:59289\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-1653kst6\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" </tr>\n",
"\n",
" \n",
"\n",
" \n",
"\n",
" </table>\n",
" </details>\n",
" </div>\n",
" </div>\n",
" \n",
" <div style=\"margin-bottom: 20px;\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <details>\n",
" <summary>\n",
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 5</h4>\n",
" </summary>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:59324\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads: </strong> 10\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:59325/status\" target=\"_blank\">http://127.0.0.1:59325/status</a>\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Memory: </strong> 9.31 GiB\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:59290\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-05-19 18:52:33 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-r0ix07tp\n",
2023-05-07 23:41:31 +02:00
" </td>\n",
" </tr>\n",
"\n",
" \n",
"\n",
" \n",
"\n",
" </table>\n",
" </details>\n",
" </div>\n",
" </div>\n",
" \n",
"\n",
" </details>\n",
"</div>\n",
"\n",
" </details>\n",
" </div>\n",
"</div>\n",
" </details>\n",
" \n",
"\n",
" </div>\n",
"</div>"
],
"text/plain": [
2023-05-19 18:52:33 +02:00
"<Client: 'tcp://127.0.0.1:59282' processes=6 threads=60, memory=55.88 GiB>"
2023-05-07 23:41:31 +02:00
]
},
2023-05-16 15:51:13 +02:00
"execution_count": 2,
2023-05-07 23:41:31 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from dask.distributed import Client\n",
"client = Client(n_workers=6, threads_per_worker=10, processes=True, memory_limit='10GB')\n",
"client"
]
},
{
2023-05-08 17:48:53 +02:00
"attachments": {},
2023-05-07 23:41:31 +02:00
"cell_type": "markdown",
"metadata": {},
"source": [
"## Set global path for experiment"
]
},
{
"cell_type": "code",
2023-05-16 15:51:13 +02:00
"execution_count": 3,
2023-05-07 23:41:31 +02:00
"metadata": {},
"outputs": [],
"source": [
"groupList = [\n",
" \"images/MOT_3D_Camera/in_situ_absorption\",\n",
2023-05-08 17:48:53 +02:00
" \"images/ODT_1_Axis_Camera/in_situ_absorption\",\n",
" \"images/ODT_2_Axis_Camera/in_situ_absorption\",\n",
2023-05-07 23:41:31 +02:00
"]\n",
"\n",
"dskey = {\n",
" \"images/MOT_3D_Camera/in_situ_absorption\": \"camera_1\",\n",
2023-05-08 17:48:53 +02:00
" \"images/ODT_1_Axis_Camera/in_situ_absorption\": \"camera_2\",\n",
" \"images/ODT_2_Axis_Camera/in_situ_absorption\": \"camera_3\",\n",
2023-05-07 23:41:31 +02:00
"}\n"
]
},
{
"cell_type": "code",
2023-05-16 15:51:13 +02:00
"execution_count": 4,
2023-05-07 23:41:31 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-05-08 17:48:53 +02:00
"img_dir = '//DyLabNAS/Data/'\n",
"SequenceName = \"Repetition_scan\" + \"/\"\n",
"folderPath = img_dir + SequenceName + '2023/' + get_date()"
2023-05-07 23:41:31 +02:00
]
},
{
2023-05-08 17:48:53 +02:00
"attachments": {},
2023-05-07 23:41:31 +02:00
"cell_type": "markdown",
"metadata": {},
"source": [
"# An example for one experimental run"
]
},
{
2023-05-08 17:48:53 +02:00
"attachments": {},
2023-05-07 23:41:31 +02:00
"cell_type": "markdown",
"metadata": {},
"source": [
"## Load the data"
]
},
{
"cell_type": "code",
2023-05-19 18:52:33 +02:00
"execution_count": null,
2023-05-07 23:41:31 +02:00
"metadata": {},
2023-05-19 18:52:33 +02:00
"outputs": [],
"source": [
"shotNum = \"0065\"\n",
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"filePath = \"//DyLabNAS/Data/Evaporative_Cooling/2023/05/12/0065/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
" for i in [0] # range(len(groupList))\n",
"}\n",
"\n",
"dataSet = dataSetDict[\"camera_1\"]\n",
"dataSet = swap_xy(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"dataSet"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Calculate an plot OD images"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"imageAnalyser.center = (959, 280)\n",
"imageAnalyser.span = (150, 200)\n",
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"dataSet_cropOD.plot.pcolormesh(cmap='jet', vmin=0, col=scanAxis[0], row=scanAxis[1])\n",
"plt.show()"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Do a 2D two-peak gaussian fit to the OD images"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"### Do the fit"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"fitAnalyser = FitAnalyser(\"Gaussian-2D\", fitDim=2)\n",
"\n",
"params = fitAnalyser.guess(dataSet_cropOD, dask=\"parallelized\")\n",
"fitResult = fitAnalyser.fit(dataSet_cropOD, params).load()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"fitCurve = fitAnalyser.eval(fitResult, x=np.arange(150), y=np.arange(200), dask=\"parallelized\").load()\n",
"\n",
"fitCurve.plot.pcolormesh(cmap='jet', vmin=0, col=scanAxis[0], row=scanAxis[1])"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"### Get the result of the fit"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"fitAnalyser.get_fit_value(fitResult)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"fitAnalyser.get_fit_std(fitResult)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"fitAnalyser.get_fit_full_result(fitResult)"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Get the Ncount"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"### Calculate the mean and standard deviation"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"\n",
"Ncount.load()\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"Ncount_mean.plot.errorbar(yerr=Ncount_std)\n",
"plt.show()"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"### Do a 1D fit"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"def gaussian(x, amplitude=1.0, center=0.0, sigma=1.0):\n",
" \"\"\"Return a 1-dimensional Gaussian function.\n",
"\n",
" gaussian(x, amplitude, center, sigma) =\n",
" (amplitude/(s2pi*sigma)) * exp(-(1.0*x-center)**2 / (2*sigma**2))\n",
"\n",
" \"\"\"\n",
" return ((amplitude/(max(1e-10, np.sqrt(2*np.pi)*sigma)))\n",
" * np.exp(-(1.0*x-center)**2 / max(1e-10, (2*sigma**2))))\n",
"\n",
"fitModel = NewFitModel(gaussian)\n",
"\n",
"fitModel.make_params()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"fitAnalyser = FitAnalyser(fitModel, fitDim=1)\n",
"\n",
"params = fitAnalyser.guess(Ncount_mean, x=\"sin_mod_freq\", dask=\"parallelized\")\n",
"fitResult = fitAnalyser.fit(Ncount_mean, params, x=\"sin_mod_freq\").load()\n",
"\n",
"plot_x = np.linspace(Ncount_mean[\"sin_mod_freq\"].min(), Ncount_mean[\"sin_mod_freq\"].max(), 100)\n",
"\n",
"fitCurve = fitAnalyser.eval(fitResult, x=plot_x, dask=\"parallelized\").load()\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr=Ncount_std)\n",
"fitCurve.plot.errorbar(ax=ax, fmt='--g')\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"fitCurve = fitCurve.rename(dict(x='final_amp'))\n",
"plot_dataSe = xr.combine_nested([Ncount_mean, fitCurve], ['plot'])\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"plot_dataSe.sel(plot=[0, 1]).plot.errorbar(ax=ax, hue='plot', x='final_amp', fmt=['ob', '-g'])\n",
"plt.show()\n"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Select data and remove bad shot"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"plot_dataSe.where( (Ncount_mean[scanAxis[0]]<2e-4) & (Ncount_mean[scanAxis[0]]>1e-4) )"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
2023-05-19 18:52:33 +02:00
"img_dir = '//DyLabNAS/Data/'\n",
"SequenceName = \"Evaporative_Cooling\" + \"/\"\n",
"folderPath = img_dir + SequenceName + '2023/05/17'"
]
},
{
"cell_type": "code",
"execution_count": 6,
"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",
"}"
]
},
{
"cell_type": "code",
2023-05-19 18:52:33 +02:00
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
"<defs>\n",
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
"<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"</symbol>\n",
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
"<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"</symbol>\n",
"</defs>\n",
"</svg>\n",
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
" *\n",
" */\n",
"\n",
":root {\n",
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
" --xr-background-color: var(--jp-layout-color0, white);\n",
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
"}\n",
"\n",
"html[theme=dark],\n",
"body[data-theme=dark],\n",
"body.vscode-dark {\n",
" --xr-font-color0: rgba(255, 255, 255, 1);\n",
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
" --xr-border-color: #1F1F1F;\n",
" --xr-disabled-color: #515151;\n",
" --xr-background-color: #111111;\n",
" --xr-background-color-row-even: #111111;\n",
" --xr-background-color-row-odd: #313131;\n",
"}\n",
"\n",
".xr-wrap {\n",
" display: block !important;\n",
" min-width: 300px;\n",
" max-width: 700px;\n",
"}\n",
"\n",
".xr-text-repr-fallback {\n",
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
" display: none;\n",
"}\n",
"\n",
".xr-header {\n",
" padding-top: 6px;\n",
" padding-bottom: 6px;\n",
" margin-bottom: 4px;\n",
" border-bottom: solid 1px var(--xr-border-color);\n",
"}\n",
"\n",
".xr-header > div,\n",
".xr-header > ul {\n",
" display: inline;\n",
" margin-top: 0;\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-obj-type,\n",
".xr-array-name {\n",
" margin-left: 2px;\n",
" margin-right: 10px;\n",
"}\n",
"\n",
".xr-obj-type {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-sections {\n",
" padding-left: 0 !important;\n",
" display: grid;\n",
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-item input + label {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label {\n",
" cursor: pointer;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label:hover {\n",
" color: var(--xr-font-color0);\n",
"}\n",
"\n",
".xr-section-summary {\n",
" grid-column: 1;\n",
" color: var(--xr-font-color2);\n",
" font-weight: 500;\n",
"}\n",
"\n",
".xr-section-summary > span {\n",
" display: inline-block;\n",
" padding-left: 0.5em;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-summary-in + label:before {\n",
" display: inline-block;\n",
" content: 'â–º';\n",
" font-size: 11px;\n",
" width: 15px;\n",
" text-align: center;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label:before {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label:before {\n",
" content: 'â–¼';\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label > span {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-summary,\n",
".xr-section-inline-details {\n",
" padding-top: 4px;\n",
" padding-bottom: 4px;\n",
"}\n",
"\n",
".xr-section-inline-details {\n",
" grid-column: 2 / -1;\n",
"}\n",
"\n",
".xr-section-details {\n",
" display: none;\n",
" grid-column: 1 / -1;\n",
" margin-bottom: 5px;\n",
"}\n",
"\n",
".xr-section-summary-in:checked ~ .xr-section-details {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-array-wrap {\n",
" grid-column: 1 / -1;\n",
" display: grid;\n",
" grid-template-columns: 20px auto;\n",
"}\n",
"\n",
".xr-array-wrap > label {\n",
" grid-column: 1;\n",
" vertical-align: top;\n",
"}\n",
"\n",
".xr-preview {\n",
" color: var(--xr-font-color3);\n",
"}\n",
"\n",
".xr-array-preview,\n",
".xr-array-data {\n",
" padding: 0 5px !important;\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-array-data,\n",
".xr-array-in:checked ~ .xr-array-preview {\n",
" display: none;\n",
"}\n",
"\n",
".xr-array-in:checked ~ .xr-array-data,\n",
".xr-array-preview {\n",
" display: inline-block;\n",
"}\n",
"\n",
".xr-dim-list {\n",
" display: inline-block !important;\n",
" list-style: none;\n",
" padding: 0 !important;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list li {\n",
" display: inline-block;\n",
" padding: 0;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list:before {\n",
" content: '(';\n",
"}\n",
"\n",
".xr-dim-list:after {\n",
" content: ')';\n",
"}\n",
"\n",
".xr-dim-list li:not(:last-child):after {\n",
" content: ',';\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-has-index {\n",
" font-weight: bold;\n",
"}\n",
"\n",
".xr-var-list,\n",
".xr-var-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-var-item > div,\n",
".xr-var-item label,\n",
".xr-var-item > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-even);\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-var-item > .xr-var-name:hover span {\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-var-list > li:nth-child(odd) > div,\n",
".xr-var-list > li:nth-child(odd) > label,\n",
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-odd);\n",
"}\n",
"\n",
".xr-var-name {\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-var-dims {\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-var-dtype {\n",
" grid-column: 3;\n",
" text-align: right;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-preview {\n",
" grid-column: 4;\n",
"}\n",
"\n",
".xr-index-preview {\n",
" grid-column: 2 / 5;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-name,\n",
".xr-var-dims,\n",
".xr-var-dtype,\n",
".xr-preview,\n",
".xr-attrs dt {\n",
" white-space: nowrap;\n",
" overflow: hidden;\n",
" text-overflow: ellipsis;\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-var-name:hover,\n",
".xr-var-dims:hover,\n",
".xr-var-dtype:hover,\n",
".xr-attrs dt:hover {\n",
" overflow: visible;\n",
" width: auto;\n",
" z-index: 1;\n",
"}\n",
"\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-data {\n",
" display: none;\n",
" background-color: var(--xr-background-color) !important;\n",
" padding-bottom: 5px !important;\n",
"}\n",
"\n",
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
".xr-var-data-in:checked ~ .xr-var-data,\n",
".xr-index-data-in:checked ~ .xr-index-data {\n",
" display: block;\n",
"}\n",
"\n",
".xr-var-data > table {\n",
" float: right;\n",
"}\n",
"\n",
".xr-var-name span,\n",
".xr-var-data,\n",
".xr-index-name div,\n",
".xr-index-data,\n",
".xr-attrs {\n",
" padding-left: 25px !important;\n",
"}\n",
"\n",
".xr-attrs,\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-data {\n",
" grid-column: 1 / -1;\n",
"}\n",
"\n",
"dl.xr-attrs {\n",
" padding: 0;\n",
" margin: 0;\n",
" display: grid;\n",
" grid-template-columns: 125px auto;\n",
"}\n",
"\n",
".xr-attrs dt,\n",
".xr-attrs dd {\n",
" padding: 0;\n",
" margin: 0;\n",
" float: left;\n",
" padding-right: 10px;\n",
" width: auto;\n",
"}\n",
"\n",
".xr-attrs dt {\n",
" font-weight: normal;\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-attrs dt:hover span {\n",
" display: inline-block;\n",
" background: var(--xr-background-color);\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-attrs dd {\n",
" grid-column: 2;\n",
" white-space: pre-wrap;\n",
" word-break: break-all;\n",
"}\n",
"\n",
".xr-icon-database,\n",
".xr-icon-file-text2,\n",
".xr-no-icon {\n",
" display: inline-block;\n",
" vertical-align: middle;\n",
" width: 1em;\n",
" height: 1.5em !important;\n",
" stroke-width: 0;\n",
" stroke: currentColor;\n",
" fill: currentColor;\n",
"}\n",
"</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
2023-05-19 18:52:33 +02:00
"Dimensions: (carrier_freq: 30, runs: 2, x: 1200, y: 1920)\n",
"Coordinates:\n",
2023-05-19 18:52:33 +02:00
" * carrier_freq (carrier_freq) float64 4.21 4.212 4.214 ... 4.264 4.266 4.268\n",
" * runs (runs) float64 0.0 1.0\n",
"Dimensions without coordinates: x, y\n",
"Data variables:\n",
2023-05-19 18:52:33 +02:00
" atoms (carrier_freq, runs, x, y) float64 dask.array&lt;chunksize=(3, 2, 1200, 1920), meta=np.ndarray&gt;\n",
" background (carrier_freq, runs, x, y) float64 dask.array&lt;chunksize=(3, 2, 1200, 1920), meta=np.ndarray&gt;\n",
" dark (carrier_freq, runs, x, y) float64 dask.array&lt;chunksize=(3, 2, 1200, 1920), meta=np.ndarray&gt;\n",
" shotNum (carrier_freq, runs) float64 dask.array&lt;chunksize=(30, 2), meta=np.ndarray&gt;\n",
" OD (carrier_freq, runs, x, y) float64 dask.array&lt;chunksize=(3, 2, 1200, 1920), meta=np.ndarray&gt;\n",
"Attributes: (12/120)\n",
" TOF_free: 0.01\n",
" abs_img_freq: 110.858\n",
" absorption_imaging_flag: True\n",
" backup_data: True\n",
" blink_off_time: 0.001\n",
" blink_on_time: 0.001\n",
" ... ...\n",
" z_offset: 0.189\n",
" z_offset_img: 0.189\n",
" carrier_freq: [4.21 4.212 4.214 4.216 4.218 4.22 4...\n",
" runs: [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0...\n",
" scanAxis: [&#x27;carrier_freq&#x27; &#x27;runs&#x27;]\n",
" scanAxisLength: [58. 58.]</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-36eb2a9e-2860-4378-a119-078fa3ec7cb4' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-36eb2a9e-2860-4378-a119-078fa3ec7cb4' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>carrier_freq</span>: 30</li><li><span class='xr-has-index'>runs</span>: 2</li><li><span>x</span>: 1200</li><li><span>y</span>: 1920</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-38fe2b7a-9b1d-4149-bdb2-610b093bbbea' class='xr-section-summary-in' type='checkbox' checked><label for='section-38fe2b7a-9b1d-4149-bdb2-610b093bbbea' class='xr-section-summary' >Coordinates: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>carrier_freq</span></div><div class='xr-var-dims'>(carrier_freq)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>4.21 4.212 4.214 ... 4.266 4.268</div><input id='attrs-8dd0d756-8076-4b89-a044-1e0181b9f68a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-8dd0d756-8076-4b89-a044-1e0181b9f68a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3179e29b-052e-44f1-99a9-7e01a7c1c71a' class='xr-var-data-in' type='checkbox'><label for='data-3179e29b-052e-44f1-99a9-7e01a7c1c71a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([4.21 , 4.212, 4.214, 4.216, 4.218, 4.22 , 4.222, 4.224, 4.226, 4.228,\n",
" 4.23 , 4.232, 4.234, 4.236, 4.238, 4.24 , 4.242, 4.244, 4.246, 4.248,\n",
" 4.25 , 4.252, 4.254, 4.256, 4.258, 4.26 , 4.262, 4.264, 4.266, 4.268])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>runs</span></div><div class='xr-var-dims'>(runs)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0 1.0</div><input id='attrs-be9a5907-d9a8-4443-b9a2-72df64ad8089' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-be9a5907-d9a8-4443-b9a2-72df64ad8089' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-90bb0a37-3672-4a43-856e-8fb94df73855' class='xr-var-data-in' type='checkbox'><label for='data-90bb0a37-3672-4a43-856e-8fb94df73855' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0., 1.])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-8fa00fd9-fc56-49f2-ba42-b7a82a05d8ad' class='xr-section-summary-in' type='checkbox' checked><label for='section-8fa00fd9-fc56-49f2-ba42-b7a82a05d8ad' class='xr-section-summary' >Data variables: <span>(5)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>atoms</span></div><div class='xr-var-dims'>(carrier_freq, runs, x, y)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(3, 2, 1200, 1920), meta=np.ndarray&gt;</div><input id='attrs-d3794105-4f60-4522-b3d2-622595cba537' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-d3794105-4f60-4522-b3d2-622595cba537' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-228d680c-daac-4e93-b845-93ac45682436' class='xr-var-data-in' type='checkbox'><label for='data-228d680c-daac-4e93-b845-93ac45682436' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>IMAGE_SUBCLASS :</span></dt><dd>IMAGE_GRAYSCALE</dd><dt><span>IMAGE_VERSION :</span></dt><dd>1.2</dd><dt><span>IMAGE_WHITE_IS_ZERO :</span></dt><dd>0</dd></dl></div><div class='xr-var-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 1.03 GiB </td>\n",
" <td> 105.47 MiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (30, 2, 1200, 1920) </td>\n",
" <td> (3, 2, 1200, 1920) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 10 chunks in 195 graph layers </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float64 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"378\" height=\"139\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Horizontal lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"27\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"0\" y1=\"25\" x2=\"27\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Vertical lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"25\" style=\"stroke-width:2\" />\n",
" <line x1=\"2\" y1=\"0\" x2=\"2\" y2=\"25\" />\n",
" <line x1=\"5\" y1=\"0\" x2=\"5\" y2=\"25\" />\n",
" <line x1=\"8\" y1=\"0\" x2=\"8\" y2=\"25\" />\n",
" <line x1=\"11\" y1=\"0\" x2=\"11\" y2=\"25\" />\n",
" <line x1=\"13\" y1=\"0\" x2=\"13\" y2=\"25\" />\n",
" <line x1=\"16\" y1=\"0\" x2=\"16\" y2=\"25\" />\n",
" <line x1=\"19\" y1=\"0\" x2=\"19\" y2=\"25\" />\n",
" <line x1=\"22\" y1=\"0\" x2=\"22\" y2=\"25\" />\n",
" <line x1=\"24\" y1=\"0\" x2=\"24\" y2=\"25\" />\n",
" <line x1=\"27\" y1=\"0\" x2=\"27\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Colored Rectangle -->\n",
" <polygon points=\"0.0,0.0 27.675387197907465,0.0 27.675387197907465,25.412616514582485 0.0,25.412616514582485\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Text -->\n",
" <text x=\"13.837694\" y=\"45.412617\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >30</text>\n",
" <text x=\"47.675387\" y=\"12.706308\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,47.675387,12.706308)\">1</text>\n",
"\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Horizontal lines -->\n",
" <line x1=\"97\" y1=\"0\" x2=\"111\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"97\" y1=\"75\" x2=\"111\" y2=\"89\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Vertical lines -->\n",
" <line x1=\"97\" y1=\"0\" x2=\"97\" y2=\"75\" style=\"stroke-width:2\" />\n",
" <line x1=\"111\" y1=\"14\" x2=\"111\" y2=\"89\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Colored Rectangle -->\n",
" <polygon points=\"97.0,0.0 111.9485979497544,14.948597949754403 111.9485979497544,89.9485979497544 97.0,75.0\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Horizontal lines -->\n",
" <line x1=\"97\" y1=\"0\" x2=\"217\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"111\" y1=\"14\" x2=\"231\" y2=\"14\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Vertical lines -->\n",
" <line x1=\"97\" y1=\"0\" x2=\"111\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"217\" y1=\"0\" x2=\"231\" y2=\"14\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Colored Rectangle -->\n",
" <polygon points=\"97.0,0.0 217.0,0.0 231.9485979497544,14.948597949754403 111.9485979497544,14.948597949754403\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Horizontal lines -->\n",
" <line x1=\"111\" y1=\"14\" x2=\"231\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"111\" y1=\"89\" x2=\"231\" y2=\"89\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Vertical lines -->\n",
" <line x1=\"111\" y1=\"14\" x2=\"111\" y2=\"89\" style=\"stroke-width:2\" />\n",
" <line x1=\"231\" y1=\"14\" x2=\"231\" y2=\"89\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Colored Rectangle -->\n",
" <polygon points=\"111.9485979497544,14.948597949754403 231.9485979497544,14.948597949754403 231.9485979497544,89.9485979497544 111.9485979497544,89.9485979497544\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Text -->\n",
" <text x=\"171.948598\" y=\"109.948598\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >1920</text>\n",
" <text x=\"251.948598\" y=\"52.448598\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,251.948598,52.448598)\">1200</text>\n",
" <text x=\"94.474299\" y=\"102.474299\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,94.474299,102.474299)\">2</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>background</span></div><div class='xr-var-dims'>(carrier_freq, runs, x, y)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(3, 2, 1200, 1920), meta=np.ndarray&gt;</div><input id='attrs-4cb9bac4-256b-4ab9-b5a9-e00cb2d9a254' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-4cb9bac4-256b-4ab9-b5a9-e00cb2d9a254' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-31eeeec9-413f-49b3-b866-04dc48aaa284' class='xr-var-data-in' type='checkbox'><label for='data-31eeeec9-413f-49b3-b866-04dc48aaa284' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>IMAGE_SUBCLASS :</span></dt><dd>IMAGE_GRAYSCALE</dd><dt><span>IMAGE_VERSION :</span></dt><dd>1.2</dd><dt><span>IMAGE_WHITE_IS_ZERO :</span></dt><dd>0</dd></dl></div><div class='xr-var-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 1.03 GiB </td>\n",
" <td> 105.47 MiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (30, 2, 1200, 1920) </td>\n",
" <td> (3, 2, 1200, 1920) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 10 chunks in 195 graph layers </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float64 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"378\" height=\"139\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Horizontal lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"27\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"0\" y1=\"25\" x2=\"27\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Vertical lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"25\" style=\"stroke-width:2\" />\n",
" <line x1=\"2\" y1=\"0\" x2=\"2\" y2=\"25\" />\n",
" <line x1=\"5\" y1=\"0\" x2=\"5\" y2=\"25\" />\n",
" <line x1=\"8\" y1=\"0\" x2=\"8\" y2=\"25\" />\n",
" <line x1=\"11\" y1=\"0\" x2=\"11\" y2=\"25\" />\n",
" <line x1=\"13\" y1=\"0\" x2=\"13\" y2=\"25\" />\n",
" <line x1=\"16\" y1=\"0\" x2=\"16\" y2=\"25\" />\n",
" <line x1=\"19\" y1=\"0\" x2=\"19\" y2=\"25\" />\n",
" <line x1=\"22\" y1=\"0\" x2=\"22\" y2=\"25\" />\n",
" <line x1=\"24\" y1=\"0\" x2=\"24\" y2=\"25\" />\n",
" <line x1=\"27\" y1=\"0\" x2=\"27\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"0.0,0.0 27.675387197907465,0.0 27.675387197907465,25.412616514582485 0.0,25.412616514582485\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"13.837694\" y=\"45.412617\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >30</text>\n",
" <text x=\"47.675387\" y=\"12.706308\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,47.675387,12.706308)\">1</text>\n",
"\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"97\" y1=\"0\" x2=\"111\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"97\" y1=\"75\" x2=\"111\" y2=\"89\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Vertical lines -->\n",
" <line x1=\"97\" y1=\"0\" x2=\"97\" y2=\"75\" style=\"stroke-width:2\" />\n",
" <line x1=\"111\" y1=\"14\" x2=\"111\" y2=\"89\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Colored Rectangle -->\n",
" <polygon points=\"97.0,0.0 111.9485979497544,14.948597949754403 111.9485979497544,89.9485979497544 97.0,75.0\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Horizontal lines -->\n",
" <line x1=\"97\" y1=\"0\" x2=\"217\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"111\" y1=\"14\" x2=\"231\" y2=\"14\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Vertical lines -->\n",
" <line x1=\"97\" y1=\"0\" x2=\"111\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"217\" y1=\"0\" x2=\"231\" y2=\"14\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Colored Rectangle -->\n",
" <polygon points=\"97.0,0.0 217.0,0.0 231.9485979497544,14.948597949754403 111.9485979497544,14.948597949754403\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Horizontal lines -->\n",
" <line x1=\"111\" y1=\"14\" x2=\"231\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"111\" y1=\"89\" x2=\"231\" y2=\"89\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Vertical lines -->\n",
" <line x1=\"111\" y1=\"14\" x2=\"111\" y2=\"89\" style=\"stroke-width:2\" />\n",
" <line x1=\"231\" y1=\"14\" x2=\"231\" y2=\"89\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Colored Rectangle -->\n",
" <polygon points=\"111.9485979497544,14.948597949754403 231.9485979497544,14.948597949754403 231.9485979497544,89.9485979497544 111.9485979497544,89.9485979497544\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Text -->\n",
" <text x=\"171.948598\" y=\"109.948598\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >1920</text>\n",
" <text x=\"251.948598\" y=\"52.448598\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,251.948598,52.448598)\">1200</text>\n",
" <text x=\"94.474299\" y=\"102.474299\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,94.474299,102.474299)\">2</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>dark</span></div><div class='xr-var-dims'>(carrier_freq, runs, x, y)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(3, 2, 1200, 1920), meta=np.ndarray&gt;</div><input id='attrs-07c66865-5793-4d2f-91c0-f042922ceaf9' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-07c66865-5793-4d2f-91c0-f042922ceaf9' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9183a53c-bcdf-4652-8a64-492896a8068f' class='xr-var-data-in' type='checkbox'><label for='data-9183a53c-bcdf-4652-8a64-492896a8068f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>IMAGE_SUBCLASS :</span></dt><dd>IMAGE_GRAYSCALE</dd><dt><span>IMAGE_VERSION :</span></dt><dd>1.2</dd><dt><span>IMAGE_WHITE_IS_ZERO :</span></dt><dd>0</dd></dl></div><div class='xr-var-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 1.03 GiB </td>\n",
" <td> 105.47 MiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (30, 2, 1200, 1920) </td>\n",
" <td> (3, 2, 1200, 1920) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 10 chunks in 195 graph layers </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float64 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"378\" height=\"139\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Horizontal lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"27\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"0\" y1=\"25\" x2=\"27\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Vertical lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"25\" style=\"stroke-width:2\" />\n",
" <line x1=\"2\" y1=\"0\" x2=\"2\" y2=\"25\" />\n",
" <line x1=\"5\" y1=\"0\" x2=\"5\" y2=\"25\" />\n",
" <line x1=\"8\" y1=\"0\" x2=\"8\" y2=\"25\" />\n",
" <line x1=\"11\" y1=\"0\" x2=\"11\" y2=\"25\" />\n",
" <line x1=\"13\" y1=\"0\" x2=\"13\" y2=\"25\" />\n",
" <line x1=\"16\" y1=\"0\" x2=\"16\" y2=\"25\" />\n",
" <line x1=\"19\" y1=\"0\" x2=\"19\" y2=\"25\" />\n",
" <line x1=\"22\" y1=\"0\" x2=\"22\" y2=\"25\" />\n",
" <line x1=\"24\" y1=\"0\" x2=\"24\" y2=\"25\" />\n",
" <line x1=\"27\" y1=\"0\" x2=\"27\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Colored Rectangle -->\n",
" <polygon points=\"0.0,0.0 27.675387197907465,0.0 27.675387197907465,25.412616514582485 0.0,25.412616514582485\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Text -->\n",
" <text x=\"13.837694\" y=\"45.412617\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >30</text>\n",
" <text x=\"47.675387\" y=\"12.706308\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,47.675387,12.706308)\">1</text>\n",
"\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Horizontal lines -->\n",
" <line x1=\"97\" y1=\"0\" x2=\"111\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"97\" y1=\"75\" x2=\"111\" y2=\"89\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Vertical lines -->\n",
" <line x1=\"97\" y1=\"0\" x2=\"97\" y2=\"75\" style=\"stroke-width:2\" />\n",
" <line x1=\"111\" y1=\"14\" x2=\"111\" y2=\"89\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Colored Rectangle -->\n",
" <polygon points=\"97.0,0.0 111.9485979497544,14.948597949754403 111.9485979497544,89.9485979497544 97.0,75.0\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Horizontal lines -->\n",
" <line x1=\"97\" y1=\"0\" x2=\"217\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"111\" y1=\"14\" x2=\"231\" y2=\"14\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Vertical lines -->\n",
" <line x1=\"97\" y1=\"0\" x2=\"111\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"217\" y1=\"0\" x2=\"231\" y2=\"14\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Colored Rectangle -->\n",
" <polygon points=\"97.0,0.0 217.0,0.0 231.9485979497544,14.948597949754403 111.9485979497544,14.948597949754403\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Horizontal lines -->\n",
" <line x1=\"111\" y1=\"14\" x2=\"231\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"111\" y1=\"89\" x2=\"231\" y2=\"89\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Vertical lines -->\n",
" <line x1=\"111\" y1=\"14\" x2=\"111\" y2=\"89\" style=\"stroke-width:2\" />\n",
" <line x1=\"231\" y1=\"14\" x2=\"231\" y2=\"89\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Colored Rectangle -->\n",
" <polygon points=\"111.9485979497544,14.948597949754403 231.9485979497544,14.948597949754403 231.9485979497544,89.9485979497544 111.9485979497544,89.9485979497544\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Text -->\n",
" <text x=\"171.948598\" y=\"109.948598\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >1920</text>\n",
" <text x=\"251.948598\" y=\"52.448598\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,251.948598,52.448598)\">1200</text>\n",
" <text x=\"94.474299\" y=\"102.474299\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,94.474299,102.474299)\">2</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>shotNum</span></div><div class='xr-var-dims'>(carrier_freq, runs)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(30, 2), meta=np.ndarray&gt;</div><input id='attrs-04a894a2-dc31-47f5-9e0f-cea052e9dc38' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-04a894a2-dc31-47f5-9e0f-cea052e9dc38' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c7e95610-337c-49c5-adf1-d75c85c52218' class='xr-var-data-in' type='checkbox'><label for='data-c7e95610-337c-49c5-adf1-d75c85c52218' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 480 B </td>\n",
" <td> 480 B </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (30, 2) </td>\n",
" <td> (30, 2) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 1 chunks in 1 graph layer </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float64 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"86\" height=\"170\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Horizontal lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"36\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"0\" y1=\"120\" x2=\"36\" y2=\"120\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Vertical lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"120\" style=\"stroke-width:2\" />\n",
" <line x1=\"36\" y1=\"0\" x2=\"36\" y2=\"120\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Colored Rectangle -->\n",
" <polygon points=\"0.0,0.0 36.24782989210401,0.0 36.24782989210401,120.0 0.0,120.0\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Text -->\n",
" <text x=\"18.123915\" y=\"140.000000\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >2</text>\n",
" <text x=\"56.247830\" y=\"60.000000\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,56.247830,60.000000)\">30</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>OD</span></div><div class='xr-var-dims'>(carrier_freq, runs, x, y)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(3, 2, 1200, 1920), meta=np.ndarray&gt;</div><input id='attrs-97717c63-4481-42a9-9c36-6dc30ea8ffb1' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-97717c63-4481-42a9-9c36-6dc30ea8ffb1' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4f3b27de-c1ab-401e-88fe-eba7390e8ebf' class='xr-var-data-in' type='checkbox'><label for='data-4f3b27de-c1ab-401e-88fe-eba7390e8ebf' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>IMAGE_SUBCLASS :</span></dt><dd>IMAGE_GRAYSCALE</dd><dt><span>IMAGE_VERSION :</span></dt><dd>1.2</dd><dt><span>IMAGE_WHITE_IS_ZERO :</span></dt><dd>0</dd></dl></div><div class='xr-var-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 1.03 GiB </td>\n",
" <td> 105.47 MiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (30, 2, 1200, 1920) </td>\n",
" <td> (3, 2, 1200, 1920) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 10 chunks in 571 graph layers </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float64 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"378\" height=\"139\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Horizontal lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"27\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"0\" y1=\"25\" x2=\"27\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Vertical lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"25\" style=\"stroke-width:2\" />\n",
" <line x1=\"2\" y1=\"0\" x2=\"2\" y2=\"25\" />\n",
" <line x1=\"5\" y1=\"0\" x2=\"5\" y2=\"25\" />\n",
" <line x1=\"8\" y1=\"0\" x2=\"8\" y2=\"25\" />\n",
" <line x1=\"11\" y1=\"0\" x2=\"11\" y2=\"25\" />\n",
" <line x1=\"13\" y1=\"0\" x2=\"13\" y2=\"25\" />\n",
" <line x1=\"16\" y1=\"0\" x2=\"16\" y2=\"25\" />\n",
" <line x1=\"19\" y1=\"0\" x2=\"19\" y2=\"25\" />\n",
" <line x1=\"22\" y1=\"0\" x2=\"22\" y2=\"25\" />\n",
" <line x1=\"24\" y1=\"0\" x2=\"24\" y2=\"25\" />\n",
" <line x1=\"27\" y1=\"0\" x2=\"27\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Colored Rectangle -->\n",
" <polygon points=\"0.0,0.0 27.675387197907465,0.0 27.675387197907465,25.412616514582485 0.0,25.412616514582485\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Text -->\n",
" <text x=\"13.837694\" y=\"45.412617\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >30</text>\n",
" <text x=\"47.675387\" y=\"12.706308\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,47.675387,12.706308)\">1</text>\n",
"\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Horizontal lines -->\n",
" <line x1=\"97\" y1=\"0\" x2=\"111\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"97\" y1=\"75\" x2=\"111\" y2=\"89\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Vertical lines -->\n",
" <line x1=\"97\" y1=\"0\" x2=\"97\" y2=\"75\" style=\"stroke-width:2\" />\n",
" <line x1=\"111\" y1=\"14\" x2=\"111\" y2=\"89\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Colored Rectangle -->\n",
" <polygon points=\"97.0,0.0 111.9485979497544,14.948597949754403 111.9485979497544,89.9485979497544 97.0,75.0\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Horizontal lines -->\n",
" <line x1=\"97\" y1=\"0\" x2=\"217\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"111\" y1=\"14\" x2=\"231\" y2=\"14\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Vertical lines -->\n",
" <line x1=\"97\" y1=\"0\" x2=\"111\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"217\" y1=\"0\" x2=\"231\" y2=\"14\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Colored Rectangle -->\n",
" <polygon points=\"97.0,0.0 217.0,0.0 231.9485979497544,14.948597949754403 111.9485979497544,14.948597949754403\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Horizontal lines -->\n",
" <line x1=\"111\" y1=\"14\" x2=\"231\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"111\" y1=\"89\" x2=\"231\" y2=\"89\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Vertical lines -->\n",
" <line x1=\"111\" y1=\"14\" x2=\"111\" y2=\"89\" style=\"stroke-width:2\" />\n",
" <line x1=\"231\" y1=\"14\" x2=\"231\" y2=\"89\" style=\"stroke-width:2\" />\n",
"\n",
2023-05-19 18:52:33 +02:00
" <!-- Colored Rectangle -->\n",
" <polygon points=\"111.9485979497544,14.948597949754403 231.9485979497544,14.948597949754403 231.9485979497544,89.9485979497544 111.9485979497544,89.9485979497544\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"171.948598\" y=\"109.948598\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >1920</text>\n",
" <text x=\"251.948598\" y=\"52.448598\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,251.948598,52.448598)\">1200</text>\n",
" <text x=\"94.474299\" y=\"102.474299\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,94.474299,102.474299)\">2</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></li></ul></div></li><li class='xr-section-item'><input id='section-1d9b1315-356b-4c14-860b-21ec537aa8d0' class='xr-section-summary-in' type='checkbox' ><label for='section-1d9b1315-356b-4c14-860b-21ec537aa8d0' class='xr-section-summary' >Indexes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>carrier_freq</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-e051c7f3-09d6-427c-97bc-12e71afb370b' class='xr-index-data-in' type='checkbox'/><label for='index-e051c7f3-09d6-427c-97bc-12e71afb370b' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Float64Index([ 4.21, 4.212, 4.214, 4.216, 4.218, 4.22, 4.222, 4.224, 4.226,\n",
" 4.228, 4.23, 4.232, 4.234, 4.236, 4.238, 4.24, 4.242, 4.244,\n",
" 4.246, 4.248, 4.25, 4.252, 4.254, 4.256, 4.258, 4.26, 4.262,\n",
" 4.264, 4.266, 4.268],\n",
" dtype=&#x27;float64&#x27;, name=&#x27;carrier_freq&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>runs</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-7cce0716-790e-4e08-bcfb-78053bf38b35' class='xr-index-data-in' type='checkbox'/><label for='index-7cce0716-790e-4e08-bcfb-78053bf38b35' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Float64Index([0.0, 1.0], dtype=&#x27;float64&#x27;, name=&#x27;runs&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-05f98e90-5848-47e3-92f6-458dc5e89589' class='xr-section-summary-in' type='checkbox' ><label for='section-05f98e90-5848-47e3-92f6-458dc5e89589' class='xr-section-summary' >Attributes: <span>(120)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>TOF_free :</span></dt><dd>0.01</dd><dt><span>abs_img_freq :</span></dt><dd>110.858</dd><dt><span>absorption_imaging_flag :</span></dt><dd>True</dd><dt><span>backup_data :</span></dt><dd>True</dd><dt><span>blink_off_time :</span></dt><dd>0.001</dd><dt><span>blink_on_time :</span></dt><dd>0.001</dd><dt><span>c_duration :</span></dt><dd>0.2</dd><dt><span>carrier_amp :</span></dt><dd>3</dd><dt><span>carrier_offset :</span></dt><dd>0</dd><dt><span>carrier_phase :</span></dt><dd>0</dd><dt><span>channel_in_use :</span></dt><dd>1</dd><dt><span>cmot_final_current :</span></dt><dd>0.65</dd><dt><span>cmot_hold :</span></dt><dd>0.06</dd><dt><span>cmot_initial_current :</span></dt><dd>0.18</dd><dt><span>compX_current :</span></dt><dd>0.005</dd><dt><span>compX_current_sg :</span></dt><dd>0</dd><dt><span>compX_final_current :</span></dt><dd>0.005</dd><dt><span>compX_initial_current :</span></dt><dd>0.005</dd><dt><span>compY_current :</span></dt><dd>0</dd><dt><span>compY_current_sg :</span></dt><dd>0</dd><dt><span>compY_final_current :</span></dt><dd>0.0</dd><dt><span>compY_initial_current :</span></dt><dd>0</dd><dt><span>compZ_current :</span></dt><dd>0</dd><dt><span>compZ_current_sg :</span></dt><dd>0.189</dd><dt><span>compZ_final_current :</span></dt><dd>0.268</dd><dt><span>compZ_initial_current :</span></dt><dd>0</dd><dt><span>default_camera :</span></dt><dd>0</dd><dt><span>deltaf :</span></dt><dd>nan</dd><dt><span>evap_1_arm_1_final_pow :</span></dt><dd>0.35</dd><dt><span>evap_1_arm_1_mod_depth_final :</span></dt><dd>0</dd><dt><span>evap_1_arm_1_mod_depth_initial :</span></dt><dd>1.0</dd><dt><span>evap_1_arm_1_mod_ramp_duration :</span></dt><dd>1.15</dd><dt><span>evap_1_arm_1_pow_ramp_duration :</span></dt><dd>1.65</dd><dt><span>evap_1_arm_1_start_pow :</span></dt><dd>7</dd><dt><span>evap_1_arm_2_final_pow :</span></dt><dd>5</dd><dt><span>evap_1_arm_2_ramp_duration :</span></dt><dd>0.5</dd><dt><span>evap_1_arm_2_start_pow :</span></dt><dd>0</dd><dt><span>evap_1_mod_ramp_trunc_value :</span></dt><dd>1</dd><dt><span>evap_1_pow_ramp_trunc_value :</span></dt><dd>1.0</dd><dt><span>evap_1_rate_constant_1 :</span></dt><dd>0.525</dd><dt><span>evap_1_rate_constant_2 :</span></dt><dd>0.51</dd><dt><span>evap_2_arm_1_final_pow :</span></dt><dd>0.1</dd><dt><span>evap_2_arm_1_start_pow :</span></dt><dd>0.35</dd><dt><span>evap_2_arm_2_final_pow :</span></dt><dd>1.71</dd><dt><span>evap_2_arm_2_start_pow :</span></dt><dd>5</dd><dt><span>evap_2_ramp_duration :</span></dt><dd>0.5</dd><dt><span>evap_2_ramp_trunc_value :</span></dt><dd>1.0</dd><dt><span>evap_2_rate_constant_1 :</span></dt><dd>0.37</dd><dt><span>evap_2_rate_constant_2 :</span></dt><dd>0.71</dd><dt><span>evap_3_arm_1_final_pow :</span></dt><dd>0.1038</dd><dt><span>evap_3_arm_1_mod_depth_final :</span></dt><dd>0.43</dd><dt><span>evap_3_arm_1_mod_depth_initial :</span></dt><dd>0</dd><dt><span>evap_3_arm_1_start_pow :</span></dt><dd>0.1</dd><dt><span>evap_3_ramp_duration :</span></dt><dd>0.1</dd><dt><span>evap_3_ramp_trunc_value :</span></dt><dd>1.0</dd><dt><span>evap_3_rate_constant_1 :</span></
" 4.234 4.236 4.238 4.24 4.242 4.244 4.246 4.248 4.25 4.252 4.254 4.256\n",
" 4.258 4.26 4.262 4.264 4.266 4.268 4.21 4.212 4.214 4.216 4.218 4.22\n",
" 4.222 4.224 4.226 4.228 4.23 4.232 4.234 4.236 4.238 4.24 4.242 4.248\n",
" 4.25 4.252 4.254 4.256 4.258 4.26 4.262 4.264 4.266 4.268]</dd><dt><span>runs :</span></dt><dd>[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0. 0. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.\n",
" 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]</dd><dt><span>scanAxis :</span></dt><dd>[&#x27;carrier_freq&#x27; &#x27;runs&#x27;]</dd><dt><span>scanAxisLength :</span></dt><dd>[58. 58.]</dd></dl></div></li></ul></div></div>"
],
"text/plain": [
"<xarray.Dataset>\n",
2023-05-19 18:52:33 +02:00
"Dimensions: (carrier_freq: 30, runs: 2, x: 1200, y: 1920)\n",
"Coordinates:\n",
2023-05-19 18:52:33 +02:00
" * carrier_freq (carrier_freq) float64 4.21 4.212 4.214 ... 4.264 4.266 4.268\n",
" * runs (runs) float64 0.0 1.0\n",
"Dimensions without coordinates: x, y\n",
"Data variables:\n",
2023-05-19 18:52:33 +02:00
" atoms (carrier_freq, runs, x, y) float64 dask.array<chunksize=(3, 2, 1200, 1920), meta=np.ndarray>\n",
" background (carrier_freq, runs, x, y) float64 dask.array<chunksize=(3, 2, 1200, 1920), meta=np.ndarray>\n",
" dark (carrier_freq, runs, x, y) float64 dask.array<chunksize=(3, 2, 1200, 1920), meta=np.ndarray>\n",
" shotNum (carrier_freq, runs) float64 dask.array<chunksize=(30, 2), meta=np.ndarray>\n",
" OD (carrier_freq, runs, x, y) float64 dask.array<chunksize=(3, 2, 1200, 1920), meta=np.ndarray>\n",
"Attributes: (12/120)\n",
" TOF_free: 0.01\n",
" abs_img_freq: 110.858\n",
" absorption_imaging_flag: True\n",
" backup_data: True\n",
" blink_off_time: 0.001\n",
" blink_on_time: 0.001\n",
" ... ...\n",
" z_offset: 0.189\n",
" z_offset_img: 0.189\n",
" carrier_freq: [4.21 4.212 4.214 4.216 4.218 4.22 4...\n",
" runs: [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0...\n",
" scanAxis: ['carrier_freq' 'runs']\n",
" scanAxisLength: [58. 58.]"
]
},
2023-05-19 18:52:33 +02:00
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
2023-05-19 18:52:33 +02:00
"dataSet"
]
},
{
"cell_type": "code",
2023-05-19 18:52:33 +02:00
"execution_count": 7,
"metadata": {},
"outputs": [
2023-05-19 18:52:33 +02:00
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'carrier_freq': array([4.21 , 4.212, 4.214, 4.216, 4.218, 4.22 , 4.222, 4.224, 4.226,\n",
" 4.228, 4.23 , 4.232, 4.234, 4.236, 4.238, 4.24 , 4.242, 4.244,\n",
" 4.246, 4.248, 4.25 , 4.252, 4.254, 4.256, 4.258, 4.26 , 4.262,\n",
" 4.264, 4.266, 4.268]), 'runs': array([0., 1.])}\n"
]
},
{
"data": {
2023-05-19 18:52:33 +02:00
"image/png": "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
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
2023-05-19 18:52:33 +02:00
"shotNum = \"0023\"\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 = (280, 959)\n",
"imageAnalyser.span = (350, 350)\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",
2023-05-19 18:52:33 +02:00
"Ncount_mean = Ncount.mean(dim='runs')\n",
"Ncount_std = Ncount.std(dim='runs')\n",
"\n",
2023-05-19 18:52:33 +02:00
"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, 800])\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "code",
2023-05-19 18:52:33 +02:00
"execution_count": 105,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
2023-05-19 18:52:33 +02:00
"<table><tr><th> name </th><th> value </th><th> initial value </th><th> min </th><th> max </th><th> vary </th></tr><tr><td> amplitude </td><td> 1.00000000 </td><td> None </td><td> -inf </td><td> inf </td><td> True </td></tr><tr><td> center </td><td> 0.00000000 </td><td> None </td><td> -inf </td><td> inf </td><td> True </td></tr><tr><td> sigma </td><td> 1.00000000 </td><td> None </td><td> -inf </td><td> inf </td><td> True </td></tr><tr><td> offset </td><td> 0.00000000 </td><td> None </td><td> -inf </td><td> inf </td><td> True </td></tr></table>"
],
"text/plain": [
2023-05-19 18:52:33 +02:00
"Parameters([('amplitude', <Parameter 'amplitude', value=1.0, bounds=[-inf:inf]>), ('center', <Parameter 'center', value=0.0, bounds=[-inf:inf]>), ('sigma', <Parameter 'sigma', value=1.0, bounds=[-inf:inf]>), ('offset', <Parameter 'offset', value=0.0, bounds=[-inf:inf]>)])"
]
},
2023-05-19 18:52:33 +02:00
"execution_count": 105,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
2023-05-19 18:52:33 +02:00
"def sinc_func(x, amplitude=1.0, center=0.0, sigma=1.0, offset=0.0):\n",
" x = np.where(x==center, 1e-15, x)\n",
" return amplitude * ( np.sin(np.pi*(x-center)*sigma) / (np.pi*( (x-center) )* max(sigma, 1e-15) ) ) + offset\n",
"\n",
2023-05-19 18:52:33 +02:00
"fitModel = NewFitModel(sinc_func)\n",
"\n",
"fitModel.make_params()"
]
},
{
"cell_type": "code",
2023-05-19 18:52:33 +02:00
"execution_count": 111,
"metadata": {},
"outputs": [
{
"data": {
2023-05-19 18:52:33 +02:00
"image/png": "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
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fitAnalyser = FitAnalyser(fitModel, fitDim=1)\n",
2023-05-19 18:52:33 +02:00
"# params = fitAnalyser.guess(Ncount_mean_1, x=scanAxis[0], guess_kwargs=dict(negative=True), dask=\"parallelized\")\n",
"params = fitAnalyser.fitModel.make_params()\n",
"params.add(name=\"amplitude\", value= -5000, max=np.inf, min=-np.inf, vary=True)\n",
"params.add(name=\"center\", value= 4.24, max=np.inf, min=-np.inf, vary=True)\n",
"params.add(name=\"sigma\", value= 100, max=np.inf, min= 0, vary=True)\n",
"params.add(name=\"offset\", value= 7000, max=np.inf, min=-np.inf, vary=True)\n",
"\n",
2023-05-19 18:52:33 +02:00
"fitResult = fitAnalyser.fit(Ncount_mean, params, x=scanAxis[0]).load()\n",
"freqdata = np.linspace(4.21, 4.27, 500)\n",
"fitCurve = fitAnalyser.eval(fitResult, x=freqdata, dask=\"parallelized\").load()\n",
"fitCurve = fitCurve.assign_coords({'x':np.array(freqdata)})\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"\n",
2023-05-19 18:52:33 +02:00
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
"fitCurve.plot.errorbar(ax=ax, fmt='--g')\n",
2023-05-19 18:52:33 +02:00
"plt.xlabel('Center Frequency (MHz)')\n",
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "code",
2023-05-19 18:52:33 +02:00
"execution_count": 114,
"metadata": {},
"outputs": [
{
"data": {
2023-05-19 18:52:33 +02:00
"text/html": [
"<h2> Model</h2> Model(sinc_func) <h2>Fit Statistics</h2><table><tr><td>fitting method</td><td>leastsq</td><td></td></tr><tr><td># function evals</td><td>6</td><td></td></tr><tr><td># data points</td><td>30</td><td></td></tr><tr><td># variables</td><td>4</td><td></td></tr><tr><td>chi-square</td><td> 22258818.8</td><td></td></tr><tr><td>reduced chi-square</td><td> 856108.416</td><td></td></tr><tr><td>Akaike info crit.</td><td> 413.511544</td><td></td></tr><tr><td>Bayesian info crit.</td><td> 419.116333</td><td></td></tr></table><h2>Variables</h2><table><tr><th> name </th><th> value </th><th> standard error </th><th> relative error </th><th> initial value </th><th> min </th><th> max </th><th> vary </th></tr><tr><td> amplitude </td><td> -3763.02104 </td><td> 533.936160 </td><td> (14.19%) </td><td> -5000 </td><td> -inf </td><td> inf </td><td> True </td></tr><tr><td> center </td><td> 4.24000001 </td><td> 1.2454e-08 </td><td> (0.00%) </td><td> 4.24 </td><td> -inf </td><td> inf </td><td> True </td></tr><tr><td> sigma </td><td> 101.667371 </td><td> 5.09607377 </td><td> (5.01%) </td><td> 100 </td><td> 0.00000000 </td><td> inf </td><td> True </td></tr><tr><td> offset </td><td> 6305.33408 </td><td> 190.360991 </td><td> (3.02%) </td><td> 7000 </td><td> -inf </td><td> inf </td><td> True </td></tr></table><h2>Correlations (unreported correlations are < 0.100)</h2><table><tr><td>amplitude</td><td>offset</td><td>-0.3586</td></tr><tr><td>center</td><td>sigma</td><td>-0.2865</td></tr><tr><td>amplitude</td><td>sigma</td><td>-0.2413</td></tr><tr><td>center</td><td>offset</td><td>0.2306</td></tr><tr><td>sigma</td><td>offset</td><td>-0.1447</td></tr></table>"
],
"text/plain": [
2023-05-19 18:52:33 +02:00
"<lmfit.model.ModelResult at 0x21cb9fdf3d0>"
]
},
2023-05-19 18:52:33 +02:00
"execution_count": 114,
"metadata": {},
2023-05-19 18:52:33 +02:00
"output_type": "execute_result"
}
],
2023-05-16 15:51:13 +02:00
"source": [
2023-05-19 18:52:33 +02:00
"fitResult.item()"
2023-05-16 15:51:13 +02:00
]
},
{
2023-05-19 18:52:33 +02:00
"cell_type": "code",
"execution_count": 87,
2023-05-16 15:51:13 +02:00
"metadata": {},
2023-05-19 18:52:33 +02:00
"outputs": [],
2023-05-16 15:51:13 +02:00
"source": [
2023-05-19 18:52:33 +02:00
"import lmfit\n",
"\n",
"def sinc_func(x, amplitude=1.0, center=0.0, sigma=1.0, offset=0.0):\n",
" x = np.where(x==center, 1e-5, x)\n",
" return amplitude * ( np.sin(np.pi*(x-center)*max(sigma, 1e-5)) / (np.pi*( (x-center) )* max(sigma, 1e-5) ) ) + offset\n",
"\n",
"def _fit_1D(data, params, x):\n",
" \n",
" print(x)\n",
" print(data)\n",
" \n",
" res = fitModel.fit(data=data, x=x, params=params, nan_policy='omit')\n",
" \n",
" print(111)\n",
" \n",
" # print(res.items())\n",
" \n",
" return 1\n",
"\n",
"def fit(dataArray, paramsArray, x=None, y=None, input_core_dims=None, dask='parallelized', vectorize=True, keep_attrs=True, daskKwargs=None, **kwargs):\n",
" \n",
" kwargs.update(\n",
" {\n",
" \"dask\": dask,\n",
" \"vectorize\": vectorize,\n",
" \"input_core_dims\": input_core_dims,\n",
" 'keep_attrs': keep_attrs,\n",
" }\n",
" )\n",
" \n",
" fitModel = NewFitModel(sinc_func)\n",
"\n",
" if not daskKwargs is None:\n",
" kwargs.update({\"dask_gufunc_kwargs\": daskKwargs})\n",
" \n",
" if isinstance(paramsArray, type(fitModel.make_params())):\n",
"\n",
" if input_core_dims is None:\n",
" kwargs.update(\n",
" {\n",
" \"input_core_dims\": [['x']],\n",
" }\n",
" )\n",
"\n",
" if x is None:\n",
" if 'x' in dataArray.dims:\n",
" x = dataArray['x'].to_numpy()\n",
" else:\n",
" if isinstance(x, str):\n",
" if input_core_dims is None:\n",
" kwargs.update(\n",
" {\n",
" \"input_core_dims\": [[x]],\n",
" }\n",
" )\n",
" x = dataArray[x].to_numpy()\n",
"\n",
" return xr.apply_ufunc(_fit_1D, dataArray, kwargs={'params':paramsArray,'x':x},\n",
" output_dtypes=[type(lmfit.model.ModelResult(fitModel, fitModel.make_params()))], \n",
" **kwargs)\n"
2023-05-16 15:51:13 +02:00
]
},
{
"cell_type": "code",
2023-05-19 18:52:33 +02:00
"execution_count": 96,
2023-05-16 15:51:13 +02:00
"metadata": {},
"outputs": [],
2023-05-07 23:41:31 +02:00
"source": [
2023-05-19 18:52:33 +02:00
"params = fitAnalyser.fitModel.make_params()\n",
"params.add(name=\"amplitude\", value= -6000, max=np.inf, min=-np.inf, vary=True)\n",
"params.add(name=\"center\", value= 4.24, max=np.inf, min=-np.inf, vary=True)\n",
"params.add(name=\"sigma\", value= 1, max=np.inf, min= 0, vary=True)\n",
"params.add(name=\"offset\", value= 6000, max=np.inf, min=-np.inf, vary=True)"
]
},
{
"cell_type": "code",
"execution_count": 97,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[4.21 4.212 4.214 4.216 4.218 4.22 4.222 4.224 4.226 4.228 4.23 4.232\n",
" 4.234 4.236 4.238 4.24 4.242 4.244 4.246 4.248 4.25 4.252 4.254 4.256\n",
" 4.258 4.26 4.262 4.264 4.266 4.268]\n",
"[6769.67956065 6481.29550119 6053.12583223 6167.32988037 5832.95142324\n",
" 6666.80232023 6495.09820957 6194.86783408 5496.9058868 6528.28343547\n",
" 6320.13082993 5967.89140337 5146.70221327 2198.13874681 1791.42699994\n",
" 5195.29511407 4194.74291752 2821.57312863 3186.06344255 6177.81491664\n",
" 6281.72290362 6793.60854331 6780.77347622 6566.97442088 6551.53646254\n",
" 6566.30218537 6630.50401754 7033.66568469 6485.86052695 6861.09580952]\n",
"111\n"
]
}
],
"source": [
"fitResult = fit(Ncount_mean, params, x=scanAxis[0]).load()"
]
},
{
"cell_type": "code",
"execution_count": 95,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<h2> Model</h2> Model(sinc_func) <h2>Fit Statistics</h2><table><tr><td>fitting method</td><td>leastsq</td><td></td></tr><tr><td># function evals</td><td>17</td><td></td></tr><tr><td># data points</td><td>30</td><td></td></tr><tr><td># variables</td><td>4</td><td></td></tr><tr><td>chi-square</td><td> 57863952.6</td><td></td></tr><tr><td>reduced chi-square</td><td> 2225536.64</td><td></td></tr><tr><td>Akaike info crit.</td><td> 442.172234</td><td></td></tr><tr><td>Bayesian info crit.</td><td> 447.777023</td><td></td></tr></table><h2>Variables</h2><table><tr><th> name </th><th> value </th><th> standard error </th><th> relative error </th><th> initial value </th><th> min </th><th> max </th><th> vary </th></tr><tr><td> amplitude </td><td> -4877.47241 </td><td> 30874.3404 </td><td> (633.00%) </td><td> -6000 </td><td> -inf </td><td> inf </td><td> True </td></tr><tr><td> center </td><td> 4.23999931 </td><td> 0.00308412 </td><td> (0.07%) </td><td> 4.24 </td><td> -inf </td><td> inf </td><td> True </td></tr><tr><td> sigma </td><td> 19.9674926 </td><td> 74.3761454 </td><td> (372.49%) </td><td> 1 </td><td> 0.00000000 </td><td> inf </td><td> True </td></tr><tr><td> offset </td><td> 10532.4576 </td><td> 31160.6325 </td><td> (295.85%) </td><td> 6000 </td><td> -inf </td><td> inf </td><td> True </td></tr></table><h2>Correlations (unreported correlations are < 0.100)</h2><table><tr><td>amplitude</td><td>offset</td><td>-0.9999</td></tr><tr><td>sigma</td><td>offset</td><td>-0.9988</td></tr><tr><td>amplitude</td><td>sigma</td><td>0.9983</td></tr><tr><td>amplitude</td><td>center</td><td>0.1438</td></tr><tr><td>center</td><td>offset</td><td>-0.1432</td></tr><tr><td>center</td><td>sigma</td><td>0.1381</td></tr></table>"
],
"text/plain": [
"<lmfit.model.ModelResult at 0x21cb9fdba00>"
]
},
"execution_count": 95,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"def sinc_func(x, amplitude=1.0, center=0.0, sigma=1.0, offset=0.0):\n",
" x = np.where(x==center, 1e-5, x)\n",
" return amplitude * ( np.sin(np.pi*(x-center)*max(sigma, 1e-5)) / (np.pi*( (x-center) )* max(sigma, 1e-5) ) ) + offset\n",
"\n",
"fitModel = NewFitModel(sinc_func)\n",
"\n",
"fitModel.make_params()\n",
"\n",
"data = Ncount_mean.to_numpy()\n",
"x = Ncount_mean.carrier_freq.to_numpy()\n",
"\n",
"fitModel.fit(data=data, x=x, params=params, nan_policy='omit')"
]
},
{
"cell_type": "code",
"execution_count": 78,
"metadata": {},
"outputs": [
{
"ename": "SyntaxError",
"evalue": "positional argument follows keyword argument (864697295.py, line 1)",
"output_type": "error",
"traceback": [
"\u001b[1;36m Cell \u001b[1;32mIn [78], line 1\u001b[1;36m\u001b[0m\n\u001b[1;33m np.where(x=0, 1, 2)\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m positional argument follows keyword argument\n"
]
}
],
"source": [
"np.where(x==0, 1, 2)"
2023-05-07 23:41:31 +02:00
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
2023-05-07 23:41:31 +02:00
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
2023-05-08 17:48:53 +02:00
"version": "3.9.13"
2023-05-07 23:41:31 +02:00
},
"orig_nbformat": 4
2023-05-07 23:41:31 +02:00
},
"nbformat": 4,
"nbformat_minor": 2
}