729 lines
291 KiB
Plaintext
729 lines
291 KiB
Plaintext
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"# Import supporting package"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 1,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"import copy\n",
|
||
|
"import glob\n",
|
||
|
"from datetime import datetime\n",
|
||
|
"\n",
|
||
|
"# The package for data structure\n",
|
||
|
"import xarray as xr\n",
|
||
|
"import pandas as pd\n",
|
||
|
"import numpy as np\n",
|
||
|
"\n",
|
||
|
"# The packages for working with uncertainties\n",
|
||
|
"from uncertainties import ufloat\n",
|
||
|
"from uncertainties import unumpy as unp\n",
|
||
|
"from uncertainties import umath\n",
|
||
|
"\n",
|
||
|
"# The package for plotting\n",
|
||
|
"import matplotlib.pyplot as plt\n",
|
||
|
"plt.rcParams['font.size'] = 18 # Set the global font size\n",
|
||
|
"\n",
|
||
|
"# -------------- The modules written by us --------------\n",
|
||
|
"\n",
|
||
|
"# The packages for read data\n",
|
||
|
"from DataContainer.ReadData import read_hdf5_file, read_hdf5_global, read_hdf5_run_time, read_csv_file\n",
|
||
|
"\n",
|
||
|
"# The packages for data analysis\n",
|
||
|
"from Analyser.ImagingAnalyser import ImageAnalyser\n",
|
||
|
"from Analyser.FitAnalyser import FitAnalyser\n",
|
||
|
"from Analyser.FitAnalyser import ThomasFermi2dModel, DensityProfileBEC2dModel, Polylog22dModel\n",
|
||
|
"from Analyser.FFTAnalyser import fft, ifft, fft_nutou\n",
|
||
|
"from ToolFunction.ToolFunction import *\n",
|
||
|
"\n",
|
||
|
"# Add errorbar plot to xarray package\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"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## Start a client for parallel computing"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 2,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stderr",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"C:\\Users\\data\\AppData\\Roaming\\Python\\Python39\\site-packages\\distributed\\node.py:182: UserWarning: Port 8787 is already in use.\n",
|
||
|
"Perhaps you already have a cluster running?\n",
|
||
|
"Hosting the HTTP server on port 51790 instead\n",
|
||
|
" warnings.warn(\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<div>\n",
|
||
|
" <div style=\"width: 24px; height: 24px; background-color: #e1e1e1; border: 3px solid #9D9D9D; border-radius: 5px; position: absolute;\"> </div>\n",
|
||
|
" <div style=\"margin-left: 48px;\">\n",
|
||
|
" <h3 style=\"margin-bottom: 0px;\">Client</h3>\n",
|
||
|
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">Client-a82de88e-4360-11ee-8620-80e82ce2fa8e</p>\n",
|
||
|
" <table style=\"width: 100%; text-align: left;\">\n",
|
||
|
"\n",
|
||
|
" <tr>\n",
|
||
|
" \n",
|
||
|
" <td style=\"text-align: left;\"><strong>Connection method:</strong> Cluster object</td>\n",
|
||
|
" <td style=\"text-align: left;\"><strong>Cluster type:</strong> distributed.LocalCluster</td>\n",
|
||
|
" \n",
|
||
|
" </tr>\n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:51790/status\" target=\"_blank\">http://127.0.0.1:51790/status</a>\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\"></td>\n",
|
||
|
" </tr>\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
" </table>\n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
" <details>\n",
|
||
|
" <summary style=\"margin-bottom: 20px;\"><h3 style=\"display: inline;\">Cluster Info</h3></summary>\n",
|
||
|
" <div class=\"jp-RenderedHTMLCommon jp-RenderedHTML jp-mod-trusted jp-OutputArea-output\">\n",
|
||
|
" <div style=\"width: 24px; height: 24px; background-color: #e1e1e1; border: 3px solid #9D9D9D; border-radius: 5px; position: absolute;\">\n",
|
||
|
" </div>\n",
|
||
|
" <div style=\"margin-left: 48px;\">\n",
|
||
|
" <h3 style=\"margin-bottom: 0px; margin-top: 0px;\">LocalCluster</h3>\n",
|
||
|
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">b0309709</p>\n",
|
||
|
" <table style=\"width: 100%; text-align: left;\">\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Dashboard:</strong> <a href=\"http://127.0.0.1:51790/status\" target=\"_blank\">http://127.0.0.1:51790/status</a>\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Workers:</strong> 8\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Total threads:</strong> 128\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Total memory:</strong> 149.01 GiB\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" \n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\"><strong>Status:</strong> running</td>\n",
|
||
|
" <td style=\"text-align: left;\"><strong>Using processes:</strong> True</td>\n",
|
||
|
"</tr>\n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
" </table>\n",
|
||
|
"\n",
|
||
|
" <details>\n",
|
||
|
" <summary style=\"margin-bottom: 20px;\">\n",
|
||
|
" <h3 style=\"display: inline;\">Scheduler Info</h3>\n",
|
||
|
" </summary>\n",
|
||
|
"\n",
|
||
|
" <div style=\"\">\n",
|
||
|
" <div>\n",
|
||
|
" <div style=\"width: 24px; height: 24px; background-color: #FFF7E5; border: 3px solid #FF6132; border-radius: 5px; position: absolute;\"> </div>\n",
|
||
|
" <div style=\"margin-left: 48px;\">\n",
|
||
|
" <h3 style=\"margin-bottom: 0px;\">Scheduler</h3>\n",
|
||
|
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">Scheduler-8c45e3c6-5e56-4934-9b80-ffb66dbb2ee7</p>\n",
|
||
|
" <table style=\"width: 100%; text-align: left;\">\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Comm:</strong> tcp://127.0.0.1:51793\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Workers:</strong> 8\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Dashboard:</strong> <a href=\"http://127.0.0.1:51790/status\" target=\"_blank\">http://127.0.0.1:51790/status</a>\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Total threads:</strong> 128\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Started:</strong> Just now\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Total memory:</strong> 149.01 GiB\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" </table>\n",
|
||
|
" </div>\n",
|
||
|
" </div>\n",
|
||
|
"\n",
|
||
|
" <details style=\"margin-left: 48px;\">\n",
|
||
|
" <summary style=\"margin-bottom: 20px;\">\n",
|
||
|
" <h3 style=\"display: inline;\">Workers</h3>\n",
|
||
|
" </summary>\n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
" <div style=\"margin-bottom: 20px;\">\n",
|
||
|
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
|
||
|
" <div style=\"margin-left: 48px;\">\n",
|
||
|
" <details>\n",
|
||
|
" <summary>\n",
|
||
|
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 0</h4>\n",
|
||
|
" </summary>\n",
|
||
|
" <table style=\"width: 100%; text-align: left;\">\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Comm: </strong> tcp://127.0.0.1:51828\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Total threads: </strong> 16\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:51829/status\" target=\"_blank\">http://127.0.0.1:51829/status</a>\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Memory: </strong> 18.63 GiB\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Nanny: </strong> tcp://127.0.0.1:51796\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\"></td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td colspan=\"2\" style=\"text-align: left;\">\n",
|
||
|
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-pmppen6c\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
" </table>\n",
|
||
|
" </details>\n",
|
||
|
" </div>\n",
|
||
|
" </div>\n",
|
||
|
" \n",
|
||
|
" <div style=\"margin-bottom: 20px;\">\n",
|
||
|
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
|
||
|
" <div style=\"margin-left: 48px;\">\n",
|
||
|
" <details>\n",
|
||
|
" <summary>\n",
|
||
|
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 1</h4>\n",
|
||
|
" </summary>\n",
|
||
|
" <table style=\"width: 100%; text-align: left;\">\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Comm: </strong> tcp://127.0.0.1:51831\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Total threads: </strong> 16\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:51836/status\" target=\"_blank\">http://127.0.0.1:51836/status</a>\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Memory: </strong> 18.63 GiB\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Nanny: </strong> tcp://127.0.0.1:51797\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\"></td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td colspan=\"2\" style=\"text-align: left;\">\n",
|
||
|
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-95slox7z\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
" </table>\n",
|
||
|
" </details>\n",
|
||
|
" </div>\n",
|
||
|
" </div>\n",
|
||
|
" \n",
|
||
|
" <div style=\"margin-bottom: 20px;\">\n",
|
||
|
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
|
||
|
" <div style=\"margin-left: 48px;\">\n",
|
||
|
" <details>\n",
|
||
|
" <summary>\n",
|
||
|
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 2</h4>\n",
|
||
|
" </summary>\n",
|
||
|
" <table style=\"width: 100%; text-align: left;\">\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Comm: </strong> tcp://127.0.0.1:51834\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Total threads: </strong> 16\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:51841/status\" target=\"_blank\">http://127.0.0.1:51841/status</a>\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Memory: </strong> 18.63 GiB\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Nanny: </strong> tcp://127.0.0.1:51798\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\"></td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td colspan=\"2\" style=\"text-align: left;\">\n",
|
||
|
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-6qz0t11c\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
" </table>\n",
|
||
|
" </details>\n",
|
||
|
" </div>\n",
|
||
|
" </div>\n",
|
||
|
" \n",
|
||
|
" <div style=\"margin-bottom: 20px;\">\n",
|
||
|
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
|
||
|
" <div style=\"margin-left: 48px;\">\n",
|
||
|
" <details>\n",
|
||
|
" <summary>\n",
|
||
|
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 3</h4>\n",
|
||
|
" </summary>\n",
|
||
|
" <table style=\"width: 100%; text-align: left;\">\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Comm: </strong> tcp://127.0.0.1:51846\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Total threads: </strong> 16\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:51847/status\" target=\"_blank\">http://127.0.0.1:51847/status</a>\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Memory: </strong> 18.63 GiB\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Nanny: </strong> tcp://127.0.0.1:51799\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\"></td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td colspan=\"2\" style=\"text-align: left;\">\n",
|
||
|
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-9jpku9v2\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
" </table>\n",
|
||
|
" </details>\n",
|
||
|
" </div>\n",
|
||
|
" </div>\n",
|
||
|
" \n",
|
||
|
" <div style=\"margin-bottom: 20px;\">\n",
|
||
|
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
|
||
|
" <div style=\"margin-left: 48px;\">\n",
|
||
|
" <details>\n",
|
||
|
" <summary>\n",
|
||
|
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 4</h4>\n",
|
||
|
" </summary>\n",
|
||
|
" <table style=\"width: 100%; text-align: left;\">\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Comm: </strong> tcp://127.0.0.1:51833\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Total threads: </strong> 16\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:51840/status\" target=\"_blank\">http://127.0.0.1:51840/status</a>\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Memory: </strong> 18.63 GiB\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Nanny: </strong> tcp://127.0.0.1:51800\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\"></td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td colspan=\"2\" style=\"text-align: left;\">\n",
|
||
|
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-4z5_p9gi\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
" </table>\n",
|
||
|
" </details>\n",
|
||
|
" </div>\n",
|
||
|
" </div>\n",
|
||
|
" \n",
|
||
|
" <div style=\"margin-bottom: 20px;\">\n",
|
||
|
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
|
||
|
" <div style=\"margin-left: 48px;\">\n",
|
||
|
" <details>\n",
|
||
|
" <summary>\n",
|
||
|
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 5</h4>\n",
|
||
|
" </summary>\n",
|
||
|
" <table style=\"width: 100%; text-align: left;\">\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Comm: </strong> tcp://127.0.0.1:51832\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Total threads: </strong> 16\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:51837/status\" target=\"_blank\">http://127.0.0.1:51837/status</a>\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Memory: </strong> 18.63 GiB\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Nanny: </strong> tcp://127.0.0.1:51801\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\"></td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td colspan=\"2\" style=\"text-align: left;\">\n",
|
||
|
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-a22657kv\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
" </table>\n",
|
||
|
" </details>\n",
|
||
|
" </div>\n",
|
||
|
" </div>\n",
|
||
|
" \n",
|
||
|
" <div style=\"margin-bottom: 20px;\">\n",
|
||
|
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
|
||
|
" <div style=\"margin-left: 48px;\">\n",
|
||
|
" <details>\n",
|
||
|
" <summary>\n",
|
||
|
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 6</h4>\n",
|
||
|
" </summary>\n",
|
||
|
" <table style=\"width: 100%; text-align: left;\">\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Comm: </strong> tcp://127.0.0.1:51849\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Total threads: </strong> 16\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:51850/status\" target=\"_blank\">http://127.0.0.1:51850/status</a>\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Memory: </strong> 18.63 GiB\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Nanny: </strong> tcp://127.0.0.1:51802\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\"></td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td colspan=\"2\" style=\"text-align: left;\">\n",
|
||
|
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-snmu3b6e\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
" </table>\n",
|
||
|
" </details>\n",
|
||
|
" </div>\n",
|
||
|
" </div>\n",
|
||
|
" \n",
|
||
|
" <div style=\"margin-bottom: 20px;\">\n",
|
||
|
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
|
||
|
" <div style=\"margin-left: 48px;\">\n",
|
||
|
" <details>\n",
|
||
|
" <summary>\n",
|
||
|
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 7</h4>\n",
|
||
|
" </summary>\n",
|
||
|
" <table style=\"width: 100%; text-align: left;\">\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Comm: </strong> tcp://127.0.0.1:51835\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Total threads: </strong> 16\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:51843/status\" target=\"_blank\">http://127.0.0.1:51843/status</a>\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Memory: </strong> 18.63 GiB\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td style=\"text-align: left;\">\n",
|
||
|
" <strong>Nanny: </strong> tcp://127.0.0.1:51803\n",
|
||
|
" </td>\n",
|
||
|
" <td style=\"text-align: left;\"></td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <td colspan=\"2\" style=\"text-align: left;\">\n",
|
||
|
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-5g3s17vf\n",
|
||
|
" </td>\n",
|
||
|
" </tr>\n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
" </table>\n",
|
||
|
" </details>\n",
|
||
|
" </div>\n",
|
||
|
" </div>\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
" </details>\n",
|
||
|
"</div>\n",
|
||
|
"\n",
|
||
|
" </details>\n",
|
||
|
" </div>\n",
|
||
|
"</div>\n",
|
||
|
" </details>\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
" </div>\n",
|
||
|
"</div>"
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<Client: 'tcp://127.0.0.1:51793' processes=8 threads=128, memory=149.01 GiB>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 2,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"from dask.distributed import Client\n",
|
||
|
"client = Client(n_workers=8, threads_per_worker=16, processes=True, memory_limit='20GB')\n",
|
||
|
"client"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## Set global path for experiment"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 3,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"groupList = [\n",
|
||
|
" \"images/MOT_3D_Camera/in_situ_absorption\",\n",
|
||
|
" \"images/ODT_1_Axis_Camera/in_situ_absorption\",\n",
|
||
|
" \"images/ODT_2_Axis_Camera/in_situ_absorption\",\n",
|
||
|
"]\n",
|
||
|
"\n",
|
||
|
"dskey = {\n",
|
||
|
" \"images/MOT_3D_Camera/in_situ_absorption\": \"camera_0\",\n",
|
||
|
" \"images/ODT_1_Axis_Camera/in_situ_absorption\": \"camera_1\",\n",
|
||
|
" \"images/ODT_2_Axis_Camera/in_situ_absorption\": \"camera_2\",\n",
|
||
|
"}\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 5,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"# img_dir = 'C:/Users/control/DyLab/Experiments/DyBEC/'\n",
|
||
|
"img_dir = '//DyLabNAS/Data/'\n",
|
||
|
"SequenceName = \"Evaporative_Cooling\"\n",
|
||
|
"folderPath = img_dir + SequenceName + \"/\" + '2023/07/03'# get_date()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"# Load data"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## along x-axis"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 7,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"compX = xr.open_zarr(\"./compX.zarr\")\n",
|
||
|
"compY = xr.open_zarr(\"./compY.zarr\")\n",
|
||
|
"compZ = xr.open_zarr(\"./compZ.zarr\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"B = np.sqrt((compX['als_final_current'] * 9.52 -0.164)**2 + (0.435**2 - 0.164**2))\n",
|
||
|
"compX['als_final_current'] = B\n",
|
||
|
"compX['als_final_current'] = B"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"B = np.sqrt((compY['als_final_current'] * 10.3 + 0.202)**2 + (0.440**2 - 0.202**2))\n",
|
||
|
"compY['als_final_current'] = B\n",
|
||
|
"compY['als_final_current'] = B"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 12,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"B = np.sqrt((compZ['als_final_current'] * 10.6021 + 0.3254)**2 + (0.4333**2 - 0.3254**2))\n",
|
||
|
"compZ['als_final_current'] = B\n",
|
||
|
"compZ['als_final_current'] = B"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 9,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAACT4AAAI2CAYAAABzQAWFAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdeXwU9f0/8NfsZnNsyEWSTQgioFWRQzFIBEQFCQRRKVbLDyuelSrYVogKaC2XBwE10Hof9cTql4qlqBggCIpyBIkoh3ggRIQkm5CQa3PsMb8/Znd2ZndmdzYEMfh69kHdnfnMzGdmdkcwL95vQRRFEURERERERERERERERERERERERJ2I6WRPgIiIiIiIiIiIiIiIiIiIiIiIKFIMPhERERERERERERERERERERERUafD4BMREREREREREREREREREREREXU6DD4REREREREREREREREREREREVGnw+ATERERERERERERERERERERERF1Ogw+ERERERERERERERERERERERFRp8PgExERERERERERERERERERERERdToMPhERERERERERERERERERERERUafD4BMREREREREREREREREREREREXU6DD4REREREREREREREREREREREVGn0+mDTwUFBRAEQf6lZd68eaoxer++//77kMfav38/7rjjDvTu3RuxsbGw2WzIy8vDihUrDM21tLQUkydPxmmnnYaYmBh069YN11xzDT766KOIz5uIiIiIiIiIiIiIiIiIiIiI6NdMEEVRPNmTaK9vvvkGAwcOREtLi7xM63TmzZuH+fPnw2KxoGvXrrr727p1K3r16qW5bvXq1fj9738Ph8MBAEhMTERjYyM8Hg8A4NZbb8W//vUv3fDVSy+9hKlTp8LlcgEAkpKSUF9fL8937ty5mDdvXthzJiIiIiIiIiIiIiIiIiIiIiKiTlzxyePx4I9//CNaWlowdOhQQ9sMGzYMFRUVur/0Qk8HDhzAxIkT4XA4cPHFF+Obb75BXV0d6urqMGfOHADAK6+8gscee0xz+y1btuDOO++Ey+XChAkTcOjQIRw7dgxVVVW44447AADz58/H8uXLI78QRERERERERERERERERERERES/Qp02+PTkk0/is88+ww033IAxY8ac0GPNmTMHTU1NyMzMxPvvv4+zzz4bANClSxfMnz8ff/rTnwAAjzzyCGpra4O2nzlzJtxuNwYMGIDly5fjtNNOAwCkpqbiueeeQ15enmocERERERERERERERERERERERGF1imDTwcOHMDf/vY3pKamYsmSJSf0WE1NTVixYgUAYOrUqUhOTg4ac//99wMA6uvrsXLlStW6H374AZ9++ikA4N5774XFYtHdvqysDJ988kkHzp6IiIiIiIiIiIiIiIiIiIiI6NTUKYNPU6ZMQVNTEwoLC5Genn5Cj/Xpp5+iubkZAHDFFVdojunVqxfOPfdcAMDatWtV69atWye/Hjt2rOb2w4cPR0JCgub2REREREREREREREREREREREQUrNMFn1588UWsX78eubm5uOmmmyLads+ePejfvz/i4uLQpUsXnHPOOZgyZQq++OIL3W12794tv+7Xr5/uuP79+8vH0NreZrPBZrNpbms2m9GnTx/N7YmIiIiIiIiIiIiIiIiIiIiIKFinCj4dPnwY9913H+Li4vD8889HvH11dTW+/vprWK1WtLa24ttvv8VLL72EQYMG4cEHH9Tc5siRIwCAlJQUWK1W3X13795dNT5we9/6SLcP1Nraivr6evlXXV0dqqqqIIpiyO2IiIiIiIiIiIiIiIiIiIiIiH7pRFFEfX29oSxM1M8wnw5zxx13oK6uDosWLcIZZ5xheLuzzjoLixcvxm9/+1v07t0bFosFbW1t2LhxIx544AHs2LEDjzzyCFJSUnDPPfeotm1oaACAkKEn5Xrf+I7aPtDChQsxf/78oOWHDh1CYmJiyG2JiIiIiIiIiIiIiIiIiIiIiH7J6uvr0aNHDxw7dgxJSUkhx3aa4NOyZcvwwQcfYODAgcjPz49o2xtuuCFoWXR0NMaMGYNLL70Ul156KbZv34558+bh9ttvD3vRTqb7779fdf6HDx9G37590aNHj5M4KyIiIiIiIiIiIiIiIiIiIiKijtPQ0HBqBJ/sdjumT58Os9mMF198EVFRHTft2NhYPProoxg9ejQaGxuxfv16/O53v5PXJyQkAAAcDkfI/fjW+8Z31PaBYmJiEBMTI7/3lfVixadfFqfTibVr12LMmDGwWCwnezpERCcdn4tERH58JhIRqfG5SESkxuciEZEan4tERH58JtKvha/iU7gMDdBJgk+zZs3C0aNHMXXqVPTp0weNjY2q9W1tbfJr37ro6GhER0cb2v/QoUPl1z/88INqXVZWFgCgtrYWDodDt2Xd4cOHVeMDt/et16O3fTiCIAAAEhMTGXz6BXE6nbBarUhMTOS/cIiIwOciEZESn4lERGp8LhIRqfG5SESkxuciEZEfn4n0a+PLxIRi+hnmcdwOHDgAAHj22WeRkJAQ9GvhwoXyWN+ymTNndsix+/fvL7/es2eP7rjdu3cDAPr166e5vd1uR1VVlea2brcb+/bt09yeiIiIiIiIiIiIiIiIiIiIiIiCdYrg04m2detW+XXv3r1V64YPH464uDgAQFFRkeb2ZWVl+PrrrwEAY8aMUa0bPXq0/Fpv+88++wwNDQ2a2xMRERERERERERERERERERERUbBOEXzauHEjRFHU/TV37lx5rG/Z0qVL5fehtLa24m9/+xsAID4+HqNGjVKtj4+Px7XXXgtAqjhVV1cXtI9FixYBkKpNTZgwQbXujDPOwPDhwwEATzzxBJxOZ9D2BQUFAICePXvi0ksvDTlfIiIiIiIiIiIiIiIiIiIiIiLqJMGn4/HJJ58gNzcXy5Ytw08//SQvdzqdWL9+PS655BJs27YNADBnzhwkJycH7WPBggWIj49HeXk5rr76anz33XcAgKamJixYsADPPfccAODBBx9ESkpK0PaLFy+G2WzGl19+iUmTJuHw4cMAgJqaGkybNg0ffvihahwREREREREREREREREREREREYUWdbIncKKJooj169dj/fr1AIC4uDjEx8ejrq5Orr5kMpkwe/ZszJw5U3MfvXv3xvLly/H73/8emzZtwtlnn42kpCQ0NjbC7XYDAG655Rbcd999mtsPHToUzz33HKZOnYp3330X7777LpKTk1FXVydXpJo7dy4mTpzY0adPRERERERERERERERERERERHRKOuWDTwMGDMDjjz+OLVu2YNeuXaiursaxY8dgtVrRt29fXHLJJfjTn/6EAQMGhNzPuHHj8NVXX2HRokVYt24djhw5guTkZGRnZ+OOO+6Q2+Hpuf3225GdnY0nnngCH3/8MaqqqmCz2TB06FD85S9/weWXX96Rp01EREREREREREREREREREREdEo7JYJP8+bNw7x58zTXpaam4p577umQ45x55pl44YUX2r19dnY23nzzzQ6ZCxERERERERERERERERERERHRr5npZE+AiIiIiIiIiIiIiIiIiIiIiIgoUgw+ERERERERERERERERERERERFRp8PgExERERERERERERERERERERERdToMPhERERERERERERERERERERERUafD4BMREREREREREREREREREREREXU6DD4REREREREREREREREREREREVGnw+ATERERERERERERERERERERERF1Ogw+ERERERERERERERERERERERFRp8PgExERERERERERERERERERERERdToMPhERERERERERERERERERERERUafD4BMREREREREREREREREREREREXU6DD4REREREREREREREREREREREVGnw+ATERERERERERERERERERERERF1Ogw+ERERERERERERERERERERERFRp8PgExERERERERERERERERERERERdToMPhERERERERERERERERERERERUafD4BMREREREREREREREREREREREXU6DD4RERERERERERE
|
||
|
"text/plain": [
|
||
|
"<Figure size 2400x600 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"fig = plt.figure(figsize=(24,6))\n",
|
||
|
"ax = fig.gca()\n",
|
||
|
"compX['OD'].plot.errorbar(ax=ax, yerr = compX['std'], fmt='o')\n",
|
||
|
"compY['OD'].plot.errorbar(ax=ax, yerr = compY['std'], fmt='o')\n",
|
||
|
"compZ['OD'].plot.errorbar(ax=ax, yerr = compZ['std'], fmt='o')\n",
|
||
|
"plt.ylim([0, 4500])\n",
|
||
|
"plt.ylabel('NCount')\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"plt.grid(visible=1)\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
}
|
||
|
],
|
||
|
"metadata": {
|
||
|
"kernelspec": {
|
||
|
"display_name": "base",
|
||
|
"language": "python",
|
||
|
"name": "python3"
|
||
|
},
|
||
|
"language_info": {
|
||
|
"codemirror_mode": {
|
||
|
"name": "ipython",
|
||
|
"version": 3
|
||
|
},
|
||
|
"file_extension": ".py",
|
||
|
"mimetype": "text/x-python",
|
||
|
"name": "python",
|
||
|
"nbconvert_exporter": "python",
|
||
|
"pygments_lexer": "ipython3",
|
||
|
"version": "3.9.12"
|
||
|
},
|
||
|
"orig_nbformat": 4
|
||
|
},
|
||
|
"nbformat": 4,
|
||
|
"nbformat_minor": 2
|
||
|
}
|