analyseScript/test.ipynb

2162 lines
207 KiB
Plaintext
Raw Normal View History

2023-04-24 13:03:23 +02:00
{
"cells": [
2023-05-04 13:47:33 +02:00
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Import supporting package"
]
},
2023-04-24 13:03:23 +02:00
{
"cell_type": "code",
2023-05-04 19:16:35 +02:00
"execution_count": 1,
2023-04-24 13:03:23 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-05-04 13:47:33 +02:00
"import xarray as xr\n",
"import numpy as np\n",
"\n",
2023-05-05 18:25:03 +02:00
"from uncertainties import ufloat\n",
"from uncertainties import unumpy as unp\n",
"from uncertainties import umath\n",
"\n",
2023-05-04 13:47:33 +02:00
"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",
2023-05-05 18:25:03 +02:00
"from ToolFunction.ToolFunction import *\n",
"\n",
"from ToolFunction.HomeMadeXarrayFunction import errorbar, dataarray_plot_errorbar\n",
"xr.plot.dataarray_plot.errorbar = errorbar\n",
"xr.plot.accessor.DataArrayPlotAccessor.errorbar = dataarray_plot_errorbar\n",
2023-05-04 13:47:33 +02:00
"\n",
"imageAnalyser = ImageAnalyser()"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Start a client for parallel computing"
2023-04-24 13:03:23 +02:00
]
},
{
"cell_type": "code",
2023-05-04 19:16:35 +02:00
"execution_count": 2,
2023-05-04 13:47:33 +02:00
"metadata": {},
2023-05-04 19:16:35 +02:00
"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",
2023-05-05 18:30:53 +02:00
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">Client-97bc1b1c-eb61-11ed-96e0-80e82ce2fa8e</p>\n",
2023-05-04 19:16:35 +02:00
" <table style=\"width: 100%; text-align: left;\">\n",
"\n",
" <tr>\n",
" \n",
" <td style=\"text-align: left;\"><strong>Connection method:</strong> Cluster object</td>\n",
" <td style=\"text-align: left;\"><strong>Cluster type:</strong> distributed.LocalCluster</td>\n",
" \n",
" </tr>\n",
"\n",
" \n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <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",
2023-05-05 18:30:53 +02:00
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">09edd810</p>\n",
2023-05-04 19:16:35 +02:00
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <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> 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-05 18:30:53 +02:00
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">Scheduler-8491ba01-6207-4888-9e67-9507ebb1b358</p>\n",
2023-05-04 19:16:35 +02:00
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Comm:</strong> tcp://127.0.0.1:63901\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Workers:</strong> 6\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>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> 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-05 18:30:53 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:63937\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads: </strong> 10\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:63939/status\" target=\"_blank\">http://127.0.0.1:63939/status</a>\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Memory: </strong> 9.31 GiB\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:63904\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-a3himnbj\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" </tr>\n",
"\n",
" \n",
"\n",
" \n",
"\n",
" </table>\n",
" </details>\n",
" </div>\n",
" </div>\n",
" \n",
" <div style=\"margin-bottom: 20px;\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <details>\n",
" <summary>\n",
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 1</h4>\n",
" </summary>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:63931\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads: </strong> 10\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:63932/status\" target=\"_blank\">http://127.0.0.1:63932/status</a>\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Memory: </strong> 9.31 GiB\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:63905\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-u5gnp3mc\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" </tr>\n",
"\n",
" \n",
"\n",
" \n",
"\n",
" </table>\n",
" </details>\n",
" </div>\n",
" </div>\n",
" \n",
" <div style=\"margin-bottom: 20px;\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <details>\n",
" <summary>\n",
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 2</h4>\n",
" </summary>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:63934\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads: </strong> 10\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:63935/status\" target=\"_blank\">http://127.0.0.1:63935/status</a>\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Memory: </strong> 9.31 GiB\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:63906\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-vom2akqi\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" </tr>\n",
"\n",
" \n",
"\n",
" \n",
"\n",
" </table>\n",
" </details>\n",
" </div>\n",
" </div>\n",
" \n",
" <div style=\"margin-bottom: 20px;\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <details>\n",
" <summary>\n",
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 3</h4>\n",
" </summary>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:63938\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads: </strong> 10\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:63940/status\" target=\"_blank\">http://127.0.0.1:63940/status</a>\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Memory: </strong> 9.31 GiB\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:63907\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-hxb9f3bt\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" </tr>\n",
"\n",
" \n",
"\n",
" \n",
"\n",
" </table>\n",
" </details>\n",
" </div>\n",
" </div>\n",
" \n",
" <div style=\"margin-bottom: 20px;\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <details>\n",
" <summary>\n",
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 4</h4>\n",
" </summary>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:63926\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads: </strong> 10\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:63929/status\" target=\"_blank\">http://127.0.0.1:63929/status</a>\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Memory: </strong> 9.31 GiB\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:63908\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-h_t7j4hx\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" </tr>\n",
"\n",
" \n",
"\n",
" \n",
"\n",
" </table>\n",
" </details>\n",
" </div>\n",
" </div>\n",
" \n",
" <div style=\"margin-bottom: 20px;\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <details>\n",
" <summary>\n",
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 5</h4>\n",
" </summary>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:63943\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads: </strong> 10\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:63944/status\" target=\"_blank\">http://127.0.0.1:63944/status</a>\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Memory: </strong> 9.31 GiB\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:63909\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-05-05 18:30:53 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-dhchz4hh\n",
2023-05-04 19:16:35 +02:00
" </td>\n",
" </tr>\n",
"\n",
" \n",
"\n",
" \n",
"\n",
" </table>\n",
" </details>\n",
" </div>\n",
" </div>\n",
" \n",
"\n",
" </details>\n",
"</div>\n",
"\n",
" </details>\n",
" </div>\n",
"</div>\n",
" </details>\n",
" \n",
"\n",
" </div>\n",
"</div>"
],
"text/plain": [
2023-05-05 18:30:53 +02:00
"<Client: 'tcp://127.0.0.1:63901' processes=6 threads=60, memory=55.88 GiB>"
2023-05-04 19:16:35 +02:00
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
2023-05-04 13:47:33 +02:00
"source": [
"from dask.distributed import Client\n",
"client = Client(n_workers=6, threads_per_worker=10, processes=True, memory_limit='10GB')\n",
"client"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Read data"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Set file path"
]
},
{
"cell_type": "code",
2023-05-04 19:16:35 +02:00
"execution_count": 3,
2023-04-24 13:03:23 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-05-04 18:32:17 +02:00
"# filepath = \"//DyLabNAS/Data/Evaporative_Cooling/2023/05/03/0043/*.h5\"\n",
2023-04-24 13:03:23 +02:00
"# filepath = \"//DyLabNAS/Data/Evaporative_Cooling/2023/04/18/0003/2023-04-18_0003_Evaporative_Cooling_000.h5\"\n",
"\n",
2023-05-05 18:25:03 +02:00
"# filepath = \"//DyLabNAS/Data/Repetition_scan/2023/04/21/0002/*.h5\"\n",
2023-05-04 13:47:33 +02:00
"\n",
2023-05-04 18:32:17 +02:00
"# filepath = r\"./testData/0000/*.h5\"\n",
2023-04-24 13:03:23 +02:00
"\n",
2023-05-05 18:25:03 +02:00
"# filepath = \"//DyLabNAS/Data/Evaporative_Cooling/2023/04/18/0003/*.h5\"\n",
"\n",
"filepath = \"//DyLabNAS/Data/Evaporative_Cooling/2023/05/04/0000/*.h5\""
2023-05-04 13:47:33 +02:00
]
},
{
"cell_type": "code",
2023-05-04 19:16:35 +02:00
"execution_count": 4,
2023-05-04 13:47:33 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-04-24 13:03:23 +02:00
"groupList = [\n",
" \"images/MOT_3D_Camera/in_situ_absorption\",\n",
2023-05-04 13:47:33 +02:00
" # \"images/ODT_1_Axis_Camera/in_situ_absorption\",\n",
2023-04-24 13:03:23 +02:00
"]\n",
"\n",
"dskey = {\n",
" \"images/MOT_3D_Camera/in_situ_absorption\": \"camera_1\",\n",
2023-05-04 13:47:33 +02:00
" # \"images/ODT_1_Axis_Camera/in_situ_absorption\": \"camera_2\",\n",
2023-04-24 13:03:23 +02:00
"}\n",
"\n",
2023-05-04 19:16:35 +02:00
"dataSetDict = {\n",
2023-04-24 13:03:23 +02:00
" dskey[groupList[i]]: read_hdf5_file(filepath, groupList[i])\n",
" for i in range(len(groupList))\n",
"}"
]
},
2023-05-04 13:47:33 +02:00
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Rechunk the data for parallel computing"
]
},
2023-04-24 13:03:23 +02:00
{
"cell_type": "code",
2023-05-04 19:16:35 +02:00
"execution_count": 5,
2023-05-04 13:47:33 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-05-04 19:16:35 +02:00
"dataSet = dataSetDict[\"camera_1\"]\n",
2023-05-04 13:47:33 +02:00
"\n",
2023-05-04 19:16:35 +02:00
"scanAxis = dataSet.scanAxis\n",
2023-05-04 13:47:33 +02:00
"\n",
2023-05-04 19:16:35 +02:00
"# dataSet = dataSet.chunk(\n",
2023-05-04 18:32:17 +02:00
"# {\n",
"# # \"compZ_current_sg\": \"auto\",\n",
"# \"sin_mod_freq\": \"auto\",\n",
"# \"runs\": 2,\n",
"# \"x\": \"auto\",\n",
"# \"y\": \"auto\",\n",
"# }\n",
"# )"
2023-05-04 13:47:33 +02:00
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Calculate absorption imaging"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## get OD images"
]
},
{
"cell_type": "code",
2023-05-05 18:25:03 +02:00
"execution_count": 6,
2023-04-24 13:03:23 +02:00
"metadata": {},
2023-05-04 19:16:35 +02:00
"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-05 18:25:03 +02:00
"Dimensions: (runs: 3, x: 1200, y: 1920)\n",
2023-05-04 19:16:35 +02:00
"Coordinates:\n",
" * runs (runs) float64 0.0 1.0 2.0\n",
"Dimensions without coordinates: x, y\n",
"Data variables:\n",
2023-05-05 18:25:03 +02:00
" atoms (runs, x, y) uint16 dask.array&lt;chunksize=(1, 1200, 1920), meta=np.ndarray&gt;\n",
" background (runs, x, y) uint16 dask.array&lt;chunksize=(1, 1200, 1920), meta=np.ndarray&gt;\n",
" dark (runs, x, y) uint16 dask.array&lt;chunksize=(1, 1200, 1920), meta=np.ndarray&gt;\n",
" shotNum (runs) &lt;U1 &#x27;0&#x27; &#x27;1&#x27; &#x27;2&#x27;\n",
" OD (runs, x, y) float64 dask.array&lt;chunksize=(1, 1200, 1920), meta=np.ndarray&gt;\n",
"Attributes: (12/101)\n",
" TOF_free: 0.015\n",
2023-05-04 19:16:35 +02:00
" abs_img_freq: 110.858\n",
" absorption_imaging_flag: True\n",
" backup_data: True\n",
" blink_off_time: nan\n",
" blink_on_time: nan\n",
" ... ...\n",
2023-05-05 18:25:03 +02:00
" y_offset_img: 0\n",
2023-05-04 19:16:35 +02:00
" z_offset: 0.189\n",
" z_offset_img: 0.189\n",
2023-05-05 18:25:03 +02:00
" runs: [0. 1. 2.]\n",
" scanAxis: [&#x27;runs&#x27;]\n",
2023-05-05 18:30:53 +02:00
" scanAxisLength: [3.]</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-864fd1a7-f0c5-4830-beb1-cec965cef1ca' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-864fd1a7-f0c5-4830-beb1-cec965cef1ca' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>runs</span>: 3</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-b3b07cd3-6a88-43ac-8d8e-fdf87a3a4847' class='xr-section-summary-in' type='checkbox' checked><label for='section-b3b07cd3-6a88-43ac-8d8e-fdf87a3a4847' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>runs</span></div><div class='xr-var-dims'>(runs)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0 1.0 2.0</div><input id='attrs-d96b6d5f-2b13-4024-b468-a6df2f81f7ac' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-d96b6d5f-2b13-4024-b468-a6df2f81f7ac' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a544a35a-8177-4c7a-93ad-22ae88b81763' class='xr-var-data-in' type='checkbox'><label for='data-a544a35a-8177-4c7a-93ad-22ae88b81763' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0., 1., 2.])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-6a48fe91-2668-45f5-8dde-32274fec992d' class='xr-section-summary-in' type='checkbox' checked><label for='section-6a48fe91-2668-45f5-8dde-32274fec992d' 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'>(runs, x, y)</div><div class='xr-var-dtype'>uint16</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(1, 1200, 1920), meta=np.ndarray&gt;</div><input id='attrs-74809274-2030-412f-a01c-4e6353fadc86' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-74809274-2030-412f-a01c-4e6353fadc86' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a5d706df-63e8-4d81-bd43-a810a0601642' class='xr-var-data-in' type='checkbox'><label for='data-a5d706df-63e8-4d81-bd43-a810a0601642' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>IMAGE_SUBCLASS :</span></dt><dd>IMAGE_GRAYSCALE</dd><dt><span>IMAGE_VERSION :</span></dt><dd>1.2</dd><dt><span>IMAGE_WHITE_IS_ZERO :</span></dt><dd>0</dd></dl></div><div class='xr-var-data'><table>\n",
2023-05-04 19:16:35 +02:00
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
2023-05-05 18:25:03 +02:00
" <td> 13.18 MiB </td>\n",
2023-05-04 19:16:35 +02:00
" <td> 4.39 MiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
2023-05-05 18:25:03 +02:00
" <td> (3, 1200, 1920) </td>\n",
" <td> (1, 1200, 1920) </td>\n",
2023-05-04 19:16:35 +02:00
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
2023-05-05 18:25:03 +02:00
" <td colspan=\"2\"> 3 chunks in 10 graph layers </td>\n",
2023-05-04 19:16:35 +02:00
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> uint16 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
2023-05-05 18:25:03 +02:00
" <svg width=\"194\" height=\"139\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Horizontal lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"10\" y1=\"0\" x2=\"24\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"10\" y1=\"75\" x2=\"24\" y2=\"89\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Vertical lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"10\" y1=\"0\" x2=\"10\" y2=\"75\" style=\"stroke-width:2\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"14\" y2=\"79\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"19\" y2=\"84\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"89\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Colored Rectangle -->\n",
2023-05-05 18:25:03 +02:00
" <polygon points=\"10.0,0.0 24.9485979497544,14.948597949754403 24.9485979497544,89.9485979497544 10.0,75.0\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Horizontal lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"10\" y1=\"0\" x2=\"130\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"134\" y2=\"4\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"139\" y2=\"9\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Vertical lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"10\" y1=\"0\" x2=\"24\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"130\" y1=\"0\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Colored Rectangle -->\n",
2023-05-05 18:25:03 +02:00
" <polygon points=\"10.0,0.0 130.0,0.0 144.9485979497544,14.948597949754403 24.9485979497544,14.948597949754403\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Horizontal lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"24\" y1=\"14\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"24\" y1=\"89\" x2=\"144\" y2=\"89\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Vertical lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"89\" style=\"stroke-width:2\" />\n",
" <line x1=\"144\" y1=\"14\" x2=\"144\" y2=\"89\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Colored Rectangle -->\n",
2023-05-05 18:25:03 +02:00
" <polygon points=\"24.9485979497544,14.948597949754403 144.9485979497544,14.948597949754403 144.9485979497544,89.9485979497544 24.9485979497544,89.9485979497544\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Text -->\n",
2023-05-05 18:25:03 +02:00
" <text x=\"84.948598\" y=\"109.948598\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >1920</text>\n",
" <text x=\"164.948598\" y=\"52.448598\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,164.948598,52.448598)\">1200</text>\n",
" <text x=\"7.474299\" y=\"102.474299\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,7.474299,102.474299)\">3</text>\n",
2023-05-04 19:16:35 +02:00
"</svg>\n",
" </td>\n",
" </tr>\n",
2023-05-05 18:30:53 +02:00
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>background</span></div><div class='xr-var-dims'>(runs, x, y)</div><div class='xr-var-dtype'>uint16</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(1, 1200, 1920), meta=np.ndarray&gt;</div><input id='attrs-2384765b-33a5-4c7f-b716-3236436657ed' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-2384765b-33a5-4c7f-b716-3236436657ed' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-925f278a-5703-4039-ac85-b2b517d8ec70' class='xr-var-data-in' type='checkbox'><label for='data-925f278a-5703-4039-ac85-b2b517d8ec70' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>IMAGE_SUBCLASS :</span></dt><dd>IMAGE_GRAYSCALE</dd><dt><span>IMAGE_VERSION :</span></dt><dd>1.2</dd><dt><span>IMAGE_WHITE_IS_ZERO :</span></dt><dd>0</dd></dl></div><div class='xr-var-data'><table>\n",
2023-05-04 19:16:35 +02:00
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
2023-05-05 18:25:03 +02:00
" <td> 13.18 MiB </td>\n",
2023-05-04 19:16:35 +02:00
" <td> 4.39 MiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
2023-05-05 18:25:03 +02:00
" <td> (3, 1200, 1920) </td>\n",
" <td> (1, 1200, 1920) </td>\n",
2023-05-04 19:16:35 +02:00
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
2023-05-05 18:25:03 +02:00
" <td colspan=\"2\"> 3 chunks in 10 graph layers </td>\n",
2023-05-04 19:16:35 +02:00
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> uint16 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
2023-05-05 18:25:03 +02:00
" <svg width=\"194\" height=\"139\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Horizontal lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"10\" y1=\"0\" x2=\"24\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"10\" y1=\"75\" x2=\"24\" y2=\"89\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Vertical lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"10\" y1=\"0\" x2=\"10\" y2=\"75\" style=\"stroke-width:2\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"14\" y2=\"79\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"19\" y2=\"84\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"89\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Colored Rectangle -->\n",
2023-05-05 18:25:03 +02:00
" <polygon points=\"10.0,0.0 24.9485979497544,14.948597949754403 24.9485979497544,89.9485979497544 10.0,75.0\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Horizontal lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"10\" y1=\"0\" x2=\"130\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"134\" y2=\"4\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"139\" y2=\"9\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Vertical lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"10\" y1=\"0\" x2=\"24\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"130\" y1=\"0\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Colored Rectangle -->\n",
2023-05-05 18:25:03 +02:00
" <polygon points=\"10.0,0.0 130.0,0.0 144.9485979497544,14.948597949754403 24.9485979497544,14.948597949754403\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Horizontal lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"24\" y1=\"14\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"24\" y1=\"89\" x2=\"144\" y2=\"89\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Vertical lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"89\" style=\"stroke-width:2\" />\n",
" <line x1=\"144\" y1=\"14\" x2=\"144\" y2=\"89\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Colored Rectangle -->\n",
2023-05-05 18:25:03 +02:00
" <polygon points=\"24.9485979497544,14.948597949754403 144.9485979497544,14.948597949754403 144.9485979497544,89.9485979497544 24.9485979497544,89.9485979497544\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Text -->\n",
2023-05-05 18:25:03 +02:00
" <text x=\"84.948598\" y=\"109.948598\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >1920</text>\n",
" <text x=\"164.948598\" y=\"52.448598\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,164.948598,52.448598)\">1200</text>\n",
" <text x=\"7.474299\" y=\"102.474299\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,7.474299,102.474299)\">3</text>\n",
2023-05-04 19:16:35 +02:00
"</svg>\n",
" </td>\n",
" </tr>\n",
2023-05-05 18:30:53 +02:00
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>dark</span></div><div class='xr-var-dims'>(runs, x, y)</div><div class='xr-var-dtype'>uint16</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(1, 1200, 1920), meta=np.ndarray&gt;</div><input id='attrs-67f75caf-2965-4e01-9dd3-31e214364b6f' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-67f75caf-2965-4e01-9dd3-31e214364b6f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-db048b92-1c2c-4e0e-8475-9265c2fcedd4' class='xr-var-data-in' type='checkbox'><label for='data-db048b92-1c2c-4e0e-8475-9265c2fcedd4' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>IMAGE_SUBCLASS :</span></dt><dd>IMAGE_GRAYSCALE</dd><dt><span>IMAGE_VERSION :</span></dt><dd>1.2</dd><dt><span>IMAGE_WHITE_IS_ZERO :</span></dt><dd>0</dd></dl></div><div class='xr-var-data'><table>\n",
2023-05-04 19:16:35 +02:00
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
2023-05-05 18:25:03 +02:00
" <td> 13.18 MiB </td>\n",
2023-05-04 19:16:35 +02:00
" <td> 4.39 MiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
2023-05-05 18:25:03 +02:00
" <td> (3, 1200, 1920) </td>\n",
" <td> (1, 1200, 1920) </td>\n",
2023-05-04 19:16:35 +02:00
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
2023-05-05 18:25:03 +02:00
" <td colspan=\"2\"> 3 chunks in 10 graph layers </td>\n",
2023-05-04 19:16:35 +02:00
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> uint16 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
2023-05-05 18:25:03 +02:00
" <svg width=\"194\" height=\"139\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Horizontal lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"10\" y1=\"0\" x2=\"24\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"10\" y1=\"75\" x2=\"24\" y2=\"89\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Vertical lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"10\" y1=\"0\" x2=\"10\" y2=\"75\" style=\"stroke-width:2\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"14\" y2=\"79\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"19\" y2=\"84\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"89\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Colored Rectangle -->\n",
2023-05-05 18:25:03 +02:00
" <polygon points=\"10.0,0.0 24.9485979497544,14.948597949754403 24.9485979497544,89.9485979497544 10.0,75.0\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Horizontal lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"10\" y1=\"0\" x2=\"130\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"134\" y2=\"4\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"139\" y2=\"9\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Vertical lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"10\" y1=\"0\" x2=\"24\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"130\" y1=\"0\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Colored Rectangle -->\n",
2023-05-05 18:25:03 +02:00
" <polygon points=\"10.0,0.0 130.0,0.0 144.9485979497544,14.948597949754403 24.9485979497544,14.948597949754403\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Horizontal lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"24\" y1=\"14\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"24\" y1=\"89\" x2=\"144\" y2=\"89\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Vertical lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"89\" style=\"stroke-width:2\" />\n",
" <line x1=\"144\" y1=\"14\" x2=\"144\" y2=\"89\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Colored Rectangle -->\n",
2023-05-05 18:25:03 +02:00
" <polygon points=\"24.9485979497544,14.948597949754403 144.9485979497544,14.948597949754403 144.9485979497544,89.9485979497544 24.9485979497544,89.9485979497544\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Text -->\n",
2023-05-05 18:25:03 +02:00
" <text x=\"84.948598\" y=\"109.948598\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >1920</text>\n",
" <text x=\"164.948598\" y=\"52.448598\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,164.948598,52.448598)\">1200</text>\n",
" <text x=\"7.474299\" y=\"102.474299\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,7.474299,102.474299)\">3</text>\n",
2023-05-04 19:16:35 +02:00
"</svg>\n",
" </td>\n",
" </tr>\n",
2023-05-05 18:30:53 +02:00
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>shotNum</span></div><div class='xr-var-dims'>(runs)</div><div class='xr-var-dtype'>&lt;U1</div><div class='xr-var-preview xr-preview'>&#x27;0&#x27; &#x27;1&#x27; &#x27;2&#x27;</div><input id='attrs-d7106b32-c4ee-48d1-a6df-7ccea32e3347' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-d7106b32-c4ee-48d1-a6df-7ccea32e3347' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-faec6d1a-bc8c-413b-926b-03b6ec242669' class='xr-var-data-in' type='checkbox'><label for='data-faec6d1a-bc8c-413b-926b-03b6ec242669' 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([&#x27;0&#x27;, &#x27;1&#x27;, &#x27;2&#x27;], dtype=&#x27;&lt;U1&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>OD</span></div><div class='xr-var-dims'>(runs, x, y)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(1, 1200, 1920), meta=np.ndarray&gt;</div><input id='attrs-a84862bc-7f7c-4f9c-a55c-f3d86f57b069' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-a84862bc-7f7c-4f9c-a55c-f3d86f57b069' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9636ff42-7fff-431c-80c7-7107cf2f2880' class='xr-var-data-in' type='checkbox'><label for='data-9636ff42-7fff-431c-80c7-7107cf2f2880' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>IMAGE_SUBCLASS :</span></dt><dd>IMAGE_GRAYSCALE</dd><dt><span>IMAGE_VERSION :</span></dt><dd>1.2</dd><dt><span>IMAGE_WHITE_IS_ZERO :</span></dt><dd>0</dd></dl></div><div class='xr-var-data'><table>\n",
2023-05-04 19:16:35 +02:00
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
2023-05-05 18:25:03 +02:00
" <td> 52.73 MiB </td>\n",
2023-05-04 19:16:35 +02:00
" <td> 17.58 MiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
2023-05-05 18:25:03 +02:00
" <td> (3, 1200, 1920) </td>\n",
" <td> (1, 1200, 1920) </td>\n",
2023-05-04 19:16:35 +02:00
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
2023-05-05 18:25:03 +02:00
" <td colspan=\"2\"> 3 chunks in 40 graph layers </td>\n",
2023-05-04 19:16:35 +02:00
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float64 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
2023-05-05 18:25:03 +02:00
" <svg width=\"194\" height=\"139\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Horizontal lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"10\" y1=\"0\" x2=\"24\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"10\" y1=\"75\" x2=\"24\" y2=\"89\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Vertical lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"10\" y1=\"0\" x2=\"10\" y2=\"75\" style=\"stroke-width:2\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"14\" y2=\"79\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"19\" y2=\"84\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"89\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Colored Rectangle -->\n",
2023-05-05 18:25:03 +02:00
" <polygon points=\"10.0,0.0 24.9485979497544,14.948597949754403 24.9485979497544,89.9485979497544 10.0,75.0\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Horizontal lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"10\" y1=\"0\" x2=\"130\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"134\" y2=\"4\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"139\" y2=\"9\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Vertical lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"10\" y1=\"0\" x2=\"24\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"130\" y1=\"0\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Colored Rectangle -->\n",
2023-05-05 18:25:03 +02:00
" <polygon points=\"10.0,0.0 130.0,0.0 144.9485979497544,14.948597949754403 24.9485979497544,14.948597949754403\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Horizontal lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"24\" y1=\"14\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"24\" y1=\"89\" x2=\"144\" y2=\"89\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Vertical lines -->\n",
2023-05-05 18:25:03 +02:00
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"89\" style=\"stroke-width:2\" />\n",
" <line x1=\"144\" y1=\"14\" x2=\"144\" y2=\"89\" style=\"stroke-width:2\" />\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Colored Rectangle -->\n",
2023-05-05 18:25:03 +02:00
" <polygon points=\"24.9485979497544,14.948597949754403 144.9485979497544,14.948597949754403 144.9485979497544,89.9485979497544 24.9485979497544,89.9485979497544\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
2023-05-04 19:16:35 +02:00
"\n",
" <!-- Text -->\n",
2023-05-05 18:25:03 +02:00
" <text x=\"84.948598\" y=\"109.948598\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >1920</text>\n",
" <text x=\"164.948598\" y=\"52.448598\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,164.948598,52.448598)\">1200</text>\n",
" <text x=\"7.474299\" y=\"102.474299\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,7.474299,102.474299)\">3</text>\n",
2023-05-04 19:16:35 +02:00
"</svg>\n",
" </td>\n",
" </tr>\n",
2023-05-05 18:30:53 +02:00
"</table></div></li></ul></div></li><li class='xr-section-item'><input id='section-e696e9f1-4baf-45c9-ab7c-458d3f0789f9' class='xr-section-summary-in' type='checkbox' ><label for='section-e696e9f1-4baf-45c9-ab7c-458d3f0789f9' class='xr-section-summary' >Indexes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>runs</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-098e9109-f59c-4f3c-a636-dfe8213dd0f6' class='xr-index-data-in' type='checkbox'/><label for='index-098e9109-f59c-4f3c-a636-dfe8213dd0f6' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Float64Index([0.0, 1.0, 2.0], dtype=&#x27;float64&#x27;, name=&#x27;runs&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-205bc30d-356c-4ea8-add8-ae25484a1314' class='xr-section-summary-in' type='checkbox' ><label for='section-205bc30d-356c-4ea8-add8-ae25484a1314' class='xr-section-summary' >Attributes: <span>(101)</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.015</dd><dt><span>abs_img_freq :</span></dt><dd>110.858</dd><dt><span>absorption_imaging_flag :</span></dt><dd>True</dd><dt><span>backup_data :</span></dt><dd>True</dd><dt><span>blink_off_time :</span></dt><dd>nan</dd><dt><span>blink_on_time :</span></dt><dd>nan</dd><dt><span>c_duration :</span></dt><dd>0.2</dd><dt><span>cmot_final_current :</span></dt><dd>0.65</dd><dt><span>cmot_hold :</span></dt><dd>0.06</dd><dt><span>cmot_initial_current :</span></dt><dd>0.18</dd><dt><span>compX_current :</span></dt><dd>0.005</dd><dt><span>compX_current_sg :</span></dt><dd>0</dd><dt><span>compX_final_current :</span></dt><dd>0.005</dd><dt><span>compX_initial_current :</span></dt><dd>0.005</dd><dt><span>compY_current :</span></dt><dd>0</dd><dt><span>compY_current_sg :</span></dt><dd>0</dd><dt><span>compY_final_current :</span></dt><dd>0.0</dd><dt><span>compY_initial_current :</span></dt><dd>0</dd><dt><span>compZ_current :</span></dt><dd>0</dd><dt><span>compZ_current_sg :</span></dt><dd>0.189</dd><dt><span>compZ_final_current :</span></dt><dd>0.275</dd><dt><span>compZ_initial_current :</span></dt><dd>0</dd><dt><span>default_camera :</span></dt><dd>0</dd><dt><span>evap_1_arm_1_final_pow :</span></dt><dd>0.35</dd><dt><span>evap_1_arm_1_mod_depth_final :</span></dt><dd>0</dd><dt><span>evap_1_arm_1_mod_depth_initial :</span></dt><dd>1.0</dd><dt><span>evap_1_arm_1_mod_ramp_duration :</span></dt><dd>1.15</dd><dt><span>evap_1_arm_1_pow_ramp_duration :</span></dt><dd>1.65</dd><dt><span>evap_1_arm_1_start_pow :</span></dt><dd>7</dd><dt><span>evap_1_arm_2_final_pow :</span></dt><dd>5</dd><dt><span>evap_1_arm_2_ramp_duration :</span></dt><dd>0.5</dd><dt><span>evap_1_arm_2_start_pow :</span></dt><dd>0</dd><dt><span>evap_1_mod_ramp_trunc_value :</span></dt><dd>1</dd><dt><span>evap_1_pow_ramp_trunc_value :</span></dt><dd>1.0</dd><dt><span>evap_1_rate_constant_1 :</span></dt><dd>0.525</dd><dt><span>evap_1_rate_constant_2 :</span></dt><dd>0.51</dd><dt><span>evap_2_arm_1_final_pow :</span></dt><dd>0.037</dd><dt><span>evap_2_arm_1_start_pow :</span></dt><dd>0.35</dd><dt><span>evap_2_arm_2_final_pow :</span></dt><dd>0.09</dd><dt><span>evap_2_arm_2_start_pow :</span></dt><dd>5</dd><dt><span>evap_2_ramp_duration :</span></dt><dd>1.0</dd><dt><span>evap_2_ramp_trunc_value :</span></dt><dd>1</dd><dt><span>evap_2_rate_constant_1 :</span></dt><dd>0.37</dd><dt><span>evap_2_rate_constant_2 :</span></dt><dd>0.71</dd><dt><span>evap_3_arm_1_final_pow :</span></dt><dd>0.1038</dd><dt><span>evap_3_arm_1_mod_depth_final :</span></dt><dd>0.43</dd><dt><span>evap_3_arm_1_mod_depth_initial :</span></dt><dd>0</dd><dt><span>evap_3_arm_1_start_pow :</span></dt><dd>0.037</dd><dt><span>evap_3_ramp_duration :</span></dt><dd>0.1</dd><dt><span>evap_3_ramp_trunc_
2023-05-04 19:16:35 +02:00
],
"text/plain": [
"<xarray.Dataset>\n",
2023-05-05 18:25:03 +02:00
"Dimensions: (runs: 3, x: 1200, y: 1920)\n",
2023-05-04 19:16:35 +02:00
"Coordinates:\n",
" * runs (runs) float64 0.0 1.0 2.0\n",
"Dimensions without coordinates: x, y\n",
"Data variables:\n",
2023-05-05 18:25:03 +02:00
" atoms (runs, x, y) uint16 dask.array<chunksize=(1, 1200, 1920), meta=np.ndarray>\n",
" background (runs, x, y) uint16 dask.array<chunksize=(1, 1200, 1920), meta=np.ndarray>\n",
" dark (runs, x, y) uint16 dask.array<chunksize=(1, 1200, 1920), meta=np.ndarray>\n",
" shotNum (runs) <U1 '0' '1' '2'\n",
" OD (runs, x, y) float64 dask.array<chunksize=(1, 1200, 1920), meta=np.ndarray>\n",
"Attributes: (12/101)\n",
" TOF_free: 0.015\n",
2023-05-04 19:16:35 +02:00
" abs_img_freq: 110.858\n",
" absorption_imaging_flag: True\n",
" backup_data: True\n",
" blink_off_time: nan\n",
" blink_on_time: nan\n",
" ... ...\n",
2023-05-05 18:25:03 +02:00
" y_offset_img: 0\n",
2023-05-04 19:16:35 +02:00
" z_offset: 0.189\n",
" z_offset_img: 0.189\n",
2023-05-05 18:25:03 +02:00
" runs: [0. 1. 2.]\n",
" scanAxis: ['runs']\n",
" scanAxisLength: [3.]"
2023-05-04 19:16:35 +02:00
]
},
2023-05-05 18:25:03 +02:00
"execution_count": 6,
2023-05-04 19:16:35 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"dataSet"
]
},
2023-05-05 18:25:03 +02:00
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Select region of interests"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"imageAnalyser.center = (529, 962)\n",
"imageAnalyser.span = (100,100)\n",
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"# imageAnalyser.center = (890, 1150)\n",
"# imageAnalyser.span = (600,600)\n",
"# imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"# imageAnalyser.center = (890, 950)\n",
"# imageAnalyser.span = (100,100)\n",
"# imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_crop = imageAnalyser.crop_image(dataSet)"
]
},
2023-05-04 19:16:35 +02:00
{
"cell_type": "code",
2023-05-05 18:25:03 +02:00
"execution_count": 8,
2023-05-04 19:16:35 +02:00
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
2023-05-05 18:30:53 +02:00
"<xarray.plot.facetgrid.FacetGrid at 0x1f9211122b0>"
2023-05-04 19:16:35 +02:00
]
},
2023-05-05 18:25:03 +02:00
"execution_count": 8,
2023-05-04 19:16:35 +02:00
"metadata": {},
"output_type": "execute_result"
2023-05-05 18:25:03 +02:00
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA5EAAAEiCAYAAABgE1ZNAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOx9e7xWU/7/+6mmhFQ0EsXpK5JkRIPGpNNXLg0h+rpOOWiGMigMNcYktzCuY9QwjEOuv8m1MQ0yHRNiXGIMuU6HcIyJVGhK9fz+2J/P2u+9ns9ZZz+nQ6X1fr3Oa+1nrbXXXnvttdbe5/P+XArFYrGIiIiIiIiIiIiIiIiIiIgcaLamOxARERERERERERERERGx7iD+ExkRERERERERERERERGRG/GfyIiIiIiIiIiIiIiIiIjciP9ERkRERERERERERERERORG/CcyIiIiIiIiIiIiIiIiIjfiP5ERERERERERERERERERuRH/iYyIiIiIiIiIiIiIiIjIjfhPZERERERERERERERERERuxH8iIyIiIiIiIiIiIiIiInIj/hMZERERERERERERERERkRvxn8iI9RLFYhHnn38+ttxyS7Ru3RqVlZV49dVXGzzv3nvvxY477ohWrVphxx13xP333/8N9DYiImJ1cN9992H//fdHhw4dUCgU8NJLL+U6L673iIh1B1999RXOOecc9OrVCxtttBG23HJLDB8+HB9++GGD58a1HhFRPuI/kRGNxvLly9d0FxqNyy+/HFdddRV++9vf4rnnnsMWW2yBfffdF0uWLKn3nNmzZ+PII4/EsGHD8PLLL2PYsGE44ogj8Oyzz36DPY+IWDNYl9f7F198gb322guXXnpp7nPieo9YX7GurvUvv/wSL774Is477zy8+OKLuO+++/Dmm2/i4IMPDp4X13pERCNRjIjIif79+xdPOeWU4pgxY4qbbbZZce+99y7OmzevCKA4Z84cV2/hwoVFAMWZM2cWi8VicebMmUUAxRkzZhR32223YuvWrYt9+/Ytvv766+6cl156qVhZWVnceOONi23atCnuuuuuxeeee+5ruY9Vq1YVt9hii+Kll17q8v773/8W27ZtW/zd735X73lHHHFE8YADDsjk7b///sWjjjrqa+lnRMSaxLdlvTOs/teHuN4j1hd8G9e64u9//3sRQPHdd9+tt05c6xERjUNkIiPKwq233ooWLVrgqaeewg033FDWueeeey6uvPJKPP/882jRogVOOOEEV3bssceic+fOeO655/DCCy9g7Nix+M53vlNvW4MGDcLGG28c/KsP8+bNw0cffYT99tvP5bVq1Qr9+/fH008/Xe95s2fPzpwDAPvvv3/wnIiIdRnfhvXeWMT1HrE+4du61hctWoRCoYB27drVWyeu9YiIxqHFmu5AxLqFbt264fLLL3e/a2trc5978cUXo3///gCAsWPH4sADD8R///tfbLDBBnjvvffw85//HDvssAMAYLvttgu2ddNNN2Hp0qXl3wCAjz76CADQsWPHTH7Hjh3x7rvvBs+zztH2IiK+bfg2rPfGIq73iPUJ38a1/t///hdjx47FMcccg0022aTeenGtR0Q0DvGfyIiy0KdPn0afu/POO7vjTp06AQA+/vhjbL311jjjjDMwYsQITJkyBQMHDsT//d//Ydttt623ra222qrR/VAUCoXM72KxWJLXFOdERKyr+Dat98YgrveI9QXftrX+1Vdf4aijjsKqVaswadKkBuvHtR4RUT6iOmtEWdhoo40yv5s1S6ZQsVh0eV999ZV5Lquw6Oa8atUqAMD555+PV199FQceeCD++te/NugdbXVUXrbYYgsAKJEyfvzxxyXSSP+8cs+JiFiX8W1Y741FXO8R6xO+TWv9q6++whFHHIF58+bhscceC7KQQFzrERGNRWQiI1YL3/3udwEAdXV16N27NwDkdp/vY/vtt8f222+PMWPG4Oijj8Ytt9yCIUOGmHVXR+Wla9eu2GKLLfDYY4+5Pi9fvhxPPPEELrvssnrP69u3Lx577DGMGTPG5T366KP4wQ9+0Kh+RESsa1gX13tjEdd7xPqMdXWt6z+Qb731FmbOnInNNtuswXPiWo+IaBziP5ERq4XWrVtjzz33xKWXXoqKigosWLAAv/zlL8tqY+nSpfj5z3+OoUOHomvXrnj//ffx3HPP4fDDD6/3nNVReSkUChg9ejQuueQSbLfddthuu+1wySWXYMMNN8Qxxxzj6g0fPhxbbbUVJk6cCAA4/fTTsffee+Oyyy7DIYccggcffBAzZszAk08+2ei+RESsS1gX1zsAfPrpp3jvvfdcvLg33ngDQMJAqGZCXO8RESnWxbW+YsUKDB06FC+++CL+9Kc/YeXKlY5h3HTTTdGyZUsAca1HRDQVojprxGrjD3/4A7766iv06dMHp59+Oi666KKyzm/evDk++eQTDB8+HNtvvz2OOOIIDBo0CBMmTPiaegycffbZGD16NEaNGoU+ffrggw8+wKOPPoo2bdq4Ou+99x7q6urc7x/84Ae4++67ccstt2DnnXdGdXU17rnnHuyxxx5fWz8jItY2rIvr/aGHHkLv3r1x4IEHAgCOOuoo9O7dG7/73e9cnbjeIyKyWNfW+vvvv4+HHnoI77//PnbZZRd06tTJ/bGn1bjWIyKaBoUiK7xHRERERERERERERERERAQQmciIiIiIiIiIiIiIiIiI3Ij/REZERERERERERERERETkRvwnMiIiIiIiIiIiIiIiIiI34j+REREREREREREREREREbkR/4mMiIiIiIiIiIiIiIiIyI34T2REREREREREREREREREbrRY0x34urFq1Sp8+OGHaNOmDQqFwpruTkRERADFYhFLlizBlltuiWbNypNxxbUeEbHuYHXWOhDXe0TEuoLVXetrErW1tZmYoiHsvvvuaN68+dfco7UL3/o4ke+//z66dOmyprsRERFRBubPn4/OnTuXdU5c6xER6x4as9aBuN4jItY1NHatr0lssskmWLVkSYNqm0sBXPWb3+DUU0/9Jrq11uBbz0S2adNGjsYAOJRKpns1TzLOvoGOT5T05sDVtM4GadY2myTpu88nabs+adkjku4x0WjrfyT9l6SD06INdkrS/95L9beR9DH5OS4tetdq38fWct6xdN49Xh/4ctL+u4sp8/okGShlM/i62p88fQmgOd3Xysa2FejL/0jZv8pte2sj7z1tlPKMsXTQOajzjtt8D/nxQzru6bXJ8OfY6sBvK+89D5f0NkmXAbia1m1+ZNd6KwD7yu/HqJb/7E9Mi3bePEn/YT17fRaVkrZOi/5n0yTVOfPPn6dlOz0oB2/W3/G+NKdnSxubSt6nZc7DreS8D4zzdpayzP0NknR6A/UU8lxPOrK06AbdL3Qv2p4L6+sx0r1tGuXtKekzRv1jJL2z/ibd/hQaP3r2bl/XZ8HXlX9Ujt0qzbrjY+88fn9499qOnu9n8h5wc5LP0zkyU9J9qYznsIdDpP0HjXsNlR0gZX+x9uk7JC1n3wHS+QSkc6q+fabxax2w1rtA19Pscvdw2Yv6yXOelfd84/7ukj4cfW9JbWCApPpMrf3RekeNTpIjZe+5p4H+VUobNaF61h6ZB7q2A/tagzgiSZpvm6Qr36Cy+7J18P8C7dD6cp9pjf02OIKOda2W+X4s+f7hddxJ0tvSLP2muV1+H0/V9XNM7+cAute/+PdIZTpvzpa8yz+gsq2ydUyMK83qKOm/+Tx9Lza0T6zeWl+TWLJkCX4OoG0D9aYCWLx4cQO1vn341jORixcvRtu2bYHzFmHjsctd/ucbXZ+t2Ht8ejznWTn4S5rXY3ymOuZOyNkD75/P9tTOQr+NHej49fqb1DYW3kOZgfolH2ndqOztJLlY2jzXuK++Ujabys6SvCusPug95h2jEH4h6SWS0odc7xFJOoeuM0auffVTktGD2pKPmn6yM896lsr0WfeXdFcqu9rr0zZ0/K6X9y6V6Ti/jRK4Z0h97yJ58zXvAKN/AYyU839PeSu0Le7zd+rvl6KDtLWAn6G2sZ2
"text/plain": [
"<Figure size 1000x300 with 4 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
2023-05-04 19:16:35 +02:00
}
],
2023-05-04 13:47:33 +02:00
"source": [
2023-05-05 18:25:03 +02:00
"# dataSet_crop.OD.isel(runs=[0]).plot.pcolormesh(cmap='jet', vmin=0, col=scanAxis[0], row=scanAxis[1])\n",
"dataSet_crop.OD.plot.pcolormesh(cmap='jet', vmin=0, col=scanAxis[0])"
2023-05-04 13:47:33 +02:00
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
2023-05-05 18:25:03 +02:00
"## Remove the background"
2023-05-04 13:47:33 +02:00
]
},
{
"cell_type": "code",
2023-05-05 18:25:03 +02:00
"execution_count": 9,
2023-05-04 13:47:33 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-05-05 18:25:03 +02:00
"dataSet_crop['OD'] = dataSet_crop['OD'] + 500"
2023-05-04 13:47:33 +02:00
]
},
{
"cell_type": "code",
2023-05-05 18:25:03 +02:00
"execution_count": 10,
2023-05-04 13:47:33 +02:00
"metadata": {},
2023-05-04 18:32:17 +02:00
"outputs": [],
2023-04-24 13:03:23 +02:00
"source": [
2023-05-05 18:25:03 +02:00
"dataSet_crop['OD'] = imageAnalyser.substract_offset(dataSet_crop['OD'])"
2023-05-04 13:47:33 +02:00
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
2023-05-05 18:25:03 +02:00
"# Test Fit"
2023-04-24 13:03:23 +02:00
]
},
{
"cell_type": "code",
2023-05-05 18:25:03 +02:00
"execution_count": 11,
2023-04-24 13:03:23 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-05-05 18:25:03 +02:00
"fitAnalyser = FitAnalyser(\"Two Gaussian-2D\", fitDim=2)\n",
"\n",
"params = fitAnalyser.guess(dataSet_crop.OD, dask=\"parallelized\")"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"fitResult = fitAnalyser.fit(dataSet_crop.OD, params, dask=\"parallelized\")# .load()"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"fitCurve = fitAnalyser.eval(fitResult, x=np.arange(100), y=np.arange(100), dask=\"parallelized\").load()"
2023-05-04 13:47:33 +02:00
]
},
{
"cell_type": "code",
2023-05-05 18:30:53 +02:00
"execution_count": 14,
2023-05-04 13:47:33 +02:00
"metadata": {},
2023-05-05 18:30:53 +02:00
"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.DataArray &#x27;OD&#x27; (runs: 3, x: 100, y: 100)&gt;\n",
"array([[[5.86966574e-10, 7.65249266e-10, 9.91509448e-10, ...,\n",
" 2.46154913e-11, 1.75761294e-11, 1.24721796e-11],\n",
" [9.42954541e-10, 1.22936348e-09, 1.59284766e-09, ...,\n",
" 3.95444823e-11, 2.82358344e-11, 2.00364022e-11],\n",
" [1.50191506e-09, 1.95810025e-09, 2.53704902e-09, ...,\n",
" 6.29854895e-11, 4.49733502e-11, 3.19134941e-11],\n",
" ...,\n",
" [2.54388919e-07, 3.31655910e-07, 4.29716150e-07, ...,\n",
" 1.06682535e-08, 7.61742276e-09, 5.40539175e-09],\n",
" [1.77937216e-07, 2.31983098e-07, 3.00573216e-07, ...,\n",
" 7.46211487e-09, 5.32815269e-09, 3.78090510e-09],\n",
" [1.23399279e-07, 1.60880043e-07, 2.08447221e-07, ...,\n",
" 5.17496911e-09, 3.69506849e-09, 2.62205386e-09]],\n",
"\n",
" [[9.02404312e-13, 1.36226913e-12, 2.03826777e-12, ...,\n",
" 2.07414123e-13, 1.32113406e-13, 8.34049874e-14],\n",
" [1.66705507e-12, 2.51658556e-12, 3.76539048e-12, ...,\n",
" 3.83166126e-13, 2.44059476e-13, 1.54078061e-13],\n",
" [3.04507755e-12, 4.59684767e-12, 6.87794078e-12, ...,\n",
" 6.99899236e-13, 4.45804128e-13, 2.81442200e-13],\n",
"...\n",
" [9.87414581e-10, 1.49060060e-09, 2.23028114e-09, ...,\n",
" 2.26953403e-10, 1.44559043e-10, 9.12620869e-11],\n",
" [6.10537300e-10, 9.21666828e-10, 1.37902544e-09, ...,\n",
" 1.40329625e-10, 8.93836181e-11, 5.64290919e-11],\n",
" [3.73271211e-10, 5.63490048e-10, 8.43110640e-10, ...,\n",
" 8.57949366e-11, 5.46474905e-11, 3.44997029e-11]],\n",
"\n",
" [[3.50772829e-03, 3.51239608e-03, 3.51706888e-03, ...,\n",
" 3.97151663e-03, 3.97641278e-03, 3.98131117e-03],\n",
" [3.50458735e-03, 3.50925410e-03, 3.51392671e-03, ...,\n",
" 3.96794908e-03, 3.97284066e-03, 3.97773453e-03],\n",
" [3.50066142e-03, 3.50532717e-03, 3.50999990e-03, ...,\n",
" 3.96348891e-03, 3.96837476e-03, 3.97326297e-03],\n",
" ...,\n",
" [1.12548401e-03, 1.12795860e-03, 1.13069623e-03, ...,\n",
" 1.27078253e-03, 1.27229756e-03, 1.27382711e-03],\n",
" [1.09950837e-03, 1.10175364e-03, 1.10420980e-03, ...,\n",
" 1.24207255e-03, 1.24356247e-03, 1.24506415e-03],\n",
" [1.07397978e-03, 1.07603161e-03, 1.07825160e-03, ...,\n",
" 1.21374189e-03, 1.21520532e-03, 1.21667822e-03]]])\n",
"Coordinates:\n",
" * runs (runs) float64 0.0 1.0 2.0\n",
"Dimensions without coordinates: x, y</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'OD'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>runs</span>: 3</li><li><span>x</span>: 100</li><li><span>y</span>: 100</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-eba7a8e2-c6af-44d9-acae-350fcf8f06c4' class='xr-array-in' type='checkbox' checked><label for='section-eba7a8e2-c6af-44d9-acae-350fcf8f06c4' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span>5.87e-10 7.652e-10 9.915e-10 1.277e-09 ... 0.001214 0.001215 0.001217</span></div><div class='xr-array-data'><pre>array([[[5.86966574e-10, 7.65249266e-10, 9.91509448e-10, ...,\n",
" 2.46154913e-11, 1.75761294e-11, 1.24721796e-11],\n",
" [9.42954541e-10, 1.22936348e-09, 1.59284766e-09, ...,\n",
" 3.95444823e-11, 2.82358344e-11, 2.00364022e-11],\n",
" [1.50191506e-09, 1.95810025e-09, 2.53704902e-09, ...,\n",
" 6.29854895e-11, 4.49733502e-11, 3.19134941e-11],\n",
" ...,\n",
" [2.54388919e-07, 3.31655910e-07, 4.29716150e-07, ...,\n",
" 1.06682535e-08, 7.61742276e-09, 5.40539175e-09],\n",
" [1.77937216e-07, 2.31983098e-07, 3.00573216e-07, ...,\n",
" 7.46211487e-09, 5.32815269e-09, 3.78090510e-09],\n",
" [1.23399279e-07, 1.60880043e-07, 2.08447221e-07, ...,\n",
" 5.17496911e-09, 3.69506849e-09, 2.62205386e-09]],\n",
"\n",
" [[9.02404312e-13, 1.36226913e-12, 2.03826777e-12, ...,\n",
" 2.07414123e-13, 1.32113406e-13, 8.34049874e-14],\n",
" [1.66705507e-12, 2.51658556e-12, 3.76539048e-12, ...,\n",
" 3.83166126e-13, 2.44059476e-13, 1.54078061e-13],\n",
" [3.04507755e-12, 4.59684767e-12, 6.87794078e-12, ...,\n",
" 6.99899236e-13, 4.45804128e-13, 2.81442200e-13],\n",
"...\n",
" [9.87414581e-10, 1.49060060e-09, 2.23028114e-09, ...,\n",
" 2.26953403e-10, 1.44559043e-10, 9.12620869e-11],\n",
" [6.10537300e-10, 9.21666828e-10, 1.37902544e-09, ...,\n",
" 1.40329625e-10, 8.93836181e-11, 5.64290919e-11],\n",
" [3.73271211e-10, 5.63490048e-10, 8.43110640e-10, ...,\n",
" 8.57949366e-11, 5.46474905e-11, 3.44997029e-11]],\n",
"\n",
" [[3.50772829e-03, 3.51239608e-03, 3.51706888e-03, ...,\n",
" 3.97151663e-03, 3.97641278e-03, 3.98131117e-03],\n",
" [3.50458735e-03, 3.50925410e-03, 3.51392671e-03, ...,\n",
" 3.96794908e-03, 3.97284066e-03, 3.97773453e-03],\n",
" [3.50066142e-03, 3.50532717e-03, 3.50999990e-03, ...,\n",
" 3.96348891e-03, 3.96837476e-03, 3.97326297e-03],\n",
" ...,\n",
" [1.12548401e-03, 1.12795860e-03, 1.13069623e-03, ...,\n",
" 1.27078253e-03, 1.27229756e-03, 1.27382711e-03],\n",
" [1.09950837e-03, 1.10175364e-03, 1.10420980e-03, ...,\n",
" 1.24207255e-03, 1.24356247e-03, 1.24506415e-03],\n",
" [1.07397978e-03, 1.07603161e-03, 1.07825160e-03, ...,\n",
" 1.21374189e-03, 1.21520532e-03, 1.21667822e-03]]])</pre></div></div></li><li class='xr-section-item'><input id='section-41bfe7f0-209f-434d-b762-d2862454b3c8' class='xr-section-summary-in' type='checkbox' checked><label for='section-41bfe7f0-209f-434d-b762-d2862454b3c8' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>runs</span></div><div class='xr-var-dims'>(runs)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0 1.0 2.0</div><input id='attrs-01b45c65-63bf-427f-a92b-bb35c69c87e2' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-01b45c65-63bf-427f-a92b-bb35c69c87e2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-afcfb646-ffe7-4784-ac4e-f8dee4ea31f8' class='xr-var-data-in' type='checkbox'><label for='data-afcfb646-ffe7-4784-ac4e-f8dee4ea31f8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0., 1., 2.])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-db81fade-7d92-44aa-8e1c-ea17b06e3799' class='xr-section-summary-in' type='checkbox' ><label for='section-db81fade-7d92-44aa-8e1c-ea17b06e3799' class='xr-section-summary' >Indexes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>runs</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-bf315149-6de3-48d8-8065-34c3d82bca69' class='xr-index-data-in' type='checkbox'/><label for='index-bf315149-6de3-48d8-8065-34c3d82bca69' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Float64Index([0.0, 1.0, 2.0], dtype=&#x27;float64&#x27;, name=&#x27;runs&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-5ed60a3a-817b-431d-ae92-be4cb8656f34' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-5ed60a3a-817b-431d-ae92-be4cb8656f34' class='xr-section-summary' title='Expand/collapse section'>Attributes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'></dl></div></li></ul></div></div>"
],
"text/plain": [
"<xarray.DataArray 'OD' (runs: 3, x: 100, y: 100)>\n",
"array([[[5.86966574e-10, 7.65249266e-10, 9.91509448e-10, ...,\n",
" 2.46154913e-11, 1.75761294e-11, 1.24721796e-11],\n",
" [9.42954541e-10, 1.22936348e-09, 1.59284766e-09, ...,\n",
" 3.95444823e-11, 2.82358344e-11, 2.00364022e-11],\n",
" [1.50191506e-09, 1.95810025e-09, 2.53704902e-09, ...,\n",
" 6.29854895e-11, 4.49733502e-11, 3.19134941e-11],\n",
" ...,\n",
" [2.54388919e-07, 3.31655910e-07, 4.29716150e-07, ...,\n",
" 1.06682535e-08, 7.61742276e-09, 5.40539175e-09],\n",
" [1.77937216e-07, 2.31983098e-07, 3.00573216e-07, ...,\n",
" 7.46211487e-09, 5.32815269e-09, 3.78090510e-09],\n",
" [1.23399279e-07, 1.60880043e-07, 2.08447221e-07, ...,\n",
" 5.17496911e-09, 3.69506849e-09, 2.62205386e-09]],\n",
"\n",
" [[9.02404312e-13, 1.36226913e-12, 2.03826777e-12, ...,\n",
" 2.07414123e-13, 1.32113406e-13, 8.34049874e-14],\n",
" [1.66705507e-12, 2.51658556e-12, 3.76539048e-12, ...,\n",
" 3.83166126e-13, 2.44059476e-13, 1.54078061e-13],\n",
" [3.04507755e-12, 4.59684767e-12, 6.87794078e-12, ...,\n",
" 6.99899236e-13, 4.45804128e-13, 2.81442200e-13],\n",
"...\n",
" [9.87414581e-10, 1.49060060e-09, 2.23028114e-09, ...,\n",
" 2.26953403e-10, 1.44559043e-10, 9.12620869e-11],\n",
" [6.10537300e-10, 9.21666828e-10, 1.37902544e-09, ...,\n",
" 1.40329625e-10, 8.93836181e-11, 5.64290919e-11],\n",
" [3.73271211e-10, 5.63490048e-10, 8.43110640e-10, ...,\n",
" 8.57949366e-11, 5.46474905e-11, 3.44997029e-11]],\n",
"\n",
" [[3.50772829e-03, 3.51239608e-03, 3.51706888e-03, ...,\n",
" 3.97151663e-03, 3.97641278e-03, 3.98131117e-03],\n",
" [3.50458735e-03, 3.50925410e-03, 3.51392671e-03, ...,\n",
" 3.96794908e-03, 3.97284066e-03, 3.97773453e-03],\n",
" [3.50066142e-03, 3.50532717e-03, 3.50999990e-03, ...,\n",
" 3.96348891e-03, 3.96837476e-03, 3.97326297e-03],\n",
" ...,\n",
" [1.12548401e-03, 1.12795860e-03, 1.13069623e-03, ...,\n",
" 1.27078253e-03, 1.27229756e-03, 1.27382711e-03],\n",
" [1.09950837e-03, 1.10175364e-03, 1.10420980e-03, ...,\n",
" 1.24207255e-03, 1.24356247e-03, 1.24506415e-03],\n",
" [1.07397978e-03, 1.07603161e-03, 1.07825160e-03, ...,\n",
" 1.21374189e-03, 1.21520532e-03, 1.21667822e-03]]])\n",
"Coordinates:\n",
" * runs (runs) float64 0.0 1.0 2.0\n",
"Dimensions without coordinates: x, y"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
2023-05-04 13:47:33 +02:00
"source": [
2023-05-05 18:25:03 +02:00
"fitCurve"
2023-05-04 13:47:33 +02:00
]
},
{
2023-05-05 18:25:03 +02:00
"cell_type": "code",
2023-05-05 18:30:53 +02:00
"execution_count": 15,
2023-05-04 13:47:33 +02:00
"metadata": {},
2023-05-05 18:25:03 +02:00
"outputs": [],
2023-05-04 13:47:33 +02:00
"source": [
2023-05-05 18:25:03 +02:00
"fitResult = fitAnalyser.fit(dataSet_crop.OD, params, dask=\"parallelized\").load()"
]
},
{
"cell_type": "code",
2023-05-05 18:30:53 +02:00
"execution_count": 16,
2023-05-05 18:25:03 +02:00
"metadata": {},
2023-05-05 18:30:53 +02:00
"outputs": [],
2023-05-05 18:25:03 +02:00
"source": [
2023-05-05 18:30:53 +02:00
"fitCurve = fitAnalyser.eval(fitResult, x=np.arange(100), y=np.arange(100), dask=\"parallelized\").load()"
2023-05-04 13:47:33 +02:00
]
},
{
"cell_type": "code",
2023-05-04 18:32:17 +02:00
"execution_count": null,
2023-05-04 13:47:33 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-05-05 18:25:03 +02:00
"auto_rechunk(fitResult)\n",
"fitResult"
2023-05-04 13:47:33 +02:00
]
},
{
"cell_type": "code",
2023-05-04 18:32:17 +02:00
"execution_count": null,
2023-05-04 13:47:33 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-05-05 18:25:03 +02:00
"# fitCurve.isel(**{scanAxis[0]:np.arange(30), 'runs':range(dataSet_crop.OD['runs'].size)}).plot.pcolormesh(cmap='jet', vmin=0, col=scanAxis[0], row=scanAxis[1])\n",
"\n",
"fitCurve.plot.pcolormesh(cmap='jet', vmin=0, col=scanAxis[0])"
2023-05-04 13:47:33 +02:00
]
},
{
"cell_type": "code",
2023-05-04 18:32:17 +02:00
"execution_count": null,
2023-05-04 13:47:33 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-05-05 18:25:03 +02:00
"fitResult.load()"
2023-05-04 13:47:33 +02:00
]
},
{
"cell_type": "code",
2023-05-04 18:32:17 +02:00
"execution_count": null,
2023-05-04 13:47:33 +02:00
"metadata": {},
2023-05-04 18:32:17 +02:00
"outputs": [],
2023-05-04 13:47:33 +02:00
"source": [
2023-05-05 18:25:03 +02:00
"def resolve_fit_result(fitResult):\n",
" \n",
" \n",
" \n",
" return"
2023-05-04 13:47:33 +02:00
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Get the Ncount"
]
},
{
"cell_type": "code",
2023-05-05 18:30:53 +02:00
"execution_count": 18,
2023-05-04 13:47:33 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-05-05 18:30:53 +02:00
"Ncount = dataSet_crop.OD.sum(dim=(scanAxis[0], 'x', 'y'))"
2023-05-04 13:47:33 +02:00
]
},
{
"cell_type": "code",
2023-05-05 18:30:53 +02:00
"execution_count": 19,
2023-05-04 13:47:33 +02:00
"metadata": {},
2023-05-05 18:30:53 +02:00
"outputs": [
{
"ename": "TypeError",
"evalue": "No numeric data to plot.",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32mf:\\Jianshun\\analyseScript\\test.ipynb Cell 33\u001b[0m in \u001b[0;36m5\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/test.ipynb#X36sZmlsZQ%3D%3D?line=2'>3</a>\u001b[0m fig \u001b[39m=\u001b[39m plt\u001b[39m.\u001b[39mfigure()\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/test.ipynb#X36sZmlsZQ%3D%3D?line=3'>4</a>\u001b[0m ax \u001b[39m=\u001b[39m fig\u001b[39m.\u001b[39mgca()\n\u001b[1;32m----> <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/test.ipynb#X36sZmlsZQ%3D%3D?line=4'>5</a>\u001b[0m Ncount\u001b[39m.\u001b[39;49mplot(ax\u001b[39m=\u001b[39;49max)\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\plot\\accessor.py:47\u001b[0m, in \u001b[0;36mDataArrayPlotAccessor.__call__\u001b[1;34m(self, **kwargs)\u001b[0m\n\u001b[0;32m 45\u001b[0m \u001b[39m@functools\u001b[39m\u001b[39m.\u001b[39mwraps(dataarray_plot\u001b[39m.\u001b[39mplot, assigned\u001b[39m=\u001b[39m(\u001b[39m\"\u001b[39m\u001b[39m__doc__\u001b[39m\u001b[39m\"\u001b[39m, \u001b[39m\"\u001b[39m\u001b[39m__annotations__\u001b[39m\u001b[39m\"\u001b[39m))\n\u001b[0;32m 46\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39m__call__\u001b[39m(\u001b[39mself\u001b[39m, \u001b[39m*\u001b[39m\u001b[39m*\u001b[39mkwargs) \u001b[39m-\u001b[39m\u001b[39m>\u001b[39m Any:\n\u001b[1;32m---> 47\u001b[0m \u001b[39mreturn\u001b[39;00m dataarray_plot\u001b[39m.\u001b[39mplot(\u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_da, \u001b[39m*\u001b[39m\u001b[39m*\u001b[39mkwargs)\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\plot\\dataarray_plot.py:279\u001b[0m, in \u001b[0;36mplot\u001b[1;34m(darray, row, col, col_wrap, ax, hue, subplot_kws, **kwargs)\u001b[0m\n\u001b[0;32m 276\u001b[0m plotfunc: Callable\n\u001b[0;32m 278\u001b[0m \u001b[39mif\u001b[39;00m ndims \u001b[39m==\u001b[39m \u001b[39m0\u001b[39m \u001b[39mor\u001b[39;00m darray\u001b[39m.\u001b[39msize \u001b[39m==\u001b[39m \u001b[39m0\u001b[39m:\n\u001b[1;32m--> 279\u001b[0m \u001b[39mraise\u001b[39;00m \u001b[39mTypeError\u001b[39;00m(\u001b[39m\"\u001b[39m\u001b[39mNo numeric data to plot.\u001b[39m\u001b[39m\"\u001b[39m)\n\u001b[0;32m 280\u001b[0m \u001b[39mif\u001b[39;00m ndims \u001b[39min\u001b[39;00m (\u001b[39m1\u001b[39m, \u001b[39m2\u001b[39m):\n\u001b[0;32m 281\u001b[0m \u001b[39mif\u001b[39;00m row \u001b[39mor\u001b[39;00m col:\n",
"\u001b[1;31mTypeError\u001b[0m: No numeric data to plot."
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAi4AAAGiCAYAAADA0E3hAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAcu0lEQVR4nO3db2yV5f348U9paaturRG0FkEEpxMl6mgDo6wandag0ZBskcVF1GliszmETqeMRYYxaXTRfXUKbgoaE3REReeDztEHG1Zxf2DFGCFxEWZBW0kxtqhbGXD/Hhj6W9fiOLV/uNrXK7kfnMv7Puc6uazn7X2fP3lZlmUBAJCAMcM9AQCAIyVcAIBkCBcAIBnCBQBIhnABAJIhXACAZAgXACAZwgUASIZwAQCSIVwAgGTkHC6vvPJKXHnllTFhwoTIy8uLF1988X8es2HDhqioqIji4uKYOnVqPProo/2ZKwAwyuUcLp988kmcd9558fDDDx/R/jt27IjLL788qquro7m5OX7yk5/EwoUL4/nnn895sgDA6Jb3RX5kMS8vL1544YWYN2/eYfe544474qWXXopt27Z1j9XW1sYbb7wRr7/+en8fGgAYhQoG+wFef/31qKmp6TF22WWXxapVq+Lf//53jB07ttcxXV1d0dXV1X374MGD8eGHH8a4ceMiLy9vsKcMAAyALMti7969MWHChBgzZmDeVjvo4dLW1hZlZWU9xsrKymL//v3R3t4e5eXlvY6pr6+P5cuXD/bUAIAhsHPnzpg4ceKA3Negh0tE9DpLcujq1OHOnixZsiTq6uq6b3d0dMSpp54aO3fujJKSksGbKAAwYDo7O2PSpEnx5S9/ecDuc9DD5eSTT462trYeY7t3746CgoIYN25cn8cUFRVFUVFRr/GSkhLhAgCJGci3eQz697jMnj07Ghsbe4ytX78+Kisr+3x/CwDA4eQcLh9//HFs2bIltmzZEhGffdx5y5Yt0dLSEhGfXeZZsGBB9/61tbXx7rvvRl1dXWzbti1Wr14dq1atittuu21gngEAMGrkfKlo06ZNcdFFF3XfPvRelOuuuy6efPLJaG1t7Y6YiIgpU6ZEQ0NDLF68OB555JGYMGFCPPTQQ/Gtb31rAKYPAIwmX+h7XIZKZ2dnlJaWRkdHh/e4AEAiBuP1228VAQDJEC4AQDKECwCQDOECACRDuAAAyRAuAEAyhAsAkAzhAgAkQ7gAAMkQLgBAMoQLAJAM4QIAJEO4AADJEC4AQDKECwCQDOECACRDuAAAyRAuAEAyhAsAkAzhAgAkQ7gAAMkQLgBAMoQLAJAM4QIAJEO4AADJEC4AQDKECwCQDOECACRDuAAAyRAuAEAyhAsAkAzhAgAkQ7gAAMkQLgBAMoQLAJAM4QIAJEO4AADJEC4AQDKECwCQDOECACRDuAAAyRAuAEAyhAsAkAzhAgAkQ7gAAMkQLgBAMoQLAJAM4QIAJEO4AADJEC4AQDKECwCQDOECACRDuAAAyRAuAEAyhAsAkAzhAgAkQ7gAAMkQLgBAMoQLAJAM4QIAJEO4AADJEC4AQDKECwCQjH6Fy4oVK2LKlClRXFwcFRUV0dTU9Ln7r1mzJs4777w49thjo7y8PG644YbYs2dPvyYMAIxeOYfL2rVrY9GiRbF06dJobm6O6urqmDt3brS0tPS5/6uvvhoLFiyIG2+8Md5666149tln469//WvcdNNNX3jyAMDoknO4PPDAA3HjjTfGTTfdFNOmTYv/+7//i0mTJsXKlSv73P9Pf/pTnHbaabFw4cKYMmVKfOMb34ibb745Nm3a9IUnDwCMLjmFy759+2Lz5s1RU1PTY7ympiY2btzY5zFVVVWxa9euaGhoiCzL4oMPPojnnnsurrjiisM+TldXV3R2dvbYAAByCpf29vY4cOBAlJWV9RgvKyuLtra2Po+pqqqKNWvWxPz586OwsDBOPvnkOP744+OXv/zlYR+nvr4+SktLu7dJkyblMk0AYITq15tz8/LyetzOsqzX2CFbt26NhQsXxl133RWbN2+Ol19+OXbs2BG1tbWHvf8lS5ZER0dH97Zz587+TBMAGGEKctl5/PjxkZ+f3+vsyu7du3udhTmkvr4+5syZE7fffntERJx77rlx3HHHRXV1ddxzzz1RXl7e65iioqIoKirKZWoAwCiQ0xmXwsLCqKioiMbGxh7jjY2NUVVV1ecxn376aYwZ0/Nh8vPzI+KzMzUAAEcq50tFdXV18fjjj8fq1atj27ZtsXjx4mhpaem+9LNkyZJYsGBB9/5XXnllrFu3LlauXBnbt2+P1157LRYuXBgzZ86MCRMmDNwzAQBGvJwuFUVEzJ8/P/bs2RN33313tLa2xvTp06OhoSEmT54cERGtra09vtPl+uuvj71798bDDz8cP/rRj+L444+Piy++OO69996BexYAwKiQlyVwvaazszNKS0ujo6MjSkpKhns6AMARGIzXb79VBAAkQ7gAAMkQLgBAMoQLAJAM4QIAJEO4AADJEC4AQDKECwCQDOECACRDuAAAyRAuAEAyhAsAkAzhAgAkQ7gAAMkQLgBAMoQLAJAM4QIAJEO4AADJEC4AQDKECwCQDOECACRDuAAAyRAuAEAyhAsAkAzhAgAkQ7gAAMkQLgBAMoQLAJAM4QIAJEO4AADJEC4AQDKECwCQDOECACRDuAAAyRAuAEAyhAsAkAzhAgAkQ7gAAMkQLgBAMoQLAJAM4QIAJEO4AADJEC4AQDKECwCQDOECACRDuAAAyRAuAEAyhAsAkAzhAgAkQ7gAAMkQLgBAMoQLAJAM4QIAJEO4AADJEC4AQDKECwCQDOECACRDuAAAyRAuAEAyhAsAkAzhAgAkQ7gAAMkQLgBAMvoVLitWrIgpU6ZEcXFxVFRURFNT0+fu39XVFUuXLo3JkydHUVFRnH766bF69ep+TRgAGL0Kcj1g7dq1sWjRolixYkXMmTMnfvWrX8XcuXNj69atceqpp/Z5zNVXXx0ffPBBrFq1Kr7yla/E7t27Y//+/V948gDA6JKXZVmWywGzZs2KGTNmxMqVK7vHpk2bFvPmzYv6+vpe+7/88svxne98J7Zv3x4nnHBCvybZ2dkZpaWl0dHRESUlJf26DwBgaA3G63dOl4r27dsXmzdvjpqamh7jNTU1sXHjxj6Peemll6KysjLuu+++OOWUU+LMM8+M2267Lf75z38e9nG6urqis7OzxwYAkNOlovb29jhw4ECUlZX1GC8rK4u2trY+j9m+fXu8+uqrUVxcHC+88EK0t7fH97///fjwww8P+z6X+vr6WL58eS5TAwBGgX69OTcvL6/H7SzLeo0dcvDgwcjLy4s1a9bEzJkz4/LLL48HHnggnnzyycOedVmyZEl0dHR0bzt37uzPNAGAESanMy7jx4+P/Pz8XmdXdu/e3esszCHl5eVxyimnRGlpaffYtGnTIsuy2LVrV5xxxhm9jikqKoqioqJcpgYAjAI5nXEpLCyMioqKaGxs7DHe2NgYVVVVfR4zZ86ceP/99+Pjjz/uHnv77bdjzJgxMXHixH5MGQAYrXK+VFRXVxePP/54rF69OrZt2xaLFy+OlpaWqK2tjYjPLvMsWLCge/9rrrkmxo0bFzfccENs3bo1Xnnllbj99tvje9/7XhxzzDED90wAgBEv5+9xmT9/fuzZsyfuvvvuaG1tjenTp0dDQ0NMnjw5IiJaW1ujpaWle/8vfelL0djYGD/84Q+jsrIyxo0bF1dffXXcc889A/csAIBRIefvcRkOvscFANIz7N/jAgAwnIQLAJAM4QIAJEO4AADJEC4AQDKECwCQDOECACRDuAAAyRAuAEAyhAsAkAzhAgAkQ7gAAMkQLgBAMoQLAJAM4QIAJEO4AADJEC4AQDKECwCQDOECACRDuAAAyRAuAEAyhAsAkAzhAgAkQ7gAAMkQLgBAMoQLAJAM4QIAJEO4AADJEC4AQDKECwCQDOECACRDuAAAyRAuAEAyhAsAkAzhAgAkQ7gAAMkQLgBAMoQLAJAM4QIAJEO4AADJEC4AQDKECwCQDOECACR
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-05-04 13:47:33 +02:00
"source": [
2023-05-05 18:25:03 +02:00
"Ncount.load()\n",
"\n",
2023-05-04 18:32:17 +02:00
"fig = plt.figure()\n",
2023-05-05 18:25:03 +02:00
"ax = fig.gca()\n",
"Ncount.plot(ax=ax)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"fitAnalyser = FitAnalyser(\"Lorentzian With Offset\")\n",
"params = fitAnalyser.guess(Ncount, x='sin_mod_freq', dask=\"parallelized\", guess_kwargs=dict(negative=True))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"fitResult = fitAnalyser.fit(Ncount, params, x='sin_mod_freq', dask=\"parallelized\")\n",
"fitCurve = fitAnalyser.eval(fitResult, x=np.arange(40), dask=\"parallelized\").load()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"plt.errorbar([1], [1], yerr=[1])"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"fitCurve.plot.errorbar(yerr=fitCurve)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"np.ufunc(fitCurve)"
2023-04-24 13:03:23 +02:00
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
2023-05-04 13:47:33 +02:00
"display_name": "env",
2023-04-24 13:03:23 +02:00
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
2023-05-04 18:32:17 +02:00
"version": "3.9.13"
2023-04-24 13:03:23 +02:00
},
2023-05-04 13:47:33 +02:00
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "c05913ad4f24fdc6b2418069394dc5835b1981849b107c9ba6df693aafd66650"
}
}
2023-04-24 13:03:23 +02:00
},
"nbformat": 4,
"nbformat_minor": 2
}