2023-08-21 11:26:02 +02:00
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Import supporting package"
]
},
{
"cell_type": "code",
2023-08-28 09:35:22 +02:00
"execution_count": 63,
2023-08-21 11:26:02 +02:00
"metadata": {},
"outputs": [],
"source": [
"import xarray as xr\n",
"import numpy as np\n",
"import copy\n",
"\n",
"from uncertainties import ufloat\n",
"from uncertainties import unumpy as unp\n",
"from uncertainties import umath\n",
"import random\n",
"import matplotlib.pyplot as plt\n",
"plt.rcParams['font.size'] = 12\n",
"\n",
"from DataContainer.ReadData import read_hdf5_file\n",
"from Analyser.ImagingAnalyser import ImageAnalyser\n",
"from Analyser.FitAnalyser import FitAnalyser\n",
"from Analyser.FitAnalyser import NewFitModel, DensityProfileBEC2dModel\n",
"from ToolFunction.ToolFunction import *\n",
"\n",
"from scipy.optimize import curve_fit\n",
"\n",
"from ToolFunction.HomeMadeXarrayFunction import errorbar, dataarray_plot_errorbar\n",
"xr.plot.dataarray_plot.errorbar = errorbar\n",
"xr.plot.accessor.DataArrayPlotAccessor.errorbar = dataarray_plot_errorbar\n",
"\n",
"imageAnalyser = ImageAnalyser()\n",
"\n",
"# %matplotlib notebook"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Start a client for parallel computing"
]
},
{
"cell_type": "code",
2023-08-28 09:35:22 +02:00
"execution_count": 64,
2023-08-21 11:26:02 +02:00
"metadata": {},
"outputs": [
2023-08-28 09:35:22 +02:00
{
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\data\\AppData\\Roaming\\Python\\Python39\\site-packages\\distributed\\node.py:182: UserWarning: Port 8787 is already in use.\n",
"Perhaps you already have a cluster running?\n",
"Hosting the HTTP server on port 52367 instead\n",
" warnings.warn(\n"
]
},
2023-08-21 11:26:02 +02:00
{
"data": {
"text/html": [
"<div>\n",
" <div style=\"width: 24px; height: 24px; background-color: #e1e1e1; border: 3px solid #9D9D9D; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <h3 style=\"margin-bottom: 0px;\">Client</h3>\n",
2023-08-28 09:35:22 +02:00
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">Client-b21bc166-4363-11ee-942c-80e82ce2fa8e</p>\n",
2023-08-21 11:26:02 +02:00
" <table style=\"width: 100%; text-align: left;\">\n",
"\n",
" <tr>\n",
" \n",
" <td style=\"text-align: left;\"><strong>Connection method:</strong> Cluster object</td>\n",
" <td style=\"text-align: left;\"><strong>Cluster type:</strong> distributed.LocalCluster</td>\n",
" \n",
" </tr>\n",
"\n",
" \n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-08-28 09:35:22 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:52367/status\" target=\"_blank\">http://127.0.0.1:52367/status</a>\n",
2023-08-21 11:26:02 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" \n",
"\n",
" </table>\n",
"\n",
" \n",
"\n",
" \n",
" <details>\n",
" <summary style=\"margin-bottom: 20px;\"><h3 style=\"display: inline;\">Cluster Info</h3></summary>\n",
" <div class=\"jp-RenderedHTMLCommon jp-RenderedHTML jp-mod-trusted jp-OutputArea-output\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #e1e1e1; border: 3px solid #9D9D9D; border-radius: 5px; position: absolute;\">\n",
" </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <h3 style=\"margin-bottom: 0px; margin-top: 0px;\">LocalCluster</h3>\n",
2023-08-28 09:35:22 +02:00
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">f17f13c5</p>\n",
2023-08-21 11:26:02 +02:00
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-08-28 09:35:22 +02:00
" <strong>Dashboard:</strong> <a href=\"http://127.0.0.1:52367/status\" target=\"_blank\">http://127.0.0.1:52367/status</a>\n",
2023-08-21 11:26:02 +02:00
" </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",
2023-08-28 09:35:22 +02:00
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">Scheduler-cfebc6e8-3543-4422-83e0-ad5571cb200d</p>\n",
2023-08-21 11:26:02 +02:00
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-08-28 09:35:22 +02:00
" <strong>Comm:</strong> tcp://127.0.0.1:52370\n",
2023-08-21 11:26:02 +02:00
" </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",
2023-08-28 09:35:22 +02:00
" <strong>Dashboard:</strong> <a href=\"http://127.0.0.1:52367/status\" target=\"_blank\">http://127.0.0.1:52367/status</a>\n",
2023-08-21 11:26:02 +02:00
" </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",
2023-08-28 09:35:22 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:52406\n",
2023-08-21 11:26:02 +02:00
" </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",
2023-08-28 09:35:22 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:52410/status\" target=\"_blank\">http://127.0.0.1:52410/status</a>\n",
2023-08-21 11:26:02 +02:00
" </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",
2023-08-28 09:35:22 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:52373\n",
2023-08-21 11:26:02 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-08-28 09:35:22 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-1_z2lt_0\n",
2023-08-21 11:26:02 +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-08-28 09:35:22 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:52417\n",
2023-08-21 11:26:02 +02:00
" </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",
2023-08-28 09:35:22 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:52418/status\" target=\"_blank\">http://127.0.0.1:52418/status</a>\n",
2023-08-21 11:26:02 +02:00
" </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",
2023-08-28 09:35:22 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:52374\n",
2023-08-21 11:26:02 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-08-28 09:35:22 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-iq7wc4yz\n",
2023-08-21 11:26:02 +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-08-28 09:35:22 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:52412\n",
2023-08-21 11:26:02 +02:00
" </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",
2023-08-28 09:35:22 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:52415/status\" target=\"_blank\">http://127.0.0.1:52415/status</a>\n",
2023-08-21 11:26:02 +02:00
" </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",
2023-08-28 09:35:22 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:52375\n",
2023-08-21 11:26:02 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-08-28 09:35:22 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-4s052vw8\n",
2023-08-21 11:26:02 +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-08-28 09:35:22 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:52420\n",
2023-08-21 11:26:02 +02:00
" </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",
2023-08-28 09:35:22 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:52421/status\" target=\"_blank\">http://127.0.0.1:52421/status</a>\n",
2023-08-21 11:26:02 +02:00
" </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",
2023-08-28 09:35:22 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:52376\n",
2023-08-21 11:26:02 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-08-28 09:35:22 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-u1n0zi10\n",
2023-08-21 11:26:02 +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-08-28 09:35:22 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:52423\n",
2023-08-21 11:26:02 +02:00
" </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",
2023-08-28 09:35:22 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:52424/status\" target=\"_blank\">http://127.0.0.1:52424/status</a>\n",
2023-08-21 11:26:02 +02:00
" </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",
2023-08-28 09:35:22 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:52377\n",
2023-08-21 11:26:02 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-08-28 09:35:22 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-3vuc5miu\n",
2023-08-21 11:26:02 +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-08-28 09:35:22 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:52405\n",
2023-08-21 11:26:02 +02:00
" </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",
2023-08-28 09:35:22 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:52407/status\" target=\"_blank\">http://127.0.0.1:52407/status</a>\n",
2023-08-21 11:26:02 +02:00
" </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",
2023-08-28 09:35:22 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:52378\n",
2023-08-21 11:26:02 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-08-28 09:35:22 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-suw918q8\n",
2023-08-21 11:26:02 +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: 6</h4>\n",
" </summary>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-08-28 09:35:22 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:52409\n",
2023-08-21 11:26:02 +02:00
" </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",
2023-08-28 09:35:22 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:52413/status\" target=\"_blank\">http://127.0.0.1:52413/status</a>\n",
2023-08-21 11:26:02 +02:00
" </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",
2023-08-28 09:35:22 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:52379\n",
2023-08-21 11:26:02 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-08-28 09:35:22 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-7dc78218\n",
2023-08-21 11:26:02 +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: 7</h4>\n",
" </summary>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
2023-08-28 09:35:22 +02:00
" <strong>Comm: </strong> tcp://127.0.0.1:52435\n",
2023-08-21 11:26:02 +02:00
" </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",
2023-08-28 09:35:22 +02:00
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:52436/status\" target=\"_blank\">http://127.0.0.1:52436/status</a>\n",
2023-08-21 11:26:02 +02:00
" </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",
2023-08-28 09:35:22 +02:00
" <strong>Nanny: </strong> tcp://127.0.0.1:52380\n",
2023-08-21 11:26:02 +02:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
2023-08-28 09:35:22 +02:00
" <strong>Local directory: </strong> C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-kdlokiw6\n",
2023-08-21 11:26:02 +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-08-28 09:35:22 +02:00
"<Client: 'tcp://127.0.0.1:52370' processes=8 threads=128, memory=149.01 GiB>"
2023-08-21 11:26:02 +02:00
]
},
2023-08-28 09:35:22 +02:00
"execution_count": 64,
2023-08-21 11:26:02 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from dask.distributed import Client\n",
"client = Client(n_workers=8, threads_per_worker=16, processes=True, memory_limit='20GB')\n",
"client"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Start a client for Mongo DB"
]
},
{
"cell_type": "code",
2023-08-28 09:35:22 +02:00
"execution_count": 65,
2023-08-21 11:26:02 +02:00
"metadata": {},
"outputs": [],
"source": [
"import pymongo\n",
"import xarray_mongodb\n",
"\n",
"from DataContainer.MongoDB import MongoDB\n",
"\n",
"mongoClient = pymongo.MongoClient('mongodb://control:DyLab2021@127.0.0.1:27017/?authMechanism=DEFAULT')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Set global path for experiment"
]
},
{
"cell_type": "code",
2023-08-28 09:35:22 +02:00
"execution_count": 66,
2023-08-21 11:26:02 +02:00
"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"
]
},
2023-08-28 09:35:22 +02:00
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Evaporative Cooling"
]
},
2023-08-21 11:26:02 +02:00
{
"cell_type": "code",
2023-08-28 09:35:22 +02:00
"execution_count": 67,
2023-08-21 11:26:02 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-08-28 09:35:22 +02:00
"# img_dir = 'C:/Users/control/DyLab/Experiments/DyBEC/'\n",
"img_dir = '//DyLabNAS/Data/'\n",
"SequenceName = \"Evaporative_Cooling\"\n",
2023-08-21 11:26:02 +02:00
"folderPath = img_dir + SequenceName + \"/\" + get_date()\n",
2023-08-28 09:35:22 +02:00
"# folderPath = img_dir + SequenceName + \"/\" + '2023/06/30'# get_date()\n",
2023-08-21 11:26:02 +02:00
"\n",
"mongoDB = mongoClient[SequenceName]\n",
"\n",
"DB = MongoDB(mongoClient, mongoDB, date=get_date())"
]
},
{
2023-08-28 09:35:22 +02:00
"cell_type": "code",
"execution_count": 70,
2023-08-21 11:26:02 +02:00
"metadata": {},
2023-08-28 09:35:22 +02:00
"outputs": [
{
"ename": "ValueError",
"evalue": "Could not find any dimension coordinates to use to order the datasets for concatenation",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mValueError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32mf:\\Jianshun\\analyseScript\\20230630_Data_Analysis.ipynb Cell 11\u001b[0m in \u001b[0;36m1\n\u001b[1;32m----> <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis.ipynb#Y504sZmlsZQ%3D%3D?line=0'>1</a>\u001b[0m xr\u001b[39m.\u001b[39;49mopen_mfdataset(filePath)\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\backends\\api.py:1010\u001b[0m, in \u001b[0;36mopen_mfdataset\u001b[1;34m(paths, chunks, concat_dim, compat, preprocess, engine, data_vars, coords, combine, parallel, join, attrs_file, combine_attrs, **kwargs)\u001b[0m\n\u001b[0;32m 997\u001b[0m combined \u001b[39m=\u001b[39m _nested_combine(\n\u001b[0;32m 998\u001b[0m datasets,\n\u001b[0;32m 999\u001b[0m concat_dims\u001b[39m=\u001b[39mconcat_dim,\n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 1005\u001b[0m combine_attrs\u001b[39m=\u001b[39mcombine_attrs,\n\u001b[0;32m 1006\u001b[0m )\n\u001b[0;32m 1007\u001b[0m \u001b[39melif\u001b[39;00m combine \u001b[39m==\u001b[39m \u001b[39m\"\u001b[39m\u001b[39mby_coords\u001b[39m\u001b[39m\"\u001b[39m:\n\u001b[0;32m 1008\u001b[0m \u001b[39m# Redo ordering from coordinates, ignoring how they were ordered\u001b[39;00m\n\u001b[0;32m 1009\u001b[0m \u001b[39m# previously\u001b[39;00m\n\u001b[1;32m-> 1010\u001b[0m combined \u001b[39m=\u001b[39m combine_by_coords(\n\u001b[0;32m 1011\u001b[0m datasets,\n\u001b[0;32m 1012\u001b[0m compat\u001b[39m=\u001b[39;49mcompat,\n\u001b[0;32m 1013\u001b[0m data_vars\u001b[39m=\u001b[39;49mdata_vars,\n\u001b[0;32m 1014\u001b[0m coords\u001b[39m=\u001b[39;49mcoords,\n\u001b[0;32m 1015\u001b[0m join\u001b[39m=\u001b[39;49mjoin,\n\u001b[0;32m 1016\u001b[0m combine_attrs\u001b[39m=\u001b[39;49mcombine_attrs,\n\u001b[0;32m 1017\u001b[0m )\n\u001b[0;32m 1018\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[0;32m 1019\u001b[0m \u001b[39mraise\u001b[39;00m \u001b[39mValueError\u001b[39;00m(\n\u001b[0;32m 1020\u001b[0m \u001b[39m\"\u001b[39m\u001b[39m{}\u001b[39;00m\u001b[39m is an invalid option for the keyword argument\u001b[39m\u001b[39m\"\u001b[39m\n\u001b[0;32m 1021\u001b[0m \u001b[39m\"\u001b[39m\u001b[39m ``combine``\u001b[39m\u001b[39m\"\u001b[39m\u001b[39m.\u001b[39mformat(combine)\n\u001b[0;32m 1022\u001b[0m )\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\core\\combine.py:975\u001b[0m, in \u001b[0;36mcombine_by_coords\u001b[1;34m(data_objects, compat, data_vars, coords, fill_value, join, combine_attrs, datasets)\u001b[0m\n\u001b[0;32m 973\u001b[0m concatenated_grouped_by_data_vars \u001b[39m=\u001b[39m []\n\u001b[0;32m 974\u001b[0m \u001b[39mfor\u001b[39;00m \u001b[39mvars\u001b[39m, datasets_with_same_vars \u001b[39min\u001b[39;00m grouped_by_vars:\n\u001b[1;32m--> 975\u001b[0m concatenated \u001b[39m=\u001b[39m _combine_single_variable_hypercube(\n\u001b[0;32m 976\u001b[0m \u001b[39mlist\u001b[39;49m(datasets_with_same_vars),\n\u001b[0;32m 977\u001b[0m fill_value\u001b[39m=\u001b[39;49mfill_value,\n\u001b[0;32m 978\u001b[0m data_vars\u001b[39m=\u001b[39;49mdata_vars,\n\u001b[0;32m 979\u001b[0m coords\u001b[39m=\u001b[39;49mcoords,\n\u001b[0;32m 980\u001b[0m compat\u001b[39m=\u001b[39;49mcompat,\n\u001b[0;32m 981\u001b[0m join\u001b[39m=\u001b[39;49mjoin,\n\u001b[0;32m 982\u001b[0m combine_attrs\u001b[39m=\u001b[39;49mcombine_attrs,\n\u001b[0;32m 983\u001b[0m )\n\u001b[0;32m 984\u001b[0m concatenated_grouped_by_data_vars\u001b[39m.\u001b[39mappend(concatenated)\n\u001b[0;32m 986\u001b[0m \u001b[39mreturn\u001b[39;00m merge(\n\u001b[0;32m 987\u001b[0m concatenated_grouped_by_data_vars,\n\u001b[0;32m 988\u001b[0m compat\u001b[39m=\u001b[39mcompat,\n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 991\u001b[0m combine_attrs\u001b[39m=\u001b[39mcombine_attrs,\n\u001b[0;32m 992\u001b[0m )\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\core\\combine.py:622\u001b[0m, in \u001b[0;36m_combine_single_variable_hypercube\u001b[1;34m(datasets, fill_value, data_vars, coords, compat, join, combine_attrs)\u001b[0m\n\u001b[0;32m 616\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mlen\u001b[39m(datasets) \u001b[39m==\u001b[39m \u001b[39m0\u001b[39m:\n\u001b[0;32m 617\u001b[0m \u001b[39mraise\u001b[39;00m \u001b[39mValueError\u001b[39;00m(\n\u001b[0;32m 618\u001b[0m \u001b[39m\"\u001b[39m\u001b[39mAt least one Dataset is required to resolve variable names \u001b[39m\u001b[39m\"\u001b[39m\n\u001b[0;32m 619\u001b[0m \u001b[39m\"\u001b[39m\u001b[39mfor combined hypercube.\u001b[39m\u001b[39m\"\u001b[39m\n\u001b[0;32m 620\u001b[0m )\n\u001b[1;32m--> 622\u001b[0m combined_ids, concat_dims \u001b[39m=\u001b[39m _infer_concat_order_from_coords(\u001b[39mlist\u001b[39;49m(datasets))\n\u001b[0;32m 624\u001b[0m \u001b[39mif\u001b[39;00m fill_value \u001b[39mis\u001b[39;00m \u001b[39mNone\u001b[39;00m:\n\u001b[0;32m 625\u001b[0m \u001b[39m# check that datasets form complete hypercube\u001b[39;00m\n\u001b[0;32m 626\u001b[0m _check_shape_tile_ids(combined_ids)\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\core\\combine.py:145\u001b[0m, in \u001b[0;36m_infer_concat_order_from_coords\u001b[1;34m(datasets)\u001b[0m\n\u001b[0;32m 140\u001b[0m tile_ids \u001b[39m=\u001b[39m [\n\u001b[0;32m 141\u001b[0m tile_id \u001b[39m+\u001b[39m (position,) \u001b[39mfor\u001b[39;00m tile_id, position \u001b[39min\u001b[39;00m \u001b[39mzip\u001b[39m(tile_ids, order)\n\u001b[0;32m 142\u001b[0m ]\n\u001b[0;32m 144\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mlen\u001b[39m(datasets) \u001b[39m>\u001b[39m \u001b[39m1\u001b[39m \u001b[39mand\u001b[39;00m \u001b[39mnot\u001b[39;00m concat_dims:\n\u001b[1;32m--> 145\u001b[0m \u001b[39mraise\u001b[39;00m \u001b[39mValueError\u001b[39;00m(\n\u001b[0;32m 146\u001b[0m \u001b[39m\"\u001b[39m\u001b[39mCould not find any dimension coordinates to use to \u001b[39m\u001b[39m\"\u001b[39m\n\u001b[0;32m 147\u001b[0m \u001b[39m\"\u001b[39m\u001b[39morder the datasets for concatenation\u001b[39m\u001b[39m\"\u001b[39m\n\u001b[0;32m 148\u001b[0m )\n\u001b[0;32m 150\u001b[0m combined_ids \u001b[39m=\u001b[39m \u001b[39mdict\u001b[39m(\u001b[39mzip\u001b[39m(tile_ids, datasets))\n\u001b[0;32m 152\u001b[0m \u001b[39mreturn\u001b[39;00m combined_ids, concat_dims\n",
"\u001b[1;31mValueError\u001b[0m: Could not find any dimension coordinates to use to order the datasets for concatenation"
]
}
],
2023-08-21 11:26:02 +02:00
"source": [
2023-08-28 09:35:22 +02:00
"xr.open_mfdataset(filePath)"
2023-08-21 11:26:02 +02:00
]
},
{
"cell_type": "code",
2023-08-28 09:35:22 +02:00
"execution_count": 69,
"metadata": {},
"outputs": [
{
"ename": "ValueError",
"evalue": "cannot reindex or align along dimension 'phony_dim_2' because of conflicting dimension sizes: {1088, 0}",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mValueError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32mf:\\Jianshun\\analyseScript\\20230630_Data_Analysis.ipynb Cell 11\u001b[0m in \u001b[0;36m4\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis.ipynb#Y503sZmlsZQ%3D%3D?line=0'>1</a>\u001b[0m shotNum \u001b[39m=\u001b[39m \u001b[39m\"\u001b[39m\u001b[39m0071\u001b[39m\u001b[39m\"\u001b[39m\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis.ipynb#Y503sZmlsZQ%3D%3D?line=1'>2</a>\u001b[0m filePath \u001b[39m=\u001b[39m folderPath \u001b[39m+\u001b[39m \u001b[39m\"\u001b[39m\u001b[39m/\u001b[39m\u001b[39m\"\u001b[39m \u001b[39m+\u001b[39m shotNum \u001b[39m+\u001b[39m \u001b[39m\"\u001b[39m\u001b[39m/*.h5\u001b[39m\u001b[39m\"\u001b[39m\n\u001b[1;32m----> <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis.ipynb#Y503sZmlsZQ%3D%3D?line=3'>4</a>\u001b[0m dataSetDict \u001b[39m=\u001b[39m {\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis.ipynb#Y503sZmlsZQ%3D%3D?line=4'>5</a>\u001b[0m dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis.ipynb#Y503sZmlsZQ%3D%3D?line=5'>6</a>\u001b[0m \u001b[39mfor\u001b[39;00m i \u001b[39min\u001b[39;00m [\u001b[39m1\u001b[39m]\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis.ipynb#Y503sZmlsZQ%3D%3D?line=6'>7</a>\u001b[0m }\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis.ipynb#Y503sZmlsZQ%3D%3D?line=8'>9</a>\u001b[0m dataSet \u001b[39m=\u001b[39m dataSetDict[\u001b[39m\"\u001b[39m\u001b[39mcamera_0\u001b[39m\u001b[39m\"\u001b[39m]\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis.ipynb#Y503sZmlsZQ%3D%3D?line=10'>11</a>\u001b[0m print_scanAxis(dataSet)\n",
"\u001b[1;32mf:\\Jianshun\\analyseScript\\20230630_Data_Analysis.ipynb Cell 11\u001b[0m in \u001b[0;36m5\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis.ipynb#Y503sZmlsZQ%3D%3D?line=0'>1</a>\u001b[0m shotNum \u001b[39m=\u001b[39m \u001b[39m\"\u001b[39m\u001b[39m0071\u001b[39m\u001b[39m\"\u001b[39m\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis.ipynb#Y503sZmlsZQ%3D%3D?line=1'>2</a>\u001b[0m filePath \u001b[39m=\u001b[39m folderPath \u001b[39m+\u001b[39m \u001b[39m\"\u001b[39m\u001b[39m/\u001b[39m\u001b[39m\"\u001b[39m \u001b[39m+\u001b[39m shotNum \u001b[39m+\u001b[39m \u001b[39m\"\u001b[39m\u001b[39m/*.h5\u001b[39m\u001b[39m\"\u001b[39m\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis.ipynb#Y503sZmlsZQ%3D%3D?line=3'>4</a>\u001b[0m dataSetDict \u001b[39m=\u001b[39m {\n\u001b[1;32m----> <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis.ipynb#Y503sZmlsZQ%3D%3D?line=4'>5</a>\u001b[0m dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis.ipynb#Y503sZmlsZQ%3D%3D?line=5'>6</a>\u001b[0m \u001b[39mfor\u001b[39;00m i \u001b[39min\u001b[39;00m [\u001b[39m1\u001b[39m]\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis.ipynb#Y503sZmlsZQ%3D%3D?line=6'>7</a>\u001b[0m }\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis.ipynb#Y503sZmlsZQ%3D%3D?line=8'>9</a>\u001b[0m dataSet \u001b[39m=\u001b[39m dataSetDict[\u001b[39m\"\u001b[39m\u001b[39mcamera_0\u001b[39m\u001b[39m\"\u001b[39m]\n\u001b[0;32m <a href='vscode-notebook-cell:/f%3A/Jianshun/analyseScript/20230630_Data_Analysis.ipynb#Y503sZmlsZQ%3D%3D?line=10'>11</a>\u001b[0m print_scanAxis(dataSet)\n",
"File \u001b[1;32mf:\\Jianshun\\analyseScript\\DataContainer\\ReadData.py:226\u001b[0m, in \u001b[0;36mread_hdf5_file\u001b[1;34m(filePath, group, datesetOfGlobal, preprocess, join, parallel, engine, phony_dims, excludeAxis, maxFileNum, **kwargs)\u001b[0m\n\u001b[0;32m 223\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[0;32m 224\u001b[0m kwargs\u001b[39m.\u001b[39mupdate({\u001b[39m'\u001b[39m\u001b[39mpreprocess\u001b[39m\u001b[39m'\u001b[39m:preprocess})\n\u001b[1;32m--> 226\u001b[0m ds \u001b[39m=\u001b[39m xr\u001b[39m.\u001b[39mopen_mfdataset(fullFilePath, \u001b[39m*\u001b[39m\u001b[39m*\u001b[39mkwargs)\n\u001b[0;32m 228\u001b[0m newDimKey \u001b[39m=\u001b[39m np\u001b[39m.\u001b[39mappend([\u001b[39m'\u001b[39m\u001b[39mx\u001b[39m\u001b[39m'\u001b[39m, \u001b[39m'\u001b[39m\u001b[39my\u001b[39m\u001b[39m'\u001b[39m, \u001b[39m'\u001b[39m\u001b[39mz\u001b[39m\u001b[39m'\u001b[39m], [ \u001b[39mchr\u001b[39m(i) \u001b[39mfor\u001b[39;00m i \u001b[39min\u001b[39;00m \u001b[39mrange\u001b[39m(\u001b[39m97\u001b[39m, \u001b[39m97\u001b[39m\u001b[39m+\u001b[39m\u001b[39m23\u001b[39m)])\n\u001b[0;32m 230\u001b[0m oldDimKey \u001b[39m=\u001b[39m np\u001b[39m.\u001b[39msort(\n\u001b[0;32m 231\u001b[0m [\n\u001b[0;32m 232\u001b[0m key \n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 235\u001b[0m ]\n\u001b[0;32m 236\u001b[0m )\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\backends\\api.py:1010\u001b[0m, in \u001b[0;36mopen_mfdataset\u001b[1;34m(paths, chunks, concat_dim, compat, preprocess, engine, data_vars, coords, combine, parallel, join, attrs_file, combine_attrs, **kwargs)\u001b[0m\n\u001b[0;32m 997\u001b[0m combined \u001b[39m=\u001b[39m _nested_combine(\n\u001b[0;32m 998\u001b[0m datasets,\n\u001b[0;32m 999\u001b[0m concat_dims\u001b[39m=\u001b[39mconcat_dim,\n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 1005\u001b[0m combine_attrs\u001b[39m=\u001b[39mcombine_attrs,\n\u001b[0;32m 1006\u001b[0m )\n\u001b[0;32m 1007\u001b[0m \u001b[39melif\u001b[39;00m combine \u001b[39m==\u001b[39m \u001b[39m\"\u001b[39m\u001b[39mby_coords\u001b[39m\u001b[39m\"\u001b[39m:\n\u001b[0;32m 1008\u001b[0m \u001b[39m# Redo ordering from coordinates, ignoring how they were ordered\u001b[39;00m\n\u001b[0;32m 1009\u001b[0m \u001b[39m# previously\u001b[39;00m\n\u001b[1;32m-> 1010\u001b[0m combined \u001b[39m=\u001b[39m combine_by_coords(\n\u001b[0;32m 1011\u001b[0m datasets,\n\u001b[0;32m 1012\u001b[0m compat\u001b[39m=\u001b[39;49mcompat,\n\u001b[0;32m 1013\u001b[0m data_vars\u001b[39m=\u001b[39;49mdata_vars,\n\u001b[0;32m 1014\u001b[0m coords\u001b[39m=\u001b[39;49mcoords,\n\u001b[0;32m 1015\u001b[0m join\u001b[39m=\u001b[39;49mjoin,\n\u001b[0;32m 1016\u001b[0m combine_attrs\u001b[39m=\u001b[39;49mcombine_attrs,\n\u001b[0;32m 1017\u001b[0m )\n\u001b[0;32m 1018\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[0;32m 1019\u001b[0m \u001b[39mraise\u001b[39;00m \u001b[39mValueError\u001b[39;00m(\n\u001b[0;32m 1020\u001b[0m \u001b[39m\"\u001b[39m\u001b[39m{}\u001b[39;00m\u001b[39m is an invalid option for the keyword argument\u001b[39m\u001b[39m\"\u001b[39m\n\u001b[0;32m 1021\u001b[0m \u001b[39m\"\u001b[39m\u001b[39m ``combine``\u001b[39m\u001b[39m\"\u001b[39m\u001b[39m.\u001b[39mformat(combine)\n\u001b[0;32m 1022\u001b[0m )\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\core\\combine.py:975\u001b[0m, in \u001b[0;36mcombine_by_coords\u001b[1;34m(data_objects, compat, data_vars, coords, fill_value, join, combine_attrs, datasets)\u001b[0m\n\u001b[0;32m 973\u001b[0m concatenated_grouped_by_data_vars \u001b[39m=\u001b[39m []\n\u001b[0;32m 974\u001b[0m \u001b[39mfor\u001b[39;00m \u001b[39mvars\u001b[39m, datasets_with_same_vars \u001b[39min\u001b[39;00m grouped_by_vars:\n\u001b[1;32m--> 975\u001b[0m concatenated \u001b[39m=\u001b[39m _combine_single_variable_hypercube(\n\u001b[0;32m 976\u001b[0m \u001b[39mlist\u001b[39;49m(datasets_with_same_vars),\n\u001b[0;32m 977\u001b[0m fill_value\u001b[39m=\u001b[39;49mfill_value,\n\u001b[0;32m 978\u001b[0m data_vars\u001b[39m=\u001b[39;49mdata_vars,\n\u001b[0;32m 979\u001b[0m coords\u001b[39m=\u001b[39;49mcoords,\n\u001b[0;32m 980\u001b[0m compat\u001b[39m=\u001b[39;49mcompat,\n\u001b[0;32m 981\u001b[0m join\u001b[39m=\u001b[39;49mjoin,\n\u001b[0;32m 982\u001b[0m combine_attrs\u001b[39m=\u001b[39;49mcombine_attrs,\n\u001b[0;32m 983\u001b[0m )\n\u001b[0;32m 984\u001b[0m concatenated_grouped_by_data_vars\u001b[39m.\u001b[39mappend(concatenated)\n\u001b[0;32m 986\u001b[0m \u001b[39mreturn\u001b[39;00m merge(\n\u001b[0;32m 987\u001b[0m concatenated_grouped_by_data_vars,\n\u001b[0;32m 988\u001b[0m compat\u001b[39m=\u001b[39mcompat,\n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 991\u001b[0m combine_attrs\u001b[39m=\u001b[39mcombine_attrs,\n\u001b[0;32m 992\u001b[0m )\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\core\\combine.py:633\u001b[0m, in \u001b[0;36m_combine_single_variable_hypercube\u001b[1;34m(datasets, fill_value, data_vars, coords, compat, join, combine_attrs)\u001b[0m\n\u001b[0;32m 630\u001b[0m _check_dimension_depth_tile_ids(combined_ids)\n\u001b[0;32m 632\u001b[0m \u001b[39m# Concatenate along all of concat_dims one by one to create single ds\u001b[39;00m\n\u001b[1;32m--> 633\u001b[0m concatenated \u001b[39m=\u001b[39m _combine_nd(\n\u001b[0;32m 634\u001b[0m combined_ids,\n\u001b[0;32m 635\u001b[0m concat_dims\u001b[39m=\u001b[39;49mconcat_dims,\n\u001b[0;32m 636\u001b[0m data_vars\u001b[39m=\u001b[39;49mdata_vars,\n\u001b[0;32m 637\u001b[0m coords\u001b[39m=\u001b[39;49mcoords,\n\u001b[0;32m 638\u001b[0m compat\u001b[39m=\u001b[39;49mcompat,\n\u001b[0;32m 639\u001b[0m fill_value\u001b[39m=\u001b[39;49mfill_value,\n\u001b[0;32m 640\u001b[0m join\u001b[39m=\u001b[39;49mjoin,\n\u001b[0;32m 641\u001b[0m combine_attrs\u001b[39m=\u001b[39;49mcombine_attrs,\n\u001b[0;32m 642\u001b[0m )\n\u001b[0;32m 644\u001b[0m \u001b[39m# Check the overall coordinates are monotonically increasing\u001b[39;00m\n\u001b[0;32m 645\u001b[0m \u001b[39mfor\u001b[39;00m dim \u001b[39min\u001b[39;00m concat_dims:\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\core\\combine.py:235\u001b[0m, in \u001b[0;36m_combine_nd\u001b[1;34m(combined_ids, concat_dims, data_vars, coords, compat, fill_value, join, combine_attrs)\u001b[0m\n\u001b[0;32m 231\u001b[0m \u001b[39m# Each iteration of this loop reduces the length of the tile_ids tuples\u001b[39;00m\n\u001b[0;32m 232\u001b[0m \u001b[39m# by one. It always combines along the first dimension, removing the first\u001b[39;00m\n\u001b[0;32m 233\u001b[0m \u001b[39m# element of the tuple\u001b[39;00m\n\u001b[0;32m 234\u001b[0m \u001b[39mfor\u001b[39;00m concat_dim \u001b[39min\u001b[39;00m concat_dims:\n\u001b[1;32m--> 235\u001b[0m combined_ids \u001b[39m=\u001b[39m _combine_all_along_first_dim(\n\u001b[0;32m 236\u001b[0m combined_ids,\n\u001b[0;32m 237\u001b[0m dim\u001b[39m=\u001b[39;49mconcat_dim,\n\u001b[0;32m 238\u001b[0m data_vars\u001b[39m=\u001b[39;49mdata_vars,\n\u001b[0;32m 239\u001b[0m coords\u001b[39m=\u001b[39;49mcoords,\n\u001b[0;32m 240\u001b[0m compat\u001b[39m=\u001b[39;49mcompat,\n\u001b[0;32m 241\u001b[0m fill_value\u001b[39m=\u001b[39;49mfill_value,\n\u001b[0;32m 242\u001b[0m join\u001b[39m=\u001b[39;49mjoin,\n\u001b[0;32m 243\u001b[0m combine_attrs\u001b[39m=\u001b[39;49mcombine_attrs,\n\u001b[0;32m 244\u001b[0m )\n\u001b[0;32m 245\u001b[0m (combined_ds,) \u001b[39m=\u001b[39m combined_ids\u001b[39m.\u001b[39mvalues()\n\u001b[0;32m 246\u001b[0m \u001b[39mreturn\u001b[39;00m combined_ds\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\core\\combine.py:270\u001b[0m, in \u001b[0;36m_combine_all_along_first_dim\u001b[1;34m(combined_ids, dim, data_vars, coords, compat, fill_value, join, combine_attrs)\u001b[0m\n\u001b[0;32m 268\u001b[0m combined_ids \u001b[39m=\u001b[39m \u001b[39mdict\u001b[39m(\u001b[39msorted\u001b[39m(group))\n\u001b[0;32m 269\u001b[0m datasets \u001b[39m=\u001b[39m combined_ids\u001b[39m.\u001b[39mvalues()\n\u001b[1;32m--> 270\u001b[0m new_combined_ids[new_id] \u001b[39m=\u001b[39m _combine_1d(\n\u001b[0;32m 271\u001b[0m datasets, dim, compat, data_vars, coords, fill_value, join, combine_attrs\n\u001b[0;32m 272\u001b[0m )\n\u001b[0;32m 273\u001b[0m \u001b[39mreturn\u001b[39;00m new_combined_ids\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\core\\combine.py:293\u001b[0m, in \u001b[0;36m_combine_1d\u001b[1;34m(datasets, concat_dim, compat, data_vars, coords, fill_value, join, combine_attrs)\u001b[0m\n\u001b[0;32m 291\u001b[0m \u001b[39mif\u001b[39;00m concat_dim \u001b[39mis\u001b[39;00m \u001b[39mnot\u001b[39;00m \u001b[39mNone\u001b[39;00m:\n\u001b[0;32m 292\u001b[0m \u001b[39mtry\u001b[39;00m:\n\u001b[1;32m--> 293\u001b[0m combined \u001b[39m=\u001b[39m concat(\n\u001b[0;32m 294\u001b[0m datasets,\n\u001b[0;32m 295\u001b[0m dim\u001b[39m=\u001b[39;49mconcat_dim,\n\u001b[0;32m 296\u001b[0m data_vars\u001b[39m=\u001b[39;49mdata_vars,\n\u001b[0;32m 297\u001b[0m coords\u001b[39m=\u001b[39;49mcoords,\n\u001b[0;32m 298\u001b[0m compat\u001b[39m=\u001b[39;49mcompat,\n\u001b[0;32m 299\u001b[0m fill_value\u001b[39m=\u001b[39;49mfill_value,\n\u001b[0;32m 300\u001b[0m join\u001b[39m=\u001b[39;49mjoin,\n\u001b[0;32m 301\u001b[0m combine_attrs\u001b[39m=\u001b[39;49mcombine_attrs,\n\u001b[0;32m 302\u001b[0m )\n\u001b[0;32m 303\u001b[0m \u001b[39mexcept\u001b[39;00m \u001b[39mValueError\u001b[39;00m \u001b[39mas\u001b[39;00m err:\n\u001b[0;32m 304\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39m\"\u001b[39m\u001b[39mencountered unexpected variable\u001b[39m\u001b[39m\"\u001b[39m \u001b[39min\u001b[39;00m \u001b[39mstr\u001b[39m(err):\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\core\\concat.py:251\u001b[0m, in \u001b[0;36mconcat\u001b[1;34m(objs, dim, data_vars, coords, compat, positions, fill_value, join, combine_attrs)\u001b[0m\n\u001b[0;32m 239\u001b[0m \u001b[39mreturn\u001b[39;00m _dataarray_concat(\n\u001b[0;32m 240\u001b[0m objs,\n\u001b[0;32m 241\u001b[0m dim\u001b[39m=\u001b[39mdim,\n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 248\u001b[0m combine_attrs\u001b[39m=\u001b[39mcombine_attrs,\n\u001b[0;32m 249\u001b[0m )\n\u001b[0;32m 250\u001b[0m \u001b[39melif\u001b[39;00m \u001b[39misinstance\u001b[39m(first_obj, Dataset):\n\u001b[1;32m--> 251\u001b[0m \u001b[39mreturn\u001b[39;00m _dataset_concat(\n\u001b[0;32m 252\u001b[0m objs,\n\u001b[0;32m 253\u001b[0m dim\u001b[39m=\u001b[39;49mdim,\n\u001b[0;32m 254\u001b[0m data_vars\u001b[39m=\u001b[39;49mdata_vars,\n\u001b[0;32m 255\u001b[0m coords\u001b[39m=\u001b[39;49mcoords,\n\u001b[0;32m 256\u001b[0m compat\u001b[39m=\u001b[39;49mcompat,\n\u001b[0;32m 257\u001b[0m positions\u001b[39m=\u001b[39;49mpositions,\n\u001b[0;32m 258\u001b[0m fill_value\u001b[39m=\u001b[39;49mfill_value,\n\u001b[0;32m 259\u001b[0m join\u001b[39m=\u001b[39;49mjoin,\n\u001b[0;32m 260\u001b[0m combine_attrs\u001b[39m=\u001b[39;49mcombine_attrs,\n\u001b[0;32m 261\u001b[0m )\n\u001b[0;32m 262\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[0;32m 263\u001b[0m \u001b[39mraise\u001b[39;00m \u001b[39mTypeError\u001b[39;00m(\n\u001b[0;32m 264\u001b[0m \u001b[39m\"\u001b[39m\u001b[39mcan only concatenate xarray Dataset and DataArray \u001b[39m\u001b[39m\"\u001b[39m\n\u001b[0;32m 265\u001b[0m \u001b[39mf\u001b[39m\u001b[39m\"\u001b[39m\u001b[39mobjects, got \u001b[39m\u001b[39m{\u001b[39;00m\u001b[39mtype\u001b[39m(first_obj)\u001b[39m}\u001b[39;00m\u001b[39m\"\u001b[39m\n\u001b[0;32m 266\u001b[0m )\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\core\\concat.py:483\u001b[0m, in \u001b[0;36m_dataset_concat\u001b[1;34m(datasets, dim, data_vars, coords, compat, positions, fill_value, join, combine_attrs)\u001b[0m\n\u001b[0;32m 480\u001b[0m \u001b[39m# Make sure we're working on a copy (we'll be loading variables)\u001b[39;00m\n\u001b[0;32m 481\u001b[0m datasets \u001b[39m=\u001b[39m [ds\u001b[39m.\u001b[39mcopy() \u001b[39mfor\u001b[39;00m ds \u001b[39min\u001b[39;00m datasets]\n\u001b[0;32m 482\u001b[0m datasets \u001b[39m=\u001b[39m \u001b[39mlist\u001b[39m(\n\u001b[1;32m--> 483\u001b[0m align(\u001b[39m*\u001b[39;49mdatasets, join\u001b[39m=\u001b[39;49mjoin, copy\u001b[39m=\u001b[39;49m\u001b[39mFalse\u001b[39;49;00m, exclude\u001b[39m=\u001b[39;49m[dim], fill_value\u001b[39m=\u001b[39;49mfill_value)\n\u001b[0;32m 484\u001b[0m )\n\u001b[0;32m 486\u001b[0m dim_coords, dims_sizes, coord_names, data_names, vars_order \u001b[39m=\u001b[39m _parse_datasets(\n\u001b[0;32m 487\u001b[0m datasets\n\u001b[0;32m 488\u001b[0m )\n\u001b[0;32m 489\u001b[0m dim_names \u001b[39m=\u001b[39m \u001b[39mset\u001b[39m(dim_coords)\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\core\\alignment.py:787\u001b[0m, in \u001b[0;36malign\u001b[1;34m(join, copy, indexes, exclude, fill_value, *objects)\u001b[0m\n\u001b[0;32m 591\u001b[0m \u001b[39m\"\"\"\u001b[39;00m\n\u001b[0;32m 592\u001b[0m \u001b[39mGiven any number of Dataset and/or DataArray objects, returns new\u001b[39;00m\n\u001b[0;32m 593\u001b[0m \u001b[39mobjects with aligned indexes and dimension sizes.\u001b[39;00m\n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 777\u001b[0m \n\u001b[0;32m 778\u001b[0m \u001b[39m\"\"\"\u001b[39;00m\n\u001b[0;32m 779\u001b[0m aligner \u001b[39m=\u001b[39m Aligner(\n\u001b[0;32m 780\u001b[0m objects,\n\u001b[0;32m 781\u001b[0m join\u001b[39m=\u001b[39mjoin,\n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 785\u001b[0m fill_value\u001b[39m=\u001b[39mfill_value,\n\u001b[0;32m 786\u001b[0m )\n\u001b[1;32m--> 787\u001b[0m aligner\u001b[39m.\u001b[39;49malign()\n\u001b[0;32m 788\u001b[0m \u001b[39mreturn\u001b[39;00m aligner\u001b[39m.\u001b[39mresults\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\core\\alignment.py:573\u001b[0m, in \u001b[0;36mAligner.align\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 571\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39massert_no_index_conflict()\n\u001b[0;32m 572\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39malign_indexes()\n\u001b[1;32m--> 573\u001b[0m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49massert_unindexed_dim_sizes_equal()\n\u001b[0;32m 575\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mjoin \u001b[39m==\u001b[39m \u001b[39m\"\u001b[39m\u001b[39moverride\u001b[39m\u001b[39m\"\u001b[39m:\n\u001b[0;32m 576\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39moverride_indexes()\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\core\\alignment.py:472\u001b[0m, in \u001b[0;36mAligner.assert_unindexed_dim_sizes_equal\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 470\u001b[0m add_err_msg \u001b[39m=\u001b[39m \u001b[39m\"\u001b[39m\u001b[39m\"\u001b[39m\n\u001b[0;32m 471\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mlen\u001b[39m(sizes) \u001b[39m>\u001b[39m \u001b[39m1\u001b[39m:\n\u001b[1;32m--> 472\u001b[0m \u001b[39mraise\u001b[39;00m \u001b[39mValueError\u001b[39;00m(\n\u001b[0;32m 473\u001b[0m \u001b[39mf\u001b[39m\u001b[39m\"\u001b[39m\u001b[39mcannot reindex or align along dimension \u001b[39m\u001b[39m{\u001b[39;00mdim\u001b[39m!r}\u001b[39;00m\u001b[39m \u001b[39m\u001b[39m\"\u001b[39m\n\u001b[0;32m 474\u001b[0m \u001b[39mf\u001b[39m\u001b[39m\"\u001b[39m\u001b[39mbecause of conflicting dimension sizes: \u001b[39m\u001b[39m{\u001b[39;00msizes\u001b[39m!r}\u001b[39;00m\u001b[39m\"\u001b[39m \u001b[39m+\u001b[39m add_err_msg\n\u001b[0;32m 475\u001b[0m )\n",
"\u001b[1;31mValueError\u001b[0m: cannot reindex or align along dimension 'phony_dim_2' because of conflicting dimension sizes: {1088, 0}"
]
}
],
2023-08-21 11:26:02 +02:00
"source": [
2023-08-28 09:35:22 +02:00
"shotNum = \"0071\"\n",
2023-08-21 11:26:02 +02:00
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
2023-08-28 09:35:22 +02:00
" for i in [1]\n",
2023-08-21 11:26:02 +02:00
"}\n",
"\n",
2023-08-28 09:35:22 +02:00
"dataSet = dataSetDict[\"camera_0\"]\n",
2023-08-21 11:26:02 +02:00
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
2023-08-28 09:35:22 +02:00
"imageAnalyser.center = (535, 995)\n",
"imageAnalyser.span = (350, 350)\n",
2023-08-21 11:26:02 +02:00
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
2023-08-28 09:35:22 +02:00
"plt.ylim([0, 3500])\n",
2023-08-21 11:26:02 +02:00
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
2023-08-28 09:35:22 +02:00
"plt.show()"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# ALS"
2023-08-21 11:26:02 +02:00
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
2023-08-28 09:35:22 +02:00
"# 0 - 0.025 A"
2023-08-21 11:26:02 +02:00
]
},
{
"cell_type": "code",
2023-08-28 09:35:22 +02:00
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'als_final_current': array([0. , 0.0009, 0.0018, 0.0027, 0.0036, 0.0045, 0.0054, 0.0063,\n",
" 0.0072, 0.0081, 0.009 , 0.0099, 0.0108, 0.0117, 0.0126, 0.0135,\n",
" 0.0144, 0.0153, 0.0162, 0.0171, 0.018 , 0.0189, 0.0198, 0.0207,\n",
" 0.0216, 0.0225, 0.0234, 0.0243]), 'runs': array([0., 1.])}\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHPCAYAAAAFwj37AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABNWElEQVR4nO3df1xUdaL/8fckOAho7oA/EDUtf3BVxOKmsjcTM4ktuwrprrmW4mLtamnprmGiQSnaZj9cF2vdTCyyH7Zqm+svRHT3Zhm3vnsXam13S80sfwCaPxAc8Hz/YJkcGXCAgZmDr+fjwUPncz7zmc85nznwnnM+54zFMAxDAAAAMIVrvN0BAAAAuI/wBgAAYCKENwAAABMhvAEAAJgI4Q0AAMBECG8AAAAmQngDAAAwEcIbAACAiRDeAAAATMTr4e2vf/2r7rrrLnXv3l1t2rSRzWZTTEyMsrOznepNmTJFFoulxk9ERITLdlesWKGIiAhZrVb17NlT6enpstvtNeodP35cU6ZMUWhoqAIDAxUTE6Pc3NwmWVcAAIDG8vN2B06dOqVu3brp3nvvVXh4uM6dO6fXX39d9913nw4ePKjU1FRH3TZt2mjXrl1Oz2/Tpk2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9P11xzja6//nr5+fnp7rvv1oYNG3TmzBlHna+++kp5eXlKTEx0lMXHxysgIEBZWVlO7WVlZclisWjs2LGOsoSEBO3fv9/pliAVFRXKzs7
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-08-21 11:26:02 +02:00
"source": [
2023-08-28 09:35:22 +02:00
"shotNum = \"0017\"\n",
2023-08-21 11:26:02 +02:00
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
2023-08-28 09:35:22 +02:00
" for i in [0]\n",
2023-08-21 11:26:02 +02:00
"}\n",
"\n",
2023-08-28 09:35:22 +02:00
"dataSet = dataSetDict[\"camera_0\"]\n",
2023-08-21 11:26:02 +02:00
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
2023-08-28 09:35:22 +02:00
"imageAnalyser.center = (535, 995)\n",
"imageAnalyser.span = (350, 350)\n",
2023-08-21 11:26:02 +02:00
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
2023-08-28 09:35:22 +02:00
"plt.ylim([0, 3500])\n",
2023-08-21 11:26:02 +02:00
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
2023-08-28 09:35:22 +02:00
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"Ncount_mean_total = copy.copy(Ncount_mean)\n",
"Ncount_std_total = copy.copy(Ncount_std)"
2023-08-21 11:26:02 +02:00
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
2023-08-28 09:35:22 +02:00
"# 0.025 - 0.050 A"
2023-08-21 11:26:02 +02:00
]
},
{
"cell_type": "code",
2023-08-28 09:35:22 +02:00
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'als_final_current': array([0.025 , 0.0259, 0.0268, 0.0277, 0.0286, 0.0295, 0.0304, 0.0313,\n",
" 0.0322, 0.0331, 0.034 , 0.0349, 0.0358, 0.0367, 0.0376, 0.0385,\n",
" 0.0394, 0.0403, 0.0412, 0.0421, 0.043 , 0.0439, 0.0448, 0.0457,\n",
" 0.0466, 0.0475, 0.0484, 0.0493]), 'runs': array([0., 1.])}\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHPCAYAAAAFwj37AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABQeUlEQVR4nO3de1xUdeL/8fckOAhoNuAFb2l54esNi1LZzcRMItOvQrqZayWu1a4Wme4aJhqUt8pK18VaNxM3u1pq5XpDRGu3Mn71bRcqqy010zUVNC8IDnh+f7CMjtwGmGHmwOv5ePDQ+ZzPfPic8/GM7/mcm8UwDEMAAAAwhcu83QEAAAC4jvAGAABgIoQ3AAAAEyG8AQAAmAjhDQAAwEQIbwAAACZCeAMAADARwhsAAICJEN4AAABMxOvh7fPPP9dtt92mTp06qVmzZrLZbIqKitKaNWuc6k2cOFEWi6XcT3h4eIXtLlu2TOHh4bJarerS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U2e32cvWOHDmiiRMnKjQ0VIGBgYqKilJmZqbb1xMAAMAdvB7eTpw4oY4dO2rBggXatGmT/vrXv6pz58666667NG/ePEe9PXv2KDo6WufOndObb76pl156Sd98840GDRqko0ePOrU5f/58PfTQQ4qPj9fWrVs1ZcoULViwQFOnTnWqV1RUpKFDhyozM1NLly7VO++8ozZt2ig2Nla7du2ql/UHAACoCT9vdyA6OlrR0dFOZSNGjNDevXu1YsUKJScnS5Lmzp0rq9WqjRs3qkWLFpKkyMhIdevWTYsXL9aTTz4pScrLy9O8efN07733asGCBY7fYbfblZycrGnTpqlnz56SpJUrVyo3N1cffvihoqKiJElDhgxRRESEZs6cqd27d9fHJgAAAHCZ12feKhMaGio/v9JsWVxcrI0bN+r22293BDdJuvLKKzVkyBCtX7/eUbZlyxYVFhYqISHBqb2EhAQZhqENGzY4ytavX68ePXo4gpsk+fn5acKECfrkk0908OBBD60dAABA7Xh95q3M+fPndf78eR0/flxr167V1q1b9ac//UmS9N133+ns2bPq27dvuff17dtXGRkZKiwsVEBAgHJzcyVJffr0caoXFham0NBQx3JJys3N1aBBgypsU5K++OILtW/fvsL+FhUVqaioyPH65MmTkiS73V7huXV1Udaeu9uF6xgD72MMvIvt732Mgfe5OgaeHiOfCW9TpkzRn//8Z0lS06ZN9cc//lH333+/pNJDoZJks9nKvc9ms8kwDB0/flxhYWHKy8uT1WpVUFBQhXXL2iprt7I2L/69FVm4cKFSU1PLlW/btk2BgYFVrWqtZWRkeKRduI4x8D7GwLvY/t7HGHhfdWNQUFDg0d/vM+Ht0Ucf1eTJk3XkyBG99957euCBB3TmzBn9/ve/d9SxWCyVvv/iZa7Wq2ndi82aNUvTp093vD558qQ6duyomJgYp0O77mC325WRkaFhw4bJ39/frW3DNYyB9zEG3sX29z7GwPtcHYOyo3Ge4jPhrVOnTurUqZMkafjw4ZJKA9I999yjkJAQSRXPhOXn58tisahly5aSpJCQEBUWFqqgoKDcDFh+fr4iIyMdr0NCQiptU6p4pq+M1WqV1WotV+7v7++xncqTbcM1jIH3MQbexfb3PsbA+6obA0+Pj89esNC/f38VFxfr+++/19VXX61mzZopJyenXL2cnBx17dpVAQEBki6c63Zp3cOHD+vYsWPq3bu3o6xPnz6VtinJqS4AAIAv8NnwlpWVpcsuu0xXXXWV/Pz8NHLkSK1bt06nTp1y1Pnhhx+UlZWl+Ph4R1lsbKwCAgKUnp7u1F56erosFotGjx7tKIuLi9OePXucbglSXFysNWvWaMC
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2023-08-21 11:26:02 +02:00
"source": [
2023-08-28 09:35:22 +02:00
"shotNum = \"0018\"\n",
2023-08-21 11:26:02 +02:00
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
2023-08-28 09:35:22 +02:00
" for i in [0]\n",
2023-08-21 11:26:02 +02:00
"}\n",
"\n",
2023-08-28 09:35:22 +02:00
"dataSet = dataSetDict[\"camera_0\"]\n",
2023-08-21 11:26:02 +02:00
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
2023-08-28 09:35:22 +02:00
"imageAnalyser.center = (535, 995)\n",
"imageAnalyser.span = (350, 350)\n",
2023-08-21 11:26:02 +02:00
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
2023-08-28 09:35:22 +02:00
"plt.ylim([0, 3500])\n",
2023-08-21 11:26:02 +02:00
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
2023-08-28 09:35:22 +02:00
"plt.show()"
2023-08-21 11:26:02 +02:00
]
},
{
"cell_type": "code",
2023-08-28 09:35:22 +02:00
"execution_count": 9,
2023-08-21 11:26:02 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-08-28 09:35:22 +02:00
"Ncount_mean_total = xr.concat((Ncount_mean_total, Ncount_mean), dim='als_final_current')\n",
"Ncount_std_total = xr.concat((Ncount_std_total, Ncount_std), dim='als_final_current')"
2023-08-21 11:26:02 +02:00
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
2023-08-28 09:35:22 +02:00
"# 0.050 - 0.075 A"
2023-08-21 11:26:02 +02:00
]
},
{
"cell_type": "code",
2023-08-28 09:35:22 +02:00
"execution_count": 10,
2023-08-21 11:26:02 +02:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
2023-08-28 09:35:22 +02:00
"{'als_final_current': array([0.05 , 0.0509, 0.0518, 0.0527, 0.0536, 0.0545, 0.0554, 0.0563,\n",
" 0.0572, 0.0581, 0.059 , 0.0599, 0.0608, 0.0617, 0.0626, 0.0635,\n",
" 0.0644, 0.0653, 0.0662, 0.0671, 0.068 , 0.0689, 0.0698, 0.0707,\n",
" 0.0716, 0.0725, 0.0734, 0.0743, 0.0752, 0.0761]), 'runs': array([0., 1.])}\n"
2023-08-21 11:26:02 +02:00
]
},
{
"data": {
2023-08-28 09:35:22 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAnAAAAHPCAYAAADTZ+eeAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACX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vrDH/6ge+65R1L1sqgk2Ww2l9fZbDYZhqEjR44oIiJCJSUlslqtCgkJcVu3pq2admtr8+yf686CBQuUnZ3tUv7OO+8oODi4rk1tkvz8/GZrG64Yb+9jzL2L8fY+xtz7zDLmZWVl9a7rNwFu1qxZSk1N1cGDB/X222/r/vvv18mTJ/XQQw856lgsllpff/Zz9a3X0LpnmzlzpqZPn+54fOzYMXXr1k0JCQlOy7yeYrfblZ+frxEjRigwMNDj7cMZ4+19jLl3Md7ex5h7n9nGvGY1rz78JsB1795d3bt3lySNHDlSUnVIuuuuuxQWFibJ/YxYaWmpLBaL2rdvL0kKCwtTeXm5ysrKXGbCSktLFRMT43gcFhZWa5uS+xm/GlarVVar1aU8MDCwWXeS5m4fzhhv72PMvYvx9j7G3PvMMuYN6aPfnsQwaNAgVVZW6uuvv9bll1+uNm3aqKioyKVeUVGRevfuraCgIEk/Hft2bt0DBw7o8OHD6t+/v6NswIABtbYpyakuAACAv/DbALdt2zZddNFFuuyyyxQQEKBbbrlFa9eu1fHjxx11vvnmG23btk3JycmOssTERAUFBSkvL8+pvby8PFksFo0ePdpRlpSUpF27djldLqSyslKrVq3S4MGD1aV
2023-08-21 11:26:02 +02:00
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
2023-08-28 09:35:22 +02:00
"shotNum = \"0019\"\n",
2023-08-21 11:26:02 +02:00
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
" for i in [0]\n",
"}\n",
"\n",
"dataSet = dataSetDict[\"camera_0\"]\n",
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
2023-08-28 09:35:22 +02:00
"imageAnalyser.center = (535, 995)\n",
"imageAnalyser.span = (350, 350)\n",
2023-08-21 11:26:02 +02:00
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
2023-08-28 09:35:22 +02:00
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
"plt.ylim([0, 3500])\n",
2023-08-21 11:26:02 +02:00
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
2023-08-28 09:35:22 +02:00
"plt.show()"
2023-08-21 11:26:02 +02:00
]
},
{
"cell_type": "code",
2023-08-28 09:35:22 +02:00
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"Ncount_mean_total = xr.concat((Ncount_mean_total, Ncount_mean), dim='als_final_current')\n",
"Ncount_std_total = xr.concat((Ncount_std_total, Ncount_std), dim='als_final_current')"
]
},
{
"cell_type": "code",
"execution_count": 12,
2023-08-21 11:26:02 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-08-28 09:35:22 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHPCAYAAAAFwj37AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABgIUlEQVR4nO3deXgUVdo28LvN0k0SEDthycaiLHnZgkaBqEgCghkGBhJREREIg46CAsIYggQkyKpRYZggw4iAAoJoAGXYQgjop4h55XUmUXEFZDFAEiCQtRPO90emm3R6rd6Lun/X1Rd09enT56muVD91TtUplRBCgIiIiIhk4RZvN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ZWWlXOZ9J3l566SVMmjQJFy5cwCeffILnnnsOFRUV+Otf/2ooo1KpLL6/8Wv2lpNatrHZs2djxowZhufl5eWIjo7GkCFDjIZ2XUWn0yE3NxeDBw9GQECAy+v3ZUqOHVB2/EqOHVB2/EqOHVB2/EqOXT+KZ4vPJG/t2rVDu3btAABDhw4F0JAgjR8/HqGhoQDM94SVlZVBpVKhZcuWAIDQ0FBUV1ejsrLSpAesrKwMcXFxhuehoaEW6wTM9/TpqdVqqNVqk+UBAQFu3djcXb8vU3LsgLLjV3LsgLLjV3LsgLLjV2Ls9sbrsxcs9OnTB3V1dfj1119xxx13oFmzZigsLDQpV1hYiE6dOkGj0QC4ca5b07LFxcUoKSlBjx49DMt69uxpsU4ARmWJiIiIfIHPJm/5+fm45ZZbcPv
2023-08-21 11:26:02 +02:00
"text/plain": [
2023-08-28 09:35:22 +02:00
"<Figure size 640x480 with 1 Axes>"
2023-08-21 11:26:02 +02:00
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
2023-08-28 09:35:22 +02:00
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean_total.plot.errorbar(ax=ax, yerr = Ncount_std_total, fmt='ob')\n",
"plt.ylim([0, 3500])\n",
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
2023-08-21 11:26:02 +02:00
]
},
{
2023-08-28 09:35:22 +02:00
"attachments": {},
"cell_type": "markdown",
2023-08-21 11:26:02 +02:00
"metadata": {},
"source": [
2023-08-28 09:35:22 +02:00
"# 0.075 - 0.100 A"
2023-08-21 11:26:02 +02:00
]
},
{
"cell_type": "code",
2023-08-28 09:35:22 +02:00
"execution_count": 13,
2023-08-21 11:26:02 +02:00
"metadata": {},
"outputs": [
2023-08-28 09:35:22 +02:00
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'als_final_current': array([0.075 , 0.0759, 0.0768, 0.0777, 0.0786, 0.0795, 0.0804, 0.0813,\n",
" 0.0822, 0.0831, 0.084 , 0.0849, 0.0858, 0.0867, 0.0876, 0.0885,\n",
" 0.0894, 0.0903, 0.0912, 0.0921, 0.093 , 0.0939, 0.0948, 0.0957,\n",
" 0.0966, 0.0975, 0.0984, 0.0993, 0.1002, 0.1011]), 'runs': array([0., 1.])}\n"
]
},
2023-08-21 11:26:02 +02:00
{
"data": {
2023-08-28 09:35:22 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHPCAYAAAAFwj37AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABffklEQVR4nO3df1xUVf4/8NcVcIYfIg4oAuKPtGRJQGP9wW4opCKZrjLhrpkVuFibJpq2iIIGpmifqDQXay0TN8pKA9tcFZGQ2izjW7sbaNZuqSmmCKgoODDg/f4xzcgwAwwwvy68no8HD5lzzz1z7nvv5ttz7j1HEEVRBBERERFJQi9bd4CIiIiITMfkjYiIiEhCmLwRERERSQiTNyIiIiIJYfJGREREJCFM3oiIiIgkhMkbERERkYQweSMiIiKSECZvRERERBJid8nbG2+8AUEQ4ObmplceFxcHQRAMfgICAoy2s3XrVgQEBEAmk2HYsGFIT0+HWq02qFdRUYG4uDh4eXnBxcUFYWFhKCwstMi1EREREXWVo6070Fx5eTmeeeYZ+Pr64tq1awbHnZ2d8fHHHxuUtbRhwwasWbMGycnJiIqKQklJCVJTU1FeXo7t27fr6tXX12Py5Mm4evUqtmzZggEDBiArKwvR0dE4cuQIJk2aZP6LJCIiIuoCwZ72Np05cyYEQYBCocDevXtx48YN3bG4uDiDMmOqqqowaNAgPProo/jrX/+qK8/IyEBqairKysoQGBgIANi2bRsWL16MY8eOISwsDADQ2NiIkJAQuLm54fjx4xa4SiIiIqLOs5tp05ycHBQXF2Pbtm1daufQoUNQqVSIj4/XK4+Pj4coiti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wcEGx4KDg1FQUACVSgW5XI6ysjIAQFBQkF49Hx8feHl56Y4DQFlZGcLDw422CQAnTpyAn5+f0T7X19ejvr5e97mmpgYAoFarjT5b11XaNi3RNhlivK2PMbcuxtv6bBFzzVc56b63p/3PLbX73NR+2kXytmjRIowcORJPPvmk0eNVVVUAAIVCYXBMoVBAFEVcuXIFPj4+qKqqgkwmg6urq9G62ra07bbWZvPvNWbjxo1IT083KD98+DBcXFxaPa+rCgoKLNY2GWK8rY8xty7G2/qsGXOVygHADABAfn4+5PImq323PZHKfV5XV2dSPZsnbx988AE++ugj/Otf/4IgCG3Wbet482Om1uto3eZWrVqF5cuX6z7X1NTA398fUVFRelO75qJWq1FQUICpU6fCycnJ7O2TPsbb+hhz62K8rc8WMW++PMi0adNgZFyjW5Pafa6dxWuPTZO3GzduYPHixViyZAl8fX1x9epVAEBDQwMA4OrVq3BycoKnpycA4yNh1dXVEAQBHh4eAABPT0+oVCrU1dUZjIBVV1cjNDRU99nT07PVNgHjI31aMpkMMpnMoNzJycmiN4il2yd9jLf1MebWxXhbnzVj3vxrNN9rla+1O1K5z03to01fWKisrMSlS5fw4osvol+/frqf3bt3o7a2Fv369cPDDz+M4cOHw9nZGaWlpQZtlJaWYsSIEZDL5QBuP+vWsu7FixdRWVmJUaNG6cqCgoJabROAXl0iIiIie2DT5G3gwIEoKioy+Jk2bRrkcjmKioqwfv16ODo6YubMmcjNzcX169d15//0008oKiqCUqnUlUVHR0MulyM7O1vvu7KzsyEIAmbPnq0ri4mJwalTp/SWBGlsbEROTg7Gjx9vdL05IiIiIluy6bSpXC5HRESEQXl2djYcHBz0jqWnp2Ps2LGYMWMGkpOToVKpsHbtWnh5eWHFihW6egqFAqmpqVizZg0UCgWioqJQUlKCtLQ0JCQk6NZ4A4A
2023-08-21 11:26:02 +02:00
"text/plain": [
2023-08-28 09:35:22 +02:00
"<Figure size 640x480 with 1 Axes>"
2023-08-21 11:26:02 +02:00
]
},
"metadata": {},
2023-08-28 09:35:22 +02:00
"output_type": "display_data"
2023-08-21 11:26:02 +02:00
}
],
"source": [
2023-08-28 09:35:22 +02:00
"shotNum = \"0020\"\n",
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
" for i in [0]\n",
"}\n",
"\n",
"dataSet = dataSetDict[\"camera_0\"]\n",
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"imageAnalyser.center = (535, 995)\n",
"imageAnalyser.span = (350, 350)\n",
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
"plt.ylim([0, 4500])\n",
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
2023-08-21 11:26:02 +02:00
]
},
{
"cell_type": "code",
2023-08-28 09:35:22 +02:00
"execution_count": 14,
2023-08-21 11:26:02 +02:00
"metadata": {},
"outputs": [],
"source": [
2023-08-28 09:35:22 +02:00
"Ncount_mean_total = xr.concat((Ncount_mean_total, Ncount_mean), dim='als_final_current')\n",
"Ncount_std_total = xr.concat((Ncount_std_total, Ncount_std), dim='als_final_current')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# 0.100 - 0.125 A"
2023-08-21 11:26:02 +02:00
]
},
{
"cell_type": "code",
2023-08-28 09:35:22 +02:00
"execution_count": 15,
2023-08-21 11:26:02 +02:00
"metadata": {},
"outputs": [
2023-08-28 09:35:22 +02:00
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'als_final_current': array([0.1 , 0.1009, 0.1018, 0.1027, 0.1036, 0.1045, 0.1054, 0.1063,\n",
" 0.1072, 0.1081, 0.109 , 0.1099, 0.1108, 0.1117, 0.1126, 0.1135,\n",
" 0.1144, 0.1153, 0.1162, 0.1171, 0.118 , 0.1189, 0.1198, 0.1207,\n",
" 0.1216, 0.1225, 0.1234, 0.1243, 0.1252, 0.1261]), 'runs': array([0., 1.])}\n"
]
},
2023-08-21 11:26:02 +02:00
{
"data": {
2023-08-28 09:35:22 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHPCAYAAAAFwj37AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABE6UlEQVR4nO3de1xUdeL/8fckOIhoBJjiLc0ba4IWq0abCZlmpauidrUUs3bT9bK6a7heklK0zXZzXav1kYob2cUSK9cbElq/LsbmtkFltd4vmQqWFwSBzu8PvoyODAjMMHMOvJ6PBw+dcz7zmc/58GHmPZ/PmTM2wzAMAQAAwBKu8HUDAAAAUHWENwAAAAshvAEAAFgI4Q0AAMBCCG8AAAAWQngDAACwEMIbAACAhRDeAAAALITwBgAAYCE+D2/btm2TzWZz+fPJJ584ld25c6duu+02BQUFKTg4WPHx8dqzZ4/LepcsWaKIiAjZ7Xa1b99eSUlJKioqKlfu2LFjGjNmjMLCwhQYGKiYmBhlZGTUyrECAAC4y8/XDSiTnJysuLg4p23dunVz/H/Xrl2KjY1Vjx499MYbb6igoEBz5sxRnz599Pnnn6tZs2aOsvPnz9fs2bOVmJioAQMGKCsrS7NmzdLhw4e1bNkyR7nCwkL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UWHj5lR0zjKu6wiqvnfn5+VUq5/Pw9tZbb+ndd9/Vf/7zH9lslZ/MWdn+i/dVtVx1y15sxowZmjp1quP2qVOn1KZ
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"shotNum = \"0021\"\n",
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
" for i in [0]\n",
"}\n",
"\n",
"dataSet = dataSetDict[\"camera_0\"]\n",
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"imageAnalyser.center = (535, 995)\n",
"imageAnalyser.span = (350, 350)\n",
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
"plt.ylim([0, 5000])\n",
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
"Ncount_mean_total = xr.concat((Ncount_mean_total, Ncount_mean), dim='als_final_current')\n",
"Ncount_std_total = xr.concat((Ncount_std_total, Ncount_std), dim='als_final_current')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# 0.125 - 0.150 A"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'als_final_current': array([0.125 , 0.1259, 0.1268, 0.1277, 0.1286, 0.1295, 0.1304, 0.1313,\n",
" 0.1322, 0.1331, 0.134 , 0.1349, 0.1358, 0.1367, 0.1376, 0.1385,\n",
" 0.1394, 0.1403, 0.1412, 0.1421, 0.143 , 0.1439, 0.1448, 0.1457,\n",
" 0.1466, 0.1475, 0.1484, 0.1493, 0.1502, 0.1511]), 'runs': array([0., 1.])}\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHPCAYAAAAFwj37AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABGzElEQVR4nO3de1xUdeL/8fckOIhoNuAFb3mXNUGL1NgyIQvJ1VVQtzLbxKwtXS+rrWFeKW+V7ea6VF9/qbhZVpZauV5Cwuq7lbG1bVDZzbtmJmheEAQ8vz/4MjoyKDDXA6/n48FD53M+85nP+XCYeZ/PuYzFMAxDAAAAMIUrfN0BAAAAVB3hDQAAwEQIbwAAACZCeAMAADARwhsAAICJEN4AAABMhPAGAABgIoQ3AAAAEyG8AQAAmIjPw9v27dtlsVic/nz88ccOdT/77DPdeuutCgkJUZMmTZSUlKRdu3Y5bXfp0qWKiIiQ1WpV+/btlZqaquLi4gr1jhw5otGjRyssLEzBwcGKiYlRZmamR9YVAADAVQG+7kC5BQsWKC4uzqGse/fu9v/v3LlTsbGx6tmzp1577TUVFhZq9uzZ6tu3rz7//HM1bdrUXnf+/PmaNWuWUlJSFB8fr+zsbM2cOVMHDx7UsmXL7PWKiorUv39/HT9+XEuWLFGzZs2UlpamhIQEbdu2Tf369fP8igMAAFSH4WNZWVmGJGPt2rWXrDdixAgjLCzM+OWXX+xle/bsMQID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xOnv2rF577TWtWLFC3377rfr27auff/7Zoe78+fM1adIkJSUlaevWrRo3bpwWLFig8ePHO9QrKipS//79lZmZqSVLlujNN99U8+bNlZCQoPfee8+j6woAAFATAb7uwIUefPBB3XzzzbLZbHr99dcdls2ePVtWq1UbN25U48aNJUnR0dHq3LmzFi9erCeeeEKSlJeXp3nz5un+++/XggULJEmxsbEqLi7WzJkzNXnyZHXr1k2StHz5cuXm5urDDz9UTEyMJCkuLk49evTQtGnTtGPHDm+tOuqQ06el8onlU6ekhg192x/4B7YLwL/509+o38y8rV69Wu+9956effbZCstKSkq0ceNGDRs2zB7cJOnqq69WXFyc1q9fby/bsmWLCgsLlZyc7NBGcnKyDMPQhg0b7GXr169X165d7cFNkgICAjRq1Ch98sknOnjwoBvXEAAAwHV+MfN25MgRTZ48WYsWLVLr1q0rLP/hhx905swZRUVFVVgWFRWljIwMFRYWKigoSLm5uZKkyMhIh3rh4eEKCwuzL5ek3Nxc9e3b12mbkvTll1+qVatWTvtcVFSkoqIi++MTJ05IkoqLi52eW+eq8jY90baZnD4tXXVVoCTp2LFij+35eHK8y5oMtLdv1l+pu9ejrm/jhYVS+XhmZZXo1lsN1avnuder6+PtC74Y89ryflNT7hxzb/yNVrWffhHexo0bp65du+qhhx5yujwvL0+SZLPZKiyz2WwyDEPHjh1TeHi48vLyZLVa1dDJp7rNZrO3Vd5uZW1e+LrOLFy4UKmpqRXK33nnHQUHB1f6PFdlZGR4rG0zKCysJ2mQJGnr1q0KCir16Ot5Yry9vQ6e4qn1qIvb+Ecfhev//b9IlX8wDB4coNDQMxo7NkcxMT969LXr4nj7mjfHvLa837jK1TH31t9oQUFBler5PLy98cYbevvtt/Wf//xHFovlknUvtfzCZVWtV926F5o+fbqmTJlif3zixAm1adNG8fHxDod23aW4uFgZGRm67bbbFBgY6Pb2zeLCW1IMGDDAozNvnhpvb62Dp7l7PerqNr5+vUVPPllPhuFYnp8fpCef7KVXXilVYqLh/MkuqM3j7a0Z+uryxZj/30EhSVLDhgken9H
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"shotNum = \"0022\"\n",
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
" for i in [0]\n",
"}\n",
"\n",
"dataSet = dataSetDict[\"camera_0\"]\n",
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"imageAnalyser.center = (535, 995)\n",
"imageAnalyser.span = (350, 350)\n",
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
"plt.ylim([0, 5000])\n",
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
"Ncount_mean_total = xr.concat((Ncount_mean_total, Ncount_mean), dim='als_final_current')\n",
"Ncount_std_total = xr.concat((Ncount_std_total, Ncount_std), dim='als_final_current')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# 0.150 - 0.175 A"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'als_final_current': array([0.15 , 0.1509, 0.1518, 0.1527, 0.1536, 0.1545, 0.1554, 0.1563,\n",
" 0.1572, 0.1581, 0.159 , 0.1599, 0.1608, 0.1617, 0.1626, 0.1635,\n",
" 0.1644, 0.1653, 0.1662, 0.1671, 0.168 , 0.1689, 0.1698, 0.1707,\n",
" 0.1716, 0.1725, 0.1734, 0.1743, 0.1752, 0.1761]), 'runs': array([0., 1.])}\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHPCAYAAAAFwj37AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABX/klEQVR4nO3de1xUZf4H8M9RcIaLpAPKzWve+KlcjPXCbiR4QTJdBbU1cwtM200TTVtCQQMvaL+odFmsdb3ARllpYOUqiIjUL8vY3HbBVmu9VZgig4o6Mg54fn+wjIwzwABzOUc+79eLV81znnl4ztfDzGfObQRRFEUQERERkSx0svcEiIiIiMh8DG9EREREMsLwRkRERCQjDG9EREREMsLwRkRERCQjDG9EREREMsLwRkRERCQjDG9EREREMsLwRkRERCQjkgtv27ZtgyAIcHV1NWiPiYmBIAhGP35+fibHSU9Ph5+fHxQKBfr374+UlBTodDqjfhUVFYiJiYGHhwecnZ0REhKCwsJCq6wbERERUXs52HsCjZWXl+PFF1+Ej48Prl27ZrTcyckJhw8fNmq71/r167Fq1SokJCQgIiICJSUlSEpKQnl5ObZu3arvp9VqMX78eFy9ehWbN29Gz549kZGRgcjISBw6dAhjx461/EoSERERtYMgpe82nTp1KgRBgEqlwp49e3Djxg39spiYGKM2U9RqNXr16oWnnnoKf/7zn/XtqampSEpKQllZGYYOHQoA2LJlCxYtWoSjR48iJCQEAFBbW4vAwEC4urri2LFjVlhLIiIioraTzGHT7OxsFBcXY8uWLe0aJy8vDzU1NYiNjTVoj42NhSiK2Lt3r74tNzcXQ4YM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BaipqYFSqURZWRkAwN/f36Cft7c3PDw89MsBoKysDKGhoSbHBIATJ07A19fX5Jy1Wi20Wq3+cXV1NQBAp9OZPLeuvRrGtMbYZIz1to2bN4Hu3R0BABUVrHl71JfN8b//r0NLZZTqNt7a9ZAqU+sh1Zo3R+7/Hg21vnpVh54969fjyhUdXFzsOaummbttSCK8LVy4EEOGDMFzzz1ncrlarQYAqFQqo2UqlQqiKOLKlSvw9vaGWq2GQqGAi4l/GZVKpR+rYdymxmz8e03ZsGEDUlJSjNoPHjwIZ2fnJp/XXgUFBVYbm4xJtd41NZ0xe/YUAMB77+2DUlln5xm1jUbTGUD9eqSn/xNBQdKtudTV1NytZX5+vtnbhNTq3XibeP31vyMoqAKdO9t3Tm3R3L+H1GrenLZuV9aYR3te8w4fPgwprEdLNBqNWf3sHt4+/PBDfPLJJ/jHP/4BQRCa7dvc8sbLzO3X2r6NrVixAsuWLdM/rq6uRu/evREREWFwaNdSdDodCgoKMHHiRDg6Olp8fDIk9Xo3PgwzadIku3yKbLzXrC2fZHNzBbz44t135bVrQ+Dufgvp6Z0wc6ZkzuiQjdZuE1Lcxk1tE76+Il5/vQ5RUaIdZ9Z6pv49pFjzlvz3oBIAwMUlEhMmiHYJ0219zWuo+bhx49r0fFurblzwZtg1vN24cQOLFi3C4sWL4ePjg6tXrwIAbt++DQC4evUqHB0d4e7uDsD0nrCqqioIgoBu3boBANzd3VFTUwONRmO0B6yqqgrBwcH6x+7u7k2OCZje09dAoVBAoVAYtTs6Olr1j9La49/v6uqAzz4Dfv4Z8PYGQkPR7AuRVOvdeEr1c5TXHHJygNmzAfGe92O1WoknnwQUCgHR0ZaZZ0fR1n8PqWzjTW0TFy4ImD3bAXv2QFbbRHP/HlKpeUtycoC4uLuPp051QK9ewObNtv+3aO9rXuN6t/U1s7XvH21h7nZh14+3lZWVuHT
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"shotNum = \"0023\"\n",
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
" for i in [0]\n",
"}\n",
"\n",
"dataSet = dataSetDict[\"camera_0\"]\n",
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"imageAnalyser.center = (535, 995)\n",
"imageAnalyser.span = (350, 350)\n",
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
"plt.ylim([0, 4500])\n",
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [],
"source": [
"Ncount_mean_total = xr.concat((Ncount_mean_total, Ncount_mean), dim='als_final_current')\n",
"Ncount_std_total = xr.concat((Ncount_std_total, Ncount_std), dim='als_final_current')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# 0.175 - 0.200 A"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'als_final_current': array([0.175 , 0.1759, 0.1768, 0.1777, 0.1786, 0.1795, 0.1804, 0.1813,\n",
" 0.1822, 0.1831, 0.184 , 0.1849, 0.1858, 0.1867, 0.1876, 0.1885,\n",
" 0.1894, 0.1903, 0.1912, 0.1921, 0.193 , 0.1939, 0.1948, 0.1957,\n",
" 0.1966, 0.1975, 0.1984, 0.1993, 0.2002, 0.2011, 0.202 ]), 'runs': array([0., 1.])}\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHPCAYAAAAFwj37AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABbqElEQVR4nO3de1xUZf4H8M9RcLiJOKDcxEtisshF4+eF3VBMITJNQd01swLFdtNE05ZQ0MAUbaPSdbHWvMBKVw1scxVFRNrNS2xuG1Tabl5STJFBRUWGAc/vD3ZGxhlggLkd+LxfL146z3nOM8/5cjjzPec85xlBFEURRERERCQJ3SzdASIiIiIyHJM3IiIiIglh8kZEREQkIUzeiIiIiCSEyRsRERGRhDB5IyIiIpIQJm9EREREEsLkjYiIiEhCmLwRERERSYjVJW9bt26FIAhwcnLSKo+NjYUgCDo/fn5+etvZtGkT/Pz8IJPJMGjQIKSlpUGlUunUq6ioQGxsLNzc3ODg4IDQ0FAUFhaaZNuIiIiIOsrG0h1oqry8HC+99BK8vLxw48YNneX29vY4fPiwTtn91q5di5UrVyIpKQmRkZEoKSlBSkoKysvLsWXLFk09pVKJCRMm4Pr169i4cSP69u2LzMxMREVF4dChQxg3bpzxN5KIiIioAwRr+m7TKVOmQBAEyOVy7N69G7du3dIsi42N1SnTR6FQoF+/fnjmmWfw5z//WVOenp6OlJQUlJWVwd/fHwCwefNmLFy4EEePHkVoaCgAoL6+HsHBwXBycsKJEydMsJVERERE7Wc1t01zcnJQXFyMzZs3d6id/Px81NbWIi4uTqs8Li4Ooihiz549mrK8vDwMHTpUk7gBgI2NDebMmYMvv/wS5eXlHeoLERERkbFZxW3TiooKLFmyBOvXr0e/fv2arXfnzh14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OLKW0VFBZYsWYL169ejX79+Ost//PFH3LlzB0FBQTrLgoKCUFBQgNraWtjZ2aGsrAwAEBgYqFXP09MTbm5umuUAUFZWhrCwML1tAsC3334Lb29vvX1WKpVQKpWa19XV1QAAlUqld2xdRzQ2Z9ukfaM2b/XMtf3q35u+319X/x0YU0txJuNgjI2joQFISLCBKAKAoLVMFBtPKLdtC0BycuePs6WOgV1tXzZ0O60ieVuwYAGGDh2K559/Xu9yhUIBAJDL5TrL5HI5RFHEtWvX4OnpCYVCAZlMBkc9jwPK5XJNW+p2m2uz6fvqs27dOqSlpemUHzx4EA4ODs2u1x61td0BTAYAHD58GHZ2XWuwRdPtP3DggMm3v6CgwOJ96Ar0xZmMizHumNJSV5SXP9zsclEUUFnpgI0b/4HAwOY/LzqDmpp7x8A33/wnhg+vQPfu5nv/rrIv19TUGFTP4snbJ598gs8++wz/+te/IAhCi3VbWt50maH12lq3qeXLl2Pp0qWa19XV1fDx8UFkZKTWrV1jaHqr8JFHHoGLi61R27d2Tbf/0UcfNdk0HSqVCgUFBYiIiICtrXaMzdWHrqClOHdWt28DvXs3buu1ayqT7z/WGOPqasDNrbEvn31Wj4kTRbN++LdHdXXLn0lq/fqNxKRJVjMKyejy8gS89NK9X9arr4bC21vEm282IDpaNOl7W+O+bErqu3itsWjyduvWLSxcuBCLFi2Cl5cXrl+/DgCoq6sDAFy/fh22trZwdXUFoP9KWFVVFQRBgMv/Jj9zdXVFbW0tampqdK6AVVVVISQkRPPa1dW12TYB/Vf61GQyGWR6Rqra2toafQdr2pwp2je1hgbg738Hfv4Z8PQEwsLQpoO27vYbv4/a76cbY3P3oSuQ4r7cXpbaf5rG2JJ
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"shotNum = \"0024\"\n",
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
" for i in [0]\n",
"}\n",
"\n",
"dataSet = dataSetDict[\"camera_0\"]\n",
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"imageAnalyser.center = (535, 995)\n",
"imageAnalyser.span = (350, 350)\n",
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
"plt.ylim([0, 4500])\n",
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [],
"source": [
"Ncount_mean_total = xr.concat((Ncount_mean_total, Ncount_mean), dim='als_final_current')\n",
"Ncount_std_total = xr.concat((Ncount_std_total, Ncount_std), dim='als_final_current')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# 0.200 - 0.225 A"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'als_final_current': array([0.2 , 0.2009, 0.2018, 0.2027, 0.2036, 0.2045, 0.2054, 0.2063,\n",
" 0.2072, 0.2081, 0.209 , 0.2099, 0.2108, 0.2117, 0.2126, 0.2135,\n",
" 0.2144, 0.2153, 0.2162, 0.2171, 0.218 , 0.2189, 0.2198, 0.2207,\n",
" 0.2216, 0.2225, 0.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VQqiKKIS5cuwc/PD1qtFgqFAp6enhbrGtoytNtcm40/15KVK1ciPT3drHzv3r3w8PBo9ri2KigoaLe2yRzjLT3GXFqMt/QYc+nJJebV1dVW13V4Avfpp5/i888/xz/+8Q8IgtBi3Zb2N95nbT1b6za2cOFCzJ8/37hdVVWFwMBAxMTEmEzz2otOp0NBQQHGjRsHNzc3u7dPphhv6THm0mK8pceYS09uMTfM5lnDoQnctWvXMHv2bMyZMwf+/v64fPkyAKCurg4AcPnyZbi5ucHHxweA5RGxyspKCIKA7t27AwB8fHxQU1OD6upqs5GwyspKhIeHG7d9fHyabROwPOJnoFAooFAozMrd3Nza9SJp7/bJFOMtPcZcWoy39Bhz6ckl5rb00aEPMVRUVODChQt466230KNHD+PX1q1bcf36dfTo0QNPPPEEBg4cCHd3d5SUlJi1UVJSgkGDBkGpVAK4de9b07rnz59HRUUFhgwZYiwLCQlptk0AJnWJiIiInIVDE7jevXujqKjI7Ouhhx6CUqlEUVERli9fDldXV0ycOBG5ubm4evWq8fiff/4ZRUVF0Gg0xrLY2FgolUpkZ2ebfFZ2djYEQcDkyZONZXFxcThx4oTJciH19fXIyclBRESExfXoiIiIiBzNoVOoSqUS0dHRZuXZ2dlwcXEx2Zeeno5hw4ZhwoQJSElJQU1NDZYuXQq1Wo0FCxYY66lUKqSmpmLJkiVQqVSIiYlBcXEx0tLSkJiYaFwDDgBmzpyJrKwsTJ06FatWrUKvXr2wbt06fPfdd9i3b197njoRERFRqznNOnC3ExQUhAMHDsDNzQ1TpkxBfHw
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"shotNum = \"0025\"\n",
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
" for i in [0]\n",
"}\n",
"\n",
"dataSet = dataSetDict[\"camera_0\"]\n",
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"imageAnalyser.center = (535, 995)\n",
"imageAnalyser.span = (350, 350)\n",
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
"plt.ylim([0, 4500])\n",
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": [
"Ncount_mean_total = xr.concat((Ncount_mean_total, Ncount_mean), dim='als_final_current')\n",
"Ncount_std_total = xr.concat((Ncount_std_total, Ncount_std), dim='als_final_current')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# 0.220 - 0.250 A"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'als_final_current': array([0.22 , 0.2209, 0.2218, 0.2227, 0.2236, 0.2245, 0.2254, 0.2263,\n",
" 0.2272, 0.2281, 0.229 , 0.2299, 0.2308, 0.2317, 0.2326, 0.2335,\n",
" 0.2344, 0.2353, 0.2362, 0.2371, 0.238 , 0.2389, 0.2398, 0.2407,\n",
" 0.2416, 0.2425, 0.2434, 0.2443, 0.2452, 0.2461, 0.247 , 0.2479,\n",
" 0.2488, 0.2497, 0.2506, 0.2515]), 'runs': array([0., 1.])}\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHPCAYAAAAFwj37AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABXNUlEQVR4nO3de1xUdf4/8NcRcLh5G/DCTfHOqoDGprIbCqlIpqtMupnZJoa1q4m3FlHRwBS1sHRdzLVMTCtLF61cRRHR3K2MX37boLLavKR4ZdBQbg54fn9MMzLMAHOGGWYOvJ6PBw+Zz/nM4TPvjvbic875HEEURRFEREREJAtt7D0AIiIiIjIfwxsRERGRjDC8EREREckIwxsRERGRjDC8EREREckIwxsRERGRjDC8EREREckIwxsRERGRjDC8EREREcmI3cPbV199hUcffRTdu3eHm5sblEolwsPDsWvXLoN+M2bMgCAIRl9BQUEm97tp0yYEBQVBoVCgZ8+eSE1NhUajMep3/fp1zJgxA97e3nB3d0d4eDhyc3Nt8lmJiIiImsrZ3gO4desWAgIC8MQTT8DPzw9lZWV455138NRTT+H8+fNITk7W93Vzc8OxY8cM3u/m5ma0z9WrV2P58uVISkpCdHQ08vPzkZycjKKiImzdulXfr6qqCqNGjcKtW7ewceNGdOnSBRkZGYiJicHRo0cxcuRI231wIiIiIgsIjvps0+HDh+Py5cv4+eefAWhn3vbu3Ys7d+40+D61Wg1/f3/86U9/wj/+8Q99e1paGpKTk1FYWIgBAwYAADZv3ow5c+bg008/RXh4OACguroaoaGh8PT0xKlTp2z06YiIiIgsY/fTpvXx9vaGs7P0icHs7GxUVlYiLi7OoD0uLg6iKGL//v36tn379qF///764AYAzs7OmD59Or744gsUFRVZPH4iIiIiW7D7aVOde/fu4d69e7h58yb27NmDw4cP4+9//7tBn4qKCnTr1g03btyAj48PJk2ahJUrV0KpVOr7FBYWAgCCg4MN3uvj4wNvb2/9dl3fiIgIo7GEhIQAAL755hv4+fmZHG9VVRWqqqo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tbVqVMnZGVlSdpvQkICEhISGu3XtWtX7NixQ9K+iYiIiOzFYa95IyIiIiJjDG9EREREMsLwRkRERCQjDG9EREREMsLwRkRERCQjDG9EREREMsLwRkRERCQjDG9EREREMsLwRkRERCQjDG9EREREMsLwRkRERCQjDG9EREREMsLwRkRERCQjDG9EREREMsLwRkRERCQjDG9EREREMsLwRkRERCQjDG9EREREMsLwRkRERCQjDG9EREREMsLwRkRERCQjDG9EREREMsLwRkRERCQjDG9EREREMsLwRkRERCQjDG9EREREMsLwRkRERCQjDG9EREREMsLwRkRERCQjDG9EREREMsLwRkRERCQjDG9EREREMsLwRkRERCQjDG9EREREMsLwRkRERCQjDG9EREREMsLwRkRERCQjDG9EREREMsLwRkRERCQjDG9EREREMsLwRkRERCQjDG9EREREMsLwRkRERCQjdg9vX331FR599FF0794dbm5uUCqVCA8Px65du4z6nj59GqNHj4anpyc6duwIlUqFs2fPmtzvpk2bEBQUBIVCgZ49eyI1NRUajcao3/Xr1zFjxgx4e3vD3d0d4eHhyM3NtfrnJCIiIrIGu4e3W7duISAgAGlpaTh48CDefvttBAYG4qmnnsKqVav0/c6cOYPIyEjcvXsXH3zwAd566y388MMPiIiIwI0bNwz2uXr1asybNw8qlQqHDx/G7NmzkZaWhjlz5hj0q6qqwqhRo5Cbm4uNGzfiww8/RNeuXRETE4MTJ040y+cnIiIiksLZ3gOIjIxEZGSkQdv48eNx7tw5bN26FcnJyQCAFStWQKFQ4MCBA2jfvj0AICwsDH379kV6ejrWrVsHAFCr1Vi1ahVmzZqFtLQ0/c/QaDRITk7G/PnzMWDAAADAtm3bUFhYiE8//RTh4eEAgKioKISGhiIxMRGnTp1qjhIQERERmc3uM2/18fb2hrOzNltWV1fjwIEDeOyxx/TBDQB69OiBqKgo7Nu3T9+WnZ2NyspKxMXFGewvLi4Ooihi//79+rZ9+/ahf//++uAGAM7Ozpg+fTq++OILFBUV2ejTEREREVnG7jNvOvfu3cO9e/dw8+ZN7NmzB4cPH8bf//53AMBPP/2EiooKhISEGL0vJCQEOTk5qKyshKurKwoLCwEAwcHBBv18fHzg7e2t3w4AhYWFiIiIMLlPAPjmm2/g5+dncrxVVVWoqqrSvy4tLQUAaDQak9fWNZVun7bYd0vFmknDeknHmknHmknDekkn55qZO2aHCW+zZ8/GP/7xDwBA27Zt8be//Q3PPfccAO2pUABQKpVG71MqlRBFETdv3oSPjw/UajUUCgU8PDxM9tXtS7ff+vZZ++easmbNGqSmphq1HzlyBO7u7g191CbJycmx2b5bKtZMGtZLOtZMOtZMGtZLOjnWrLy83Kx+DhPeli5divj4eFy/fh0ff/wxnn/+eZSVleGFF17Q9xEEod73195mbj+pfWtbsmQJFi5cqH9dWlqKgIAAREdHG5zatRaNRoOcnByMGTMGLi4uVt9/S8SaScN6SceaSceaScN6SSfnmunO4jXGYcJb9+7d0b17dwDAuHHjAGgD0tNPPw0vLy8ApmfCSkpKIAgCOnbsCADw8vJCZWUlysvLjWbASkpKEBYWpn/t5eVV7z4B0zN9OgqFAgqFwqjdxcXFpgeLlP2XlQGentrv79wBTExGtgq2/m/S0rBe0rFm0rFm0rBe0smxZuaO12FvWBg6dCiqq6tx9uxZ9O7dG25ubigoKDDqV1BQgD59+sDV1RXA/Wvd6va9evUqiouLMWjQIH1bcHBwvfsEYNCXiIiIyBE4bHjLy8tDmzZt0KtXLzg7O2PChAnIysrC7du39X1
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"shotNum = \"0026\"\n",
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
" for i in [0]\n",
"}\n",
"\n",
"dataSet = dataSetDict[\"camera_0\"]\n",
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"imageAnalyser.center = (535, 995)\n",
"imageAnalyser.span = (350, 350)\n",
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
"plt.ylim([0, 3500])\n",
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [],
"source": [
"Ncount_mean_total = xr.concat((Ncount_mean_total, Ncount_mean), dim='als_final_current')\n",
"Ncount_std_total = xr.concat((Ncount_std_total, Ncount_std), dim='als_final_current')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# 0.250 - 0.275 A"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'als_final_current': array([0.25 , 0.2509, 0.2518, 0.2527, 0.2536, 0.2545, 0.2554, 0.2563,\n",
" 0.2572, 0.2581, 0.259 , 0.2599, 0.2608, 0.2617, 0.2626, 0.2635,\n",
" 0.2644, 0.2653, 0.2662, 0.2671, 0.268 , 0.2689, 0.2698, 0.2707,\n",
" 0.2716, 0.2725, 0.2734, 0.2743, 0.2752, 0.2761, 0.277 ]), 'runs': array([0., 1.])}\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHPCAYAAAAFwj37AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABSjklEQVR4nO3de1xVVf7/8fcJ8CCg2QEveLe88DUVi0llJhMzkTEdlXTGHCsxq29aWjZjqGhS3pqsdByqcSqx7GqhleMlJLW+XYxv/uY7WGMzU2qGmQrmBQQB9++PMxw5crif24bX8/HgIWfttddZ+8P2nM9Za+91LIZhGAIAAIApXObrDgAAAKD2SN4AAABMhOQNAADAREjeAAAATITkDQAAwERI3gAAAEyE5A0AAMBESN4AAABMhOQNAADARHyevP3tb3/TzTffrM6dO6t58+ay2WyKjY3V+vXrnepNmTJFFoul0k9UVJTLdlevXq2oqChZrVZ169ZNqampKikpqVTv2LFjmjJliiIiIhQSEqLY2FhlZWV55FgBAAAaKtDXHfjpp5/UqVMn3XrrrerQoYMKCgr0yiuv6LbbbtPBgweVkpLiqNu8eXN98MEHTvs3b968UptLlizRggULlJycrPj4eGVnZyslJUW5ublas2aNo15xcbGGDRumn376SatWrVKbNm2UlpamhIQE7dixQ0OGDPHcgQMAANSDxV+/23TQoEE6cuSIvvvuO0n2kbe33npLZ8+erXa/vLw8dezYUbfffrv+/Oc/O8qXLl2qlJQU7du3T71795YkPfPMM5oxY4Y++eQTxcbGSpJKS0sVHR2tsLAw7dmzx0NHBwAAUD8+nzatSkREhAID6z4wuG3bNhUVFSkpKcmpPCkpSYZhaNOmTY6yjRs3qlevXo7ETZICAwM1efJkff7558rNza13/wEAADzB59Om5S5cuKALFy7o5MmT2rBhg7Zv364//elPTnXOnTundu3a6fjx44qMjNTYsWP16KOPymazOers27dPktS3b1+nfSMjIxUREeHYXl538ODBlfrSr18/SdKXX36pDh06uOxvcXGxiouLnfqfn5+v8PBwWSyWOh49AABo6gzD0JkzZ9S+fXtddlnV42t+k7xNnz7dMc3ZrFkz/fGPf9Q999zj2B4dHa3o6Gj16dNHkrR79249/fTTysrKUnZ2tsLCwiTZp02tVqtCQ0MrPYfNZlNeXp7jcV5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Ukm81WaT+bzSbDMHTy5ElFRkYqLy9PVqtVoaGhLuuWt1XeblVtVnxeV5YtW6bU1NRK5e+//75CQkKqO9QGyczM9FjbsCPG3kGcPY8Yewdx9rymEuPCwsJa1fOb5G3evHmaNm2ajh07pvfee0/33XefCgoK9Lvf/c5Rx2KxVLl/xW21rVfXuhXNnTtXs2fPdjw+ffq0OnXqpPj4eKepXXcpKSlRZmamhg8frqCgILe3D2LsLfWJc0GBdMUV9ronT5bIxWczVMC57B3E2fOaWozLZ/Fq4jfJW+fOndW5c2dJ0siRIyXZE6Q77rhD4eHhklyPhOXn58tisahVq1aSpPDwcBUVFamwsLDSCFh+fr5iYmIcj8PDw6tsU3I90lfOarXKarVWKg8KCvLoCebp9tE4Y1xQIIWF2X8/e1Z+kfzUJc4Vq9n381CnGpnGeC77I+LseU0lxrU9Rr+9YWHAgAEqLS3Vt99+q6uuukrNmzdXTk5OpXo5OTnq3r27goODJV281u3SukePHtWJEyfUp08fR1nfvn2rbFOSU10AAAB/4LfJ286dO3XZZZfpyiuvVGBgoEaPHq2MjAydOXPGUee7777Tzp07lZiY6Ch
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"shotNum = \"0027\"\n",
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
" for i in [0]\n",
"}\n",
"\n",
"dataSet = dataSetDict[\"camera_0\"]\n",
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"imageAnalyser.center = (535, 995)\n",
"imageAnalyser.span = (350, 350)\n",
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
"plt.ylim([0, 3500])\n",
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [],
"source": [
"Ncount_mean_total = xr.concat((Ncount_mean_total, Ncount_mean), dim='als_final_current')\n",
"Ncount_std_total = xr.concat((Ncount_std_total, Ncount_std), dim='als_final_current')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# 0.270 - 0.300 A"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'als_final_current': array([0.27 , 0.2709, 0.2718, 0.2727, 0.2736, 0.2745, 0.2754, 0.2763,\n",
" 0.2772, 0.2781, 0.279 , 0.2799, 0.2808, 0.2817, 0.2826, 0.2835,\n",
" 0.2844, 0.2853, 0.2862, 0.2871, 0.288 , 0.2889, 0.2898, 0.2907,\n",
" 0.2916, 0.2925, 0.2934, 0.2943, 0.2952, 0.2961, 0.297 , 0.2979,\n",
" 0.2988, 0.2997, 0.3006]), 'runs': array([0., 1.])}\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHPCAYAAAAFwj37AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABSzklEQVR4nO3de1xVVf7/8fcR8CDgJcAL4r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YwrduaQvPm59HTHJ5i+fQP13HO/Vt++gXyiAYAaqiLrd17uhhsMRUSck83mec6ysiaxrajKJJoSV+wqg+TNjxV/orn8F7m8n2gAANZSmaHPgABp1KjdksxPYlsRlUk0K3vFrrYjefNTlf1EAwCwnsoOfcbFHdHKlUWVmsS2vMwmmvz/Vnkkb36qMp9oAADWVNn1OyXHUk/VMYmt2UST/98qz+fJ2/vvv6+RI0cqJiZGoaGhio6O1oABA/TZZ5+51BsxYoRsNpvbV0xMjMd2Fy5cqJiYGNntdrVt21ZpaWkqKChwq3fs2DGNGDFCkZGRCgkJUVxcnLZu3Volx1oRvnpqCADgO95Yv7O4nYQE6e67Hd/LO1RaHQvF8/9b5fk8eXvxxRe1f/9+jRs3TuvWrdOCBQt07Ngx9ezZU++//75L3Xr16mnHjh0uX2+++aZbm7NmzdK4ceOUnJysjRs36sEHH9Ts2bM1ZswYl3r5+fnq06ePtm7dqgULFujdd99V06ZNlZSUpG3btlXpcZfFF08NAQB8zxvrd1YHs4k
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"shotNum = \"0028\"\n",
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
" for i in [0]\n",
"}\n",
"\n",
"dataSet = dataSetDict[\"camera_0\"]\n",
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"imageAnalyser.center = (535, 995)\n",
"imageAnalyser.span = (350, 350)\n",
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
"plt.ylim([0, 3000])\n",
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [],
"source": [
"Ncount_mean_total = xr.concat((Ncount_mean_total, Ncount_mean), dim='als_final_current')\n",
"Ncount_std_total = xr.concat((Ncount_std_total, Ncount_std), dim='als_final_current')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# 0.300 - 0.325 A"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'als_final_current': array([0.3 , 0.3009, 0.3018, 0.3027, 0.3036, 0.3045, 0.3054, 0.3063,\n",
" 0.3072, 0.3081, 0.309 , 0.3099, 0.3108, 0.3117, 0.3126, 0.3135,\n",
" 0.3144, 0.3153, 0.3162, 0.3171, 0.318 , 0.3189, 0.3198, 0.3207,\n",
" 0.3216, 0.3225, 0.3234, 0.3243, 0.3252, 0.3261, 0.327 ]), 'runs': array([0., 1.])}\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAnAAAAHPCAYAAADTZ+eeAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABOtklEQVR4nO3dfVxUdd7/8fckOAhoNuAN3luaXKZisd6wm4mZRKWrkm7mWolLda0Wme4aJhqUopXduC7WWiZuVpat2uZ6h4TuTWVc9etaqLV2S800U0FDRXDQ8/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AAAAJkOAAwAAMBkCHAAAgMkQ4AAAAEyGAAcAAGAyBDgAAACTIcABAACYDAEOAADAZHwe4D799FPddttt6tatm1q1aiWbzaaYmBitXbu2WttPPvlEN910k0JDQ9W2bVslJCTo66+/dtnv8uXLFRkZKavVqp49eyo9PV12u71au6NHj2rq1KkKDw9XcHCwYmJilJOT4/b1BAAAcBefB7iTJ0+qa9euysjI0JYtW/THP/5RPXr00F133aWFCxc62u3du1exsbE6d+6c3nrrLb3yyiv68ssvNWzYMB07dsypz0WLFumhhx5SQkKCtm/frunTpysjI0MzZsxwaldWVqaRI0cqJydHy5Yt0zvvvKMOHTooPj5eu3fv9sr6AwCavjNnJIul4t+ZM74eDZqCAF8PIDY2VrGxsU7LRo8erX379mnlypVKTU2VJC1YsEBWq1WbN29WmzZtJEnR0dHq3bu3li5dqieffFKSVFhYqIULF+ree+9VRkaG4z3sdrtSU1M1c+ZM9e3bV5K0atUqFRQU6P3331dMTIwkacSIEYqKitKcOXO0Z88eb5QAAACgXny+B64m4eHhCgioyJfl5eXavHmzbr/9dkd4k6Tu3btrxIgR2rhxo2PZtm3bVFpaqsTERKf+EhMTZRiGNm3a5Fi2ceNG9enTxxHeJCkgIEBTpkzRRx99pEOHDnlo7QAAABrO53vgKl24cEEXLlzQiRMntH79em3fvl2///3vJUlfffWVzp49qwEDBlR73YABA5Sdna3S0lIFBQWpoKBAktS/f3+ndhEREQoPD3c8L0kFBQUaNmyYyz4l6bPPPlPnzp1djresrExlZWWOx8XFxZIku93ucq5dY1X26Ym+UYEaewd19jxq7B31qXNpqSQFSpJyc8t1002GWrTw4OCaiOa2LddnPf0mwE2fPl1/+MMfJEktW7bU7373O91///2SKg6LSpLNZqv2OpvNJsMwdOLECUVERKiwsFBWq1UhISEu21b2VdlvTX1WfV9XFi9erPT09GrLd+zYoeDg4EutaqNkZ2d7rG9UoMbeQZ09jxp7R211/uCDCL30Un9VBrgxYwIUFnZWSUn5ion5zgsj9A+lpS00adJoSdK6dZsVFHS+zq9tLttySUlJndv6TYB79NFHlZSUpKNHj+rdd9/VAw88oDNnzug3v/mNo43FYqnx9VWfq2u7+ratau7cuZo1a5bjcXFxsbp27aq4uDinw7zuYrfblZ2drVGjRikwMNDt/YMaewt19jxq7B11qfPGjRY99VQLGYbz8qKiID311CCtW3de48cbLl/b1FQ9eePmm2+Wi/0s1TS3bbnyaF5d+E2A69atm7p16yZJuvXWWyVVhKR77rlHYWFhklzvESsqKpLFYlHbtm0lSWFhYSotLVVJSUm1PWFFRUWKjo52PA4LC6uxT8n1Hr9KVqtVVqu12vLAwECPbmSe7h/U2Fuos+dRY++oqc7nz0uzZ6taeJMkw7DIYpF+85sA3X67msXh1KolqqhZfV7bPLbl+qyj357EMHjwYJW
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"shotNum = \"0029\"\n",
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
" for i in [0]\n",
"}\n",
"\n",
"dataSet = dataSetDict[\"camera_0\"]\n",
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"imageAnalyser.center = (535, 995)\n",
"imageAnalyser.span = (350, 350)\n",
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
"plt.ylim([0, 3500])\n",
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [],
"source": [
"Ncount_mean_total = xr.concat((Ncount_mean_total, Ncount_mean), dim='als_final_current')\n",
"Ncount_std_total = xr.concat((Ncount_std_total, Ncount_std), dim='als_final_current')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# 0.325 - 0.350 A"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'als_final_current': array([0.325 , 0.3259, 0.3268, 0.3277, 0.3286, 0.3295, 0.3304, 0.3313,\n",
" 0.3322, 0.3331, 0.334 , 0.3349, 0.3358, 0.3367, 0.3376, 0.3385,\n",
" 0.3394, 0.3403, 0.3412, 0.3421, 0.343 , 0.3439, 0.3448, 0.3457,\n",
" 0.3466, 0.3475, 0.3484, 0.3493, 0.3502, 0.3511]), 'runs': array([0., 1.])}\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHPCAYAAAAFwj37AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABQ4UlEQVR4nO3de1yUZf7/8fcIOAhoOuAB8XxkTcViPbDfSKwk1mxT0s1c28TV2tVC011DRZNS1LLSdbHWMnWzo61auZ4Q0dqtjF9924XKastTmqmgeUAQ9P79wZfRcQA5DDNzw+v5ePjIue5rLq75eMe857rvuW+LYRiGAAAAYAoNPD0BAAAAVB7hDQAAwEQIbwAAACZCeAMAADARwhsAAICJEN4AAABMhPAGAABgIoQ3AAAAEyG8AQAAmIjHw9tnn32mO+64Q+3atVOjRo1ks9kUF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aVNJUnBwsAoKCpSfn++0ApaXl6fIyEj74+Dg4HLHlMpe6StltVpltVqd2v38/Gp1B6nt8eGIersfNXevuljvK19Oyevz3FzKUhdr7u3MUvPKztFrv7DQr18/FRcX67vvvlPnzp3VqFEjZWdnO/XLzs5Wly5d5O/vL+nyuW5X9z169KhOnDihnj172tt69epV7piSHPoCAAB4A68Nb5mZmWrQoIE6deokX19f3XnnnVq/fr3OnDlj73Pw4EFlZmYqPj7e3hYXFyd/f3+tXr3aYbzVq1fLYrFo2LB
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"shotNum = \"0030\"\n",
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
" for i in [0]\n",
"}\n",
"\n",
"dataSet = dataSetDict[\"camera_0\"]\n",
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"imageAnalyser.center = (535, 995)\n",
"imageAnalyser.span = (350, 350)\n",
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
"plt.ylim([0, 3500])\n",
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [],
"source": [
"Ncount_mean_total = xr.concat((Ncount_mean_total, Ncount_mean), dim='als_final_current')\n",
"Ncount_std_total = xr.concat((Ncount_std_total, Ncount_std), dim='als_final_current')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# 0.350 - 0.375 A"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'als_final_current': array([0.35 , 0.3509, 0.3518, 0.3527, 0.3536, 0.3545, 0.3554, 0.3563,\n",
" 0.3572, 0.3581, 0.359 , 0.3599, 0.3608, 0.3617, 0.3626, 0.3635,\n",
" 0.3644, 0.3653, 0.3662, 0.3671, 0.368 , 0.3689, 0.3698, 0.3707,\n",
" 0.3716, 0.3725, 0.3734, 0.3743, 0.3752, 0.3761, 0.377 ]), 'runs': array([0., 1.])}\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHPCAYAAAAFwj37AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABO8UlEQVR4nO3de1yUdd7/8fcoOAhoNuABzVNpcpuCxXpgNxN1RdYslXQz10pcrDstNN01VDQpRdtsy3Wp1jKxzA62auV6CAnd3Q7GXb+9F2qtttRK11QwTwgOev3+4GZiZJDTnC54PR8PHzXX9Z3vfK8P1wxvrsN3LIZhGAIAAIApNPP1AAAAAFB7hDcAAAATIbwBAACYCOENAADARAhvAAAAJkJ4AwAAMBHCGwAAgIkQ3gAAAEyE8AYAAGAiPg9v//jHP3TzzTerS5cuatmypWw2m2JjY7V+/XqndlOmTJHFYqnyLzIy0mW/q1atUmRkpKxWq7p376709HTZ7fYq7Y4ePaopU6YoPDxcwcHBio2NVU5Ojke2FQAAoKECfD2AH374QZ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juj48eOO064VbS9tV/m5ldsCAAD4A78Nb7m5uWrWrJmuvvrqatu88cYbKi4u1qBBgxzLEhISFBQUpKysLKe2WVlZslgsGjt2rGPZuHHjtG/fPqcpQcrKyrR+/XoNHDhQHTt2dNv2AAAAuIPPT5vec889at26tQYMGKD27dvr+PHj2rhxo1577TX99re/Vdu2bXXw4EFNmjRJEydOVI8ePWSxWLRnzx499dRTuu6665ScnOzoz2azKS0tTQsXLpTNZnNM0rt48WIlJyc75niTpKlTpyozM1MTJkzQ8uXL1a5dOz399NP6/PPPtWvXLl+UAwAA4LJ8Ht5iY2O1du1arVu3Tj/88INCQ0MVHR2tl156SZMnT5YktW7dWu3bt9fvf/97ff/997pw4YK6du2qlJQUzZ8/v8qdpQsWLFCrVq2UmZmpFStWqEOHDkpNTdWCBQuc2lmtVuXk5Gju3Ll64IEHVFxcrH79+mn79u18uwIAAPBLPg9vSUlJVSbUvdSVV16pTZs21anflJQUpaSk1Niuffv2WrduXZ36BgAA8BW/veYNAAAAVRHeAAAATITwBgAAYCKENwAAABMhvAEAAJgI4Q0AAMBECG8AAAAmQngDAAAwEcIbAACAiRDeAAAATITwBgAAYCKENwAAABMhvAEAAJgI4Q0AAMBECG8AAAAmQngDAAAwEcIbAACAiRDeAAAATITwBgAAYCKENwAAABMhvAEAAJgI4Q0AAMBECG8AAAAmQngDAAAwEcIbAACAiRDeAAAATITwBgAAYCKENwAAABMhvAEAAJgI4Q0AAMBECG8AAAAmQngDAAAwEcIbAACAiRDeAAAATITwBgAAYCKENwAAABMhvAEAAJgI4Q0AAMBECG8AAAAmQngDAAAwEcIbAACAiRDeAAAATITwBgAAYCI+D2//+Mc/dPPNN6tLly5q2bKlbDabYmNjtX79+iptP/nkE/385z9XaGio2rRpo8TERH399dcu+121apUiIyNltVrVvXt3paeny263V2l39OhRTZkyReHh4QoODlZsbKxycnLcvp0AAADu4PPw9sMPP6hz587KyMjQtm3b9OKLL6pbt2668847tWTJEke7ffv2KS4uTufPn9frr7+uF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BavVKqvVWmV5YGCgR3cwT/cPauwtTanOzSpdXfzBB4GKj5eaN/f86zalGvuSN+pcufvy1/Poy/mdprIv13Yb/faGhQEDBqisrExff/21rrnmGrVs2VL5+flV2uXn56tHjx4KCgqS9OO1bpe2PXLkiI4fP64
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"shotNum = \"0031\"\n",
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
" for i in [0]\n",
"}\n",
"\n",
"dataSet = dataSetDict[\"camera_0\"]\n",
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"imageAnalyser.center = (535, 995)\n",
"imageAnalyser.span = (350, 350)\n",
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
"plt.ylim([0, 3500])\n",
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [],
"source": [
"Ncount_mean_total = xr.concat((Ncount_mean_total, Ncount_mean), dim='als_final_current')\n",
"Ncount_std_total = xr.concat((Ncount_std_total, Ncount_std), dim='als_final_current')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# 0.375 - 0.400 A"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'als_final_current': array([0.375 , 0.3759, 0.3768, 0.3777, 0.3786, 0.3795, 0.3804, 0.3813,\n",
" 0.3822, 0.3831, 0.384 , 0.3849, 0.3858, 0.3867, 0.3876, 0.3885,\n",
" 0.3894, 0.3903, 0.3912, 0.3921, 0.393 , 0.3939, 0.3948, 0.3957,\n",
" 0.3966, 0.3975, 0.3984, 0.3993, 0.4002, 0.4011, 0.402 ]), 'runs': array([0., 1.])}\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHPCAYAAAAFwj37AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABQ5ElEQVR4nO3de1yUZf7/8fcoOAhoNuABzVNZsqZi8fXAbibmSmS2KuluuVbiYn3XCk13FRUNStE2O7gu1tqauJlZltrmKoqIttvB+NV3N8isttRKMwU0DwgC3r8/WCZHBuUwpxtez8eDR811X3PNdX+8Yd5zn8ZiGIYhAAAAmEIzb08AAAAAtUd4AwAAMBHCGwAAgIkQ3gAAAEyE8AYAAGAihDcAAAATIbwBAACYCOENAADARAhvAAAAJuL18Pavf/1Lt99+u7p06aKWLVvKZrMpKipKa9asceg3ceJEWSyWaj/h4eFOx122bJnCw8NltVrVvXt3paamqqysrFq/o0ePauLEiQoNDVVgYKCioqKUnZ3tlnUFAABoKD9vT+DEiRPq3Lmz7r77bnXq1ElnzpzRyy+/rHvuuUcHDhxQcnKyvW/Lli21c+dOh+e3bNmy2pgLFy7UvHnzlJSUpJiYGOXm5io5OVmHDh3SihUr7P1KS0s1bNgwnThxQkuXLlW7du2Unp6u2NhY7dixQ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771fr1q01YMAAtW/fXgUFBVq/fr1effVV/f73v1fbtm118OBBjR8/XnfddZd69Oghi8Wi3bt369lnn9X111+vhIQE+3g2m03JycmaN2+ebDab/Sa9KSkpSkhIsN/jTZImTZqk9PR0jRs3TosXL1a7du20fPlyffbZZ9qxY4c3ygEAAHBJXg9vUVFRWrVqlVavXq0TJ04oODhYEREReumllzRhwgRJUuvWrdW+fXs9/fTT+v7771VRUaGuXbsqMTFRc+bMqXZl6dy5c9WqVSulp6dryZIl6tChg5KSkjR37lyHflarVdnZ2Zo5c6YefvhhFRcXq1+/ftq6dSvfrgAAAHyS18NbfHx8tRvqXuzKK6/Uhg0b6jRuYmKiEhMTL9uvffv2Wr16dZ3GBgAA8BafPecNAAAA1RHeAAAATITwBgAAYCKENwAAABMhvAEAAJgI4Q0AAMBECG8AAAAmQngDAAAwEcIbAACAiRDeAAAATITwBgAAYCKENwAAABMhvAEAAJgI4Q0AAMBECG8AAAAmQngDAAAwEcIbAACAiRDeAAAATITwBgAAYCKENwAAABMhvAEAAJgI4Q0AAMBECG8AAAAmQngDAAAwEcIbAACAiRDeAAAATITwBgAAYCKENwAAABMhvAEAAJgI4Q0AAMBECG8AAAAmQngDAAAwEcIbAACAiRDeAAAATITwBgAAYCKENwAAABMhvAEAAJgI4Q0AAMBECG8AAAAmQngDAAAwEcIbAACAiRDeAAAATITwBgAAYCJeD2//+te/dPvtt6tLly5q2bKlbDaboqKitGbNmmp9P/roI/385z9XcHCw2rRpo7i4OH311VdOx122bJnCw8NltVrVvXt3paamqqysrFq/o0ePauLEiQoNDVVgYKCioqKUnZ3t8vUEAABwBa+HtxMnTqhz585KS0vTli1b9Ne//lXdunXTPffcowULFtj77du3T9HR0Tp37pxee+01vfjii/r88881ePBgHTt2zGHMhQsXaurUqYqLi9O2bds0ZcoUpaWl6cEHH3ToV1paqmHDhik7O1tLly7Vm2++qfbt2ys2Nla7d+/2yPoDAADUhZ+3JxAdHa3o6GiHtpEjR2r//v1asWKFkpOTJUnz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zGy8jIkMVi0ejRo+1tY8aM0b59+xxuCVJeXq4
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"shotNum = \"0032\"\n",
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
" for i in [0]\n",
"}\n",
"\n",
"dataSet = dataSetDict[\"camera_0\"]\n",
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"imageAnalyser.center = (535, 995)\n",
"imageAnalyser.span = (350, 350)\n",
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
"plt.ylim([0, 3500])\n",
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {},
"outputs": [],
"source": [
"Ncount_mean_total = xr.concat((Ncount_mean_total, Ncount_mean), dim='als_final_current')\n",
"Ncount_std_total = xr.concat((Ncount_std_total, Ncount_std), dim='als_final_current')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# 0.400 - 0.425 A"
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'als_final_current': array([0.4 , 0.4009, 0.4018, 0.4027, 0.4036, 0.4045, 0.4054, 0.4063,\n",
" 0.4072, 0.4081, 0.409 , 0.4099, 0.4108, 0.4117, 0.4126, 0.4135,\n",
" 0.4144, 0.4153, 0.4162, 0.4171, 0.418 , 0.4189, 0.4198, 0.4207,\n",
" 0.4216, 0.4225, 0.4234, 0.4243, 0.4252, 0.4261]), 'runs': array([0., 1.])}\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHPCAYAAAAFwj37AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABMqklEQVR4nO3de1zUdaL/8fckOAhoBnhB1LS8cEzRYlNpUzGTPK4dhXQzt01xrf1tllaeNcwblLc2t9X1mJ1OJW12tdA21xsiWqfM2Dq7i5XVlpqXvADeERzw+/tjdkbGGWCAYZgvvJ6PBw+cz3zmM5/vh6/wns/3+/18LYZhGAIAAIApXNXQHQAAAID3CG8AAAAmQngDAAAwEcIbAACAiRDeAAAATITwBgAAYCKENwAAABMhvAEAAJgI4Q0AAMBEGjy8/e1vf9PPfvYzde7cWS1atFBERIQSEhK0Zs0at7qff/65br/9doWHh6t169ZKSUnR999/77HdFStWKDY2VlarVV27dlVGRoZsNptbvePHj2vSpEmKiopSaGioEhISlJOT4/PtBAAA8IUGD2+nTp1Sp06dtGjRIm3cuFF/+tOf1KVLF/3yl7/UggULnPX27t2rxMREXbx4UW+//bZefvllffPNNxo0aJBOnDjh0ubChQs1ffp0paSkaMuWLXrwwQe1aNEiTZ061aVeaWmphg0bppycHC1fvlzvvfee2rVrpxEjRmjnzp1+2X4AAICasATqvU0HDhyoI0eO6IcffpAk/fznP1dubq6+++47tWrVSpJ04MABde/eXY8++qiefvppSVJhYaE6duyo++67T//93//tbG/Rok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ata": {},
"output_type": "display_data"
}
],
"source": [
"shotNum = \"0033\"\n",
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
" for i in [0]\n",
"}\n",
"\n",
"dataSet = dataSetDict[\"camera_0\"]\n",
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"imageAnalyser.center = (535, 995)\n",
"imageAnalyser.span = (350, 350)\n",
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
"plt.ylim([0, 3000])\n",
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {},
"outputs": [],
"source": [
"Ncount_mean_total = xr.concat((Ncount_mean_total, Ncount_mean), dim='als_final_current')\n",
"Ncount_std_total = xr.concat((Ncount_std_total, Ncount_std), dim='als_final_current')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# 0.425 - 0.450 A"
]
},
{
"cell_type": "code",
"execution_count": 41,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'als_final_current': array([0.425 , 0.4259, 0.4268, 0.4277, 0.4286, 0.4295, 0.4304, 0.4313,\n",
" 0.4322, 0.4331, 0.434 , 0.4349, 0.4358, 0.4367, 0.4376, 0.4385,\n",
" 0.4394, 0.4403, 0.4412, 0.4421, 0.443 , 0.4439, 0.4448, 0.4457,\n",
" 0.4466, 0.4475, 0.4484, 0.4493, 0.4502, 0.4511, 0.452 ]), 'runs': array([0., 1.])}\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAnAAAAHPCAYAAADTZ+eeAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABLeElEQVR4nO3de3wU1cH/8e+YhA1JuJgEIRA0yMUUuSlVoDUQBGJK8YGsoSqllVC0rSgg9EGQaxQQFS38+KH+qApWvLTSgJdyFQLSVjGPPm1BxFIFhAACCXLJjSTM749tlizZ3HezO7uf9+vFy50zZ2fPHifhy5mZcwzTNE0BAADAMq7ydQMAAABQPwQ4AAAAiyHAAQAAWAwBDgAAwGIIcAAAABZDgAMAALAYAhwAAIDFEOAAAAAshgAHAABgMT4PcNu3b9f48eOVmJioyMhIdejQQSNHjtSnn37qUm/cuHEyDKPKn8TERLfHXb58uRITE2Wz2dSpUydlZmaqtLS0Sr2TJ09q3Lhxio2NVUREhAYMGKBt27Z55bsCAAB4QqivG/DCCy8oLy9PkydPVvfu3XXq1Ck9++yz6t+/vzZv3qzbb7/dWbd58+bavn27y/ubN29e5ZgLFy7UnDlzNGPGDKWkpCgnJ0ezZ89Wbm6uVq5c6axXUlKiIUOG6LvvvtOyZct0zTXXaMWKFUpNTdUHH3ygQYMGee+LAwAANJDh67VQT548qWuuucal7MKFC+rSpYt69OihDz74QJJjBG7t2rW6cOFCjcfLy8tTfHy8fv7zn+v//b//5yxftGiRZs+erb1796p79+6SpOeff14TJ07U3/72Nw0YMECSVFZWpt69eysqKkq7d+/25FcFAADwCJ9fQr0yvElSVFSUun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cqU8//bRK3c8++0xDhw5VVFSUWrduLbvdrq+//trtcZcvX67ExETZbDZ16tRJmZmZKi0trVLv5MmTGjdunGJjYxUREaEBAwZo27ZtHv+e9cVDCAAAoDo+D3AvvPCCDh06pMmTJ2vDhg1atmyZTp48qf79+2v79u3Oevv371dycrIuXryoP/7xj3rllVf0r3/9S0lJSTp16pTLMRcuXKjJkyfLbrdr8+bNevDBB7Vo0SJNnDjRpV5JSYmGDBmibdu2admyZXrnnXfUtm1bpaamaufOnU3y/WvCQwgAAMAt08e+/fbbKmXnz58327Ztaw4ZMsRZNnr0aDM2NtY8e/ass+zQoUNmWFiYOX36dGfZ6dOnzfDwcPOBBx5wOebChQtNwzDMzz//3Fm2YsUKU5L5t7/9zVlWWlpqdu/e3bz11lvr9T3Onj1rSnJpn6ecPWuajudOTfO990rNsrL6vf/Chcvvv3DB480LGBcvXjTXr19vXrx40ddNCWj0s/fRx02Dfva+YOvj+mQJn4/AXXPNNVXKoqKi1L17dx05ckSSVFZWpvfff1933XWXWrZs6ax33XXXafDgwVq3bp2zbNOmTSouLlZGRobLMTMyMmSaptavX+8sW7dunW644QYNGDDAWRYaGqqxY8fqk08+Ue6VM+j6SOXLpLfdZnLZFACAIOeX04icPXtWn332mW6//XZJ0ldffaWioiL16tWrSt1evXpp69atKi4uVnh4uPbu3StJ6tmzp0u9uLg4xcbGOvdL0t69e5Xk5imAis/5/PPP1aFDB7dtLCkpUUlJiXP73LlzkqTS0lK399o1huNwYZWOX7/3N2smXbx45fFwpYr/b57+/wdX9LP30cdNg372vmDr4/p8T78McBMnTlRBQYFmzZolScrLy5MkRUdHV6kbHR0t0zR15swZxcXFKS8vTzabTZGRkW7rVhyr4rjVHbPy57rz5JN
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"shotNum = \"0034\"\n",
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
" for i in [0]\n",
"}\n",
"\n",
"dataSet = dataSetDict[\"camera_0\"]\n",
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"imageAnalyser.center = (535, 995)\n",
"imageAnalyser.span = (350, 350)\n",
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
"plt.ylim([0, 2500])\n",
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 42,
"metadata": {},
"outputs": [],
"source": [
"Ncount_mean_total = xr.concat((Ncount_mean_total, Ncount_mean), dim='als_final_current')\n",
"Ncount_std_total = xr.concat((Ncount_std_total, Ncount_std), dim='als_final_current')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# 0.450 - 0.475 A"
]
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'als_final_current': array([0.45 , 0.4509, 0.4518, 0.4527, 0.4536, 0.4545, 0.4554, 0.4563,\n",
" 0.4572, 0.4581, 0.459 , 0.4599, 0.4608, 0.4617, 0.4626, 0.4635,\n",
" 0.4644, 0.4653, 0.4662, 0.4671, 0.468 , 0.4689, 0.4698, 0.4707,\n",
" 0.4716, 0.4725, 0.4734, 0.4743, 0.4752, 0.4761]), 'runs': array([0., 1.])}\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHPCAYAAAAFwj37AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABOdUlEQVR4nO3de1xVVcL/8e8O8CDgJcAL3k0tHlO0mFRmIiEVGUdHJe3iOCWONb+y0HLG8JqUt56s0fGxeppMLbvaoJV5yQytp4vx5NMMVjZNqXnJVDAvIAi4f3+cOHLkAAc4nHM2fN6vFy/Za6+zWGexhS9r7722YZqmKQAAAFjCZb7uAAAAANxHeAMAALAQwhsAAICFEN4AAAAshPAGAABgIYQ3AAAACyG8AQAAWAjhDQAAwEIIbwAAABbi8/D2+eef6ze/+Y06deqkpk2bKjw8XHFxcVq7dm2Furt379bgwYMVFhamli1bKiUlRd99953LdpcvX67o6GjZbDZ17dpVGRkZKi4urlDv2LFjmjBhgiIjIxUSEqK4uDht377d4+8TAADAE3we3n766Sd17NhRCxcu1KZNm/T888+rS5cu+v3vf6/58+c76u3du1cJCQk6f/68XnvtNT333HP617/+pfj4eB0/ftypzQULFmjKlClKSUnR1q1bdc8992jhwoWaPHmyU72ioiINGjRI27dv17Jly/TGG2+oTZs2Sk5O1s6dO73y/gEAAGrC8Ndnmw4YMEBHjhzR999/L0m6+eablZWVpW+//VbNmzeXJB04cEA9evTQ/fffr0cffVSSlJubqw4dOuj222/Xf//3fzvaW7hwoWbPnq09e/aoZ8+ekqQnn3xSkydP1kcffaS4uDhJUklJifr06aOwsDDt2rXLm28ZAACgWj6featMZGSkAgMDJdkD1caNG3XTTTc5gpskde7cWYmJiVq/fr2jbMuWLSosLFRqaqpTe6mpqTJNUxs2bHCUrV+/XldddZUjuElSYGCgxo8fr08//VSHDx+up3cHAABQO4G+7kCZCxcu6MKFCzp58qTWrVunrVu36r/+678kSd9++63OnTunmJiYCq+LiYnRtm3bVFhYqODgYO3Zs0eS1Lt3b6d6UVFRioyMdOyXpD179ig+Pt5lm5L0xRdfqH379i77W1RUpKKiIqf+5+XlKSIiQoZh1PDdAwCAxs40TZ05c0bt2rXTZZdVPr/mN+HtnnvucZzmbNKkif7617/qj3/8oyT7qVBJCg8Pr/C68PBwmaapkydPKioqSrm5ubLZbAoNDXVZt6ytsnYra7P813Vl0aJFysjIqME7BAAAqN7BgwfVoUOHSvf7TXibOXOmJk2apGPHjumtt97Svffeq/z8fP3pT39y1KlqRqv8Pnfr1bRueTNmzNADDzzg2D516pQ6deqkffv2qVmzZpW+rraKi4uVlZWlxMREBQUFebx9OGO8vY8x9y7G2/sYc++z2pifOXNGXbt2rTZH+E1469Spkzp16iRJGjZsmCR7QLrjjjsUEREhyfVMWF5engzDUMuWLSVJERERKiwsVEFBgUJCQirUjY2NdWxHRERU2qbkeqavjM1mk81mq1AeHh7udF2epxQXFyskJEQRERGWOACtjvH2Psbcuxhv72PMvc9qY17Wx+ouv/LbGxb69eunkpISfffdd+rWrZuaNm2qnJycCvVycnLUvXt3BQcHS7p4rduldY8ePaoTJ06oV69ejrLevXtX2qYkp7oAAAD+wG/DW1ZWli677DJdccUVCgwM1IgRI5SZmakzZ8446nz//ffKyspSSkqKoyw5OVnBwcFavXq1U3urV6+WYRgaNWqUo2z06NHau3ev05IgJSUlWrt2rfr376927drV2/sDAACoDZ+fNr3rrrvUvHlz9evXT23atNGJEye0bt06vfrqq/rzn/+sVq1aSZIyMjJ03XXXafjw4UpPT1dhYaHmzp2ryMhITZs2zdFeeHi4Zs+erTlz5ig8PFxJSUnKzs7WvHnzNGnSJMcab5I0ceJErVixQmPHjtXixYvVunVrPfnkk/r666/17rvven0sAAAAquPz8BYXF6dVq1ZpzZo1+umnnxQWFqY+ffrohRde0Pjx4x31oqOjtWPHDj344IMaM2aMAgMDdeONN2rJkiWOgF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Ki4sr1Dt27JgmTJigyMhIhYSEKC4uTtu3b6+X9wrA/zSEuzQb0rISdf1+1HUs6np9U1V3it56a4A+/rjqKTN/vUDeF5iFrJzPw9tTTz2l/fv3a8qUKdq0aZOWLVumY8eOacCAAXrvvfec6jZt2lQff/yx08err75aoc0FCxZoypQpSklJ0datW3XPPfdo4cKFmjx5slO9oqIiDRo0SNu3b9eyZcv0xhtvqE2bNkpOTtbOnTvr9X0DgCewrMRFnhqL2l7f5M41WitX9qp2JtAfL5Cvi9rOCvvbLGRoqP37aJr2z33K9LEff/yxQtmZM2fMNm3amIMGDXKU3XHHHWZoaGi17Z04ccIMDg4277rrLqfyBQsWmIZhmF988YWjbMWKFaYk86OPPnKUFRcXmz179jT79etXo/dx6tQpU5J56tSpGr3OXefPnzc3bNhgnj9/vl7ahzPG2/t8NeZnz5b9OLZ/biUlJabZocPF/l/6YRim2bGjvd6l/PUYr+33oy5j4SlZWZV//fIf27YVu9XeqVMXX7NpU+367uvj++9/N8327Z3ff4cO9nJ3X28Y9o9Lv5+GUX07/nqcV8bdLOHzmbfWrVtXKAsLC1PPnj118ODBGre3ZcsWFRYWKjU11ak8NTVVpmlqw4YNjrL169frqquuUlxcnKMsMDBQ48eP16effqrDl/75BgB+xNMXdFv5FLI/XNzu6Wu0mje/GFd+/WvrnSr1xExo2Sxk+/bO5VadhfSUQF93wJVTp05p9+7duvHGG53Kz507p7Zt2+r48eO
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"shotNum = \"0035\"\n",
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
" for i in [0]\n",
"}\n",
"\n",
"dataSet = dataSetDict[\"camera_0\"]\n",
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"imageAnalyser.center = (535, 995)\n",
"imageAnalyser.span = (350, 350)\n",
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
"plt.ylim([0, 3000])\n",
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 44,
"metadata": {},
"outputs": [],
"source": [
"Ncount_mean_total = xr.concat((Ncount_mean_total, Ncount_mean), dim='als_final_current')\n",
"Ncount_std_total = xr.concat((Ncount_std_total, Ncount_std), dim='als_final_current')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# 0.475 - 0.500 A"
]
},
{
"cell_type": "code",
"execution_count": 45,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'als_final_current': array([0.475 , 0.4759, 0.4768, 0.4777, 0.4786, 0.4795, 0.4804, 0.4813,\n",
" 0.4822, 0.4831, 0.484 , 0.4849, 0.4858, 0.4867, 0.4876, 0.4885,\n",
" 0.4894, 0.4903, 0.4912, 0.4921, 0.493 , 0.4939, 0.4948, 0.4957,\n",
" 0.4966, 0.4975, 0.4984, 0.4993, 0.5002, 0.5011, 0.502 ]), 'runs': array([0., 1.])}\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHPCAYAAAAFwj37AAAAOXRFWHRTb2Z0d2Fy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jnWhS/M22TOVu3UhwMIV9izJ0zjxjU2/X7IlQhvqPe8dcTvC0fNpR/c7ds7Lq/OB7crw2fZ8LR7t8Wjoy61vc9dfbhVTClXzNusrfpyAOAN9eUAoi4uX5Zee603p46vQngzgbIb5V//6tkPPrPz5hG/rxw1x8VJBw9KmZnSW2+V/FudD25Xhc+rw9OwYX56+OEYpaVVkIpcqC73ufOlU46uUJd5m7Xl7dHnsrw997c271+fDiBq669/tSg3t6kk553QkE4dl0V483FXh48RI/w43VBN3j7i96Wj5saNpeho6f77S/6tzge3K8JnReEpNzdA48Y1duvvwBXBwRdOOZqZL4w+m1l9O4CoDV85CPY1hDcf5qrw0RAnCvvCEb/Zj5rrGj4r+x2UHkW783fgquDgzVOOZudLH7xm3Q829AMIXzoI9iWENx/lqvDhCxOF67rTrM3pBl844jf7UXNdw2fVvwOLW38HrgwO3jjlWB/4ygevL+wH66IhH0DccouhkJCLslicHgX6/EGwuxDefJQrwoe3TxuWtsEbO01fOeI381FzXcOnt38HvhIcGjJfGH32hf2gKzTUA4jGjaXJk7MlmfMg2F0Ibz6qrh98vnDa0Js7TVd/cAcFlfSbYZT8vybMfNRcl6tVvR2efCE4NHTeHn125X7Q2xc81FVd2+/N085RUf/
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"shotNum = \"0036\"\n",
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
" for i in [0]\n",
"}\n",
"\n",
"dataSet = dataSetDict[\"camera_0\"]\n",
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"imageAnalyser.center = (535, 995)\n",
"imageAnalyser.span = (350, 350)\n",
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
"plt.ylim([0, 3000])\n",
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 46,
"metadata": {},
"outputs": [],
"source": [
"Ncount_mean_total = xr.concat((Ncount_mean_total, Ncount_mean), dim='als_final_current')\n",
"Ncount_std_total = xr.concat((Ncount_std_total, Ncount_std), dim='als_final_current')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# 0.500 - 0.525 A"
]
},
{
"cell_type": "code",
"execution_count": 47,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'als_final_current': array([0.5 , 0.5009, 0.5018, 0.5027, 0.5036, 0.5045, 0.5054, 0.5063,\n",
" 0.5072, 0.5081, 0.509 , 0.5099, 0.5108, 0.5117, 0.5126, 0.5135,\n",
" 0.5144, 0.5153, 0.5162, 0.5171, 0.518 , 0.5189, 0.5198, 0.5207,\n",
" 0.5216, 0.5225, 0.5234, 0.5243, 0.5252, 0.5261, 0.527 ]), 'runs': array([0., 1.])}\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHPCAYAAAAFwj37AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAAB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b4RIF3BF67Zakh49HZ48oWZV1/ogy8ivJlAixbS0KGGbrnlsIYONep0snbFSbcx0/Wu/MVTtc4tt9T/l1VzvF7LFVzxi6OmY6iwMEDjxrUwzdJrY4/BhvL2DS++ECAbyxcetNzQ8Ojt4OILM6++0AdfRHhrohp70nXFrIsvLHteOevT0Ou1vP2oDm8s+TT2F8fVjqHKJZDmeK1KfXn7hhdvB8jG8Payo9S48Ojt4OILM68332woJOS8LBanJxLTzP66GuGtCWtMeHLVdL03lz194S9uV/DWkk9jf3HUfgxZmuW1Kg3h7RtevB0gG8rby46NDY/eDk++MPPaooU0ZUq+V/vgiwhvTVxDw5Mrp+u9seTkC39xu4I3A2hjf3F4e8kHruXtANkQ3j4GGxsefSE8+cIKSmzsd3rzzYvcvFYF4a0ZaEh48vZ0fWN5+y9uV3BlAG3IdX+N/cVh9mMI5uftY9AV4dEXwpMv3DiWmGh4vQ++hPAGp7w9Xd9Yrv6L2xvXnLkqgDbmOW2Nud6p9mPIqPMx5O1rDmFO3j6PuSo8uiI8NfYc5q2bdnytD76C8AanfGG6vjFc+Re3t645c0UAdcVz2hp6vdPVjiG
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"shotNum = \"0037\"\n",
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
" for i in [0]\n",
"}\n",
"\n",
"dataSet = dataSetDict[\"camera_0\"]\n",
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"imageAnalyser.center = (535, 995)\n",
"imageAnalyser.span = (350, 350)\n",
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
"plt.ylim([0, 3000])\n",
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 48,
"metadata": {},
"outputs": [],
"source": [
"Ncount_mean_total = xr.concat((Ncount_mean_total, Ncount_mean), dim='als_final_current')\n",
"Ncount_std_total = xr.concat((Ncount_std_total, Ncount_std), dim='als_final_current')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# 0.525 - 0.550 A"
]
},
{
"cell_type": "code",
"execution_count": 49,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The detected scaning axes and values are: \n",
"\n",
"{'als_final_current': array([0.525 , 0.5259, 0.5268, 0.5277, 0.5286, 0.5295, 0.5304, 0.5313,\n",
" 0.5322, 0.5331, 0.534 , 0.5349, 0.5358, 0.5367, 0.5376, 0.5385,\n",
" 0.5394, 0.5403, 0.5412, 0.5421, 0.543 , 0.5439, 0.5448, 0.5457,\n",
" 0.5466, 0.5475, 0.5484, 0.5493, 0.5502, 0.5511, 0.552 ]), 'runs': array([0., 1.])}\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHPCAYAAAAFwj37AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABKVElEQVR4nO3deXxU1cH/8e9IwoQsiJOwBGTfUmTTVCCtSBDBPBY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LFfauYOrJ2v7GkvfFa5e9nz77XL9v/+Xpfh4p/cQ8SsNWbZs6L9hd86+u2PpGWiq/HEFhfDmp1juqNCQk7V9jaXv7115nN5yi2GK47ahM6cN/Tfs7tl3Xy89A2bkrysohDc/1tSXOxp6sravufOHr6+fjRkSUvFFZRgVf28K3DFz2pB/w8y+A77nrysohDc/52zJyWzLHa4ED3/9bac++OFrbu6aOXV1yZLZd1zJ17/ANVX+uoJCeDMBMy45NZS//rZTH/zwNTd3zpy6umTpridk+APCB8zIXy8eJLzBL/nrbzv11dSXvs3MX2ZOffWEDHfzp9ssAHXlL98DVyO8mUBIiHTpUpk2b36zyZxv5K+/7biCK/3MyZ0zpw09Z9AXT8i4WkOu+vaH2yycO/f9zN+2bU0vPPrD/ptx9tVfV1AIb/BL7vxtxx++MLjSz5wa07JlQzTkqm9/uM2CP4RHX2rq+99Q/riCQnhrAvwhvNSXv/62g6ansSxbuqohV337w4VH/hAefamp7/+VGjJ77G8
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"shotNum = \"0038\"\n",
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i])\n",
" for i in [0]\n",
"}\n",
"\n",
"dataSet = dataSetDict[\"camera_0\"]\n",
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"imageAnalyser.center = (535, 995)\n",
"imageAnalyser.span = (350, 350)\n",
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
"plt.ylim([0, 3000])\n",
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 50,
"metadata": {},
"outputs": [],
"source": [
"Ncount_mean_total = xr.concat((Ncount_mean_total, Ncount_mean), dim='als_final_current')\n",
"Ncount_std_total = xr.concat((Ncount_std_total, Ncount_std), dim='als_final_current')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Summary"
]
},
{
"cell_type": "code",
"execution_count": 51,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAACVAAAAJICAYAAACNRl33AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdeZwU9b3v/3c7bAohMjPINrhEEz0kaHK5UYiCcIPEoPzQAT1oSCI5xJxoVEgUSCSJnOMCRiPEh2bRk4MJ4gaDXHNGEcmwuMboOTcux+SYKGEAWQYEHQVmhv79UdZ0dU0t36qu3mZez8djHtNdXV397epavlX1qc8nlU6n0wIAAAAAAAAAAAAAAACALuiIYjcAAAAAAAAAAAAAAAAAAIqFACoAAAAAAAAAAAAAAAAAXRYBVAAAAAAAAAAAAAAAAAC6LAKoAAAAAAAAAAAAAAAAAHRZBFABAAAAAAAAAAAAAAAA6LIIoAIAAAAAAAAAAAAAAADQZRFABQAAAAAAAAAAAAAAAKDLIoAKAAAAAAAAAAAAAAAAQJdFABUAAAAAAAAAAAAAAACALqvkAqjuvfdepVIp9enTJ2v4ZZddplQq1eHvlFNO8ZzOnXfeqVNOOUU9e/bUCSecoAULFqilpaXDeDt37tRll12m6upqHXXUURo1apTWrVuXl+8GAAAAAAAAAAAAAAAAoLR0K3YDnLZu3aprr71WgwcP1r59+zq8fuSRR+r3v/99h2FuN910k374wx9q3rx5mjBhgl588UXNnz9fW7du1a9+9av28Q4ePKgvfvGLevfdd7VkyRIdc8wxuuuuu3Tuuefqqaee0tlnn538lwQAAAAAAAAAAAAAAABQMlLpdDpd7EbYJk2apFQqpcrKSq1YsULvv/9++2uXXXZZh2FempqaVFNTo6997Wv65S9/2T785ptv1vz58/Xqq69q2LBhkqS7775bV155pZ599lmNGjVKktTa2qrTTjtNffr00QsvvJCHbwkAAAAAAAAAAAAAAACgVJRMCb9ly5Zpw4YNuvvuu3OazhNPPKEDBw5oxowZWcNnzJihdDqtRx99tH3YqlWrdPLJJ7cHT0lSt27dNH36dP3hD3/Q1q1bc2oLAAAAAAAAAAAAAAAAgNJWEgFUO3fu1KxZs7Rw4ULV1NT4jvfhhx9q4MCBqqioUE1Njb7zne9oz549WeO8+uqrkqThw4dnDR80aJCqq6vbX7fHPfXUUzt8jj3stddei/2dAAAAAAAAAAAAAAAAAJS+bsVugCRdccUVOvnkk/Xtb3/bd5zTTjtNp512mj7zmc9IkjZs2KA77rhD69at04svvqg+ffpIskr49ezZU7179+4wjcrKSjU1NbU/b2pqUmVlped49ut+Dh48qIMHD7Y/P3z4sPbs2aOqqiqlUqmQbwwAAAAAAAAAAAAAAAAgX9LptN577z0NHjxYRxwRnGOq6AFUK1eu1GOPPab//M//DAw8mj17dtbzc845R5/73Oc0depU3XPPPVmvB03H/VqUcZ1uueUWLViwwPd1AAAAAAAAAAAAAAAAAMW1ZcuWwIp4UpEDqN5//31deeWVuuqqqzR48GC9++67kqRDhw5Jkt599111797dM5uUJF144YXq3bu3nn/++fZhVVVVOnDggD744AMdddRRWePv2bNHI0aMyBrXK8uUXRbQKzuV7fvf/76++93vtj/ft2+fjj32WL311lv62Mc+FvLNUWgtLS1qaGj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ZdZ4Bw8e1Be/+EWtW7dOS5Ys0erVqzVgwACde+652rBhQ16/KwAAQKHU1UnDhmWeT5woHX+8NbwUFTooiCAkAAAAAAAAAACArq1bsRvg9M///M8aM2aMKisrtWL
2023-08-21 11:26:02 +02:00
"text/plain": [
2023-08-28 09:35:22 +02:00
"<Figure size 2400x600 with 1 Axes>"
2023-08-21 11:26:02 +02:00
]
},
"metadata": {},
2023-08-28 09:35:22 +02:00
"output_type": "display_data"
2023-08-21 11:26:02 +02:00
}
],
"source": [
2023-08-28 09:35:22 +02:00
"fig = plt.figure(figsize=(24,6))\n",
"ax = fig.gca()\n",
"Ncount_mean_total.plot.errorbar(ax=ax, yerr = Ncount_std_total, fmt='ob')\n",
"plt.ylim([0, 4500])\n",
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
2023-08-21 11:26:02 +02:00
]
},
{
"cell_type": "code",
2023-08-28 09:35:22 +02:00
"execution_count": 52,
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm8AAAHPCAYAAAAFwj37AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAACW4UlEQVR4nOzdeVyU1f4H8M8DAzMsIg4oAuK+kBsapVKpmKlkelPUMrNSr/a76U1tuaaBJqWmZZbXbF+0zBYN9GruiGRp5m27uGbu4oKA7IvDcH5/PM4wAwMMMCvzeb9eKPM8Z86cLwMz3znPWSQhhAAREREROQU3ezeAiIiIiMzH5I2IiIjIiTB5IyIiInIiTN6IiIiInAiTNyIiIiInwuSNiIiIyIkweSMiIiJyIkzeiIiIiJwIkzciIiIiJ+JwydtHH30ESZLg6+trdHzSpEmQJKnKV3h4uMl6Vq1ahfDwcCiVSrRr1w4JCQnQaDRVymVkZGDSpEkIDAyEt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BurFtaWppRuatXryIzM1N/2VVXtnI5w/saliUiIiJyBHbteWvZsiVSUlKqHF+6dClSU1Oxfft2BAYGVnv/jRs3oqioCP369dMfi4mJgUqlwpo1a9C3b1/98TVr1kCSJIwaNUp/bPTo0Zg+fToOHTqkL1tWVoZ169ahb9++CAkJsUCURERERJZj1+RNpVIhOjq6yvE1a9bA3d1df+78+fOYMGECxo8fj44dO0KSJKSmpuKtt95Ct27dMHXqVP191Wo14uPjMX/+fKjVav0ivQsXLsTUqVP1a7wBwJQpU7B69WqMGzcOS5cuRYsWLfDOO+/g5MmT2LNnj7XDJyIiIqozu09YMIefnx+CgoKwYsUKXLt2DVqtFm3atMHMmTPx4osvVhkTFxcXhyZNmmD16tVYvnw5WrZsiblz5yIuLs6onFKpRHJyMubMmYOnn34aRUVF6NWrF7Zv387dFYiIiMghOWTytmbNGqxZs0Z/u1mzZkhMTKxTHTNnzsTMmTNrLRcUFIS1a9fWtYlEREREduEwOywQERERUe2YvBERERE5ESZvRERERE6EyRsRERGRE2HyRkREROREmLwREREROREmb0REREROhMkbERERkRNh8kZERETkRJi8ERERETkRJm9EREREToTJGxEREZETYfJGRERE5ESYvBERERE5ESZvRERERE6EyRsRERGRE2HyRkREROREmLwREREROREmb0REREROhMkbERERkRNh8kZERETkRJi8ERERETkRJm9EREREToTJGxEREZETYfJGRERE5ESYvBERERE5ESZvRERERE6EyRsRERGRE2HyRkREROREmLwREREROREmb0REREROxOGSt48++giSJMHX17fKuV9//RX33XcffH194e/vj9jYWJw5c8ZkPatWrUJ4eDiUSiXatWuHhIQEaDSaKuUyMjIwadIkBAYGwtvbG1FRUUhOTrZ4XERERESW4FDJW3p6Op5//nmEhIRUOXfixAlER0fj5s2b+Oabb/DJJ5/gzz//RP/+/XH9+nWjsosXL8asWbMQGxuLnTt3Yvr06ViyZAlmzJhhVK60tBSDBw9GcnIyVq5cic2bNyMoKAgxMTFITU21aqxERERE9aGwdwMM/eMf/8CAAQOgVquxceNGo3MLFiyAUqnE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a4wea82aNZAkCaNGjdIfGz16NE6cOGG0JEhZWRnWrVuHvn37mlxvjoiIiMie7HrZVKVSITo6usrxNWvWwN3d3ehcQkIC7rzzTowYMQJz585FSUkJFixYgMDAQDz33HP6cmq1GvHx8Zg/fz7UajWGDh2Kw4cPY+HChZg6dap+jTcAmDJlClavXo1x48Zh6dKlaNGiBd555x2cPHk
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"f = 0.44224 ± 0.00038 A\n",
"fwhm = 0.02101 ± 0.00111 A\n"
]
}
],
2023-08-21 11:26:02 +02:00
"source": [
2023-08-28 09:35:22 +02:00
"Brange=(0.4, 0.48)\n",
"\n",
"data = Ncount_mean_total.where(Brange[0]<Ncount_mean_total.als_final_current).where(Ncount_mean_total.als_final_current<Brange[1])\n",
"data = data.dropna(dim='als_final_current')\n",
"data_std = Ncount_std_total.where(Brange[0]<Ncount_mean_total.als_final_current).where(Ncount_mean_total.als_final_current<Brange[1])\n",
"data_std = data_std.dropna(dim='als_final_current')\n",
"\n",
"fitAnalyser = FitAnalyser(\"Gaussian With Offset\", fitDim=1)\n",
"params = fitAnalyser.guess(data, x='als_final_current', guess_kwargs=dict(negative=True), dask=\"parallelized\")\n",
"fitResult = fitAnalyser.fit(data, params, x='als_final_current', dask=\"parallelized\").load()\n",
"fitCurve = fitAnalyser.eval(fitResult, x=np.linspace(Brange[0], Brange[1], 500), dask=\"parallelized\").load()\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"\n",
"data.plot.errorbar(ax=ax, yerr = data_std, fmt='ob')\n",
"fitCurve.plot.errorbar(ax=ax)\n",
"\n",
"plt.ylim([0, 4500])\n",
"plt.ylabel('NCount')\n",
"plt.xlabel('Z_offset current (A)')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()\n",
"\n",
"f_1 = fitAnalyser.get_fit_value(fitResult).center\n",
"df_1 = fitAnalyser.get_fit_std(fitResult).center\n",
"\n",
"print('f = %.5f \\u00B1 %.5f A'% tuple([np.abs(f_1),df_1]))\n",
"\n",
"s_1 = fitAnalyser.get_fit_value(fitResult).sigma\n",
"ds_1 = fitAnalyser.get_fit_std(fitResult).sigma\n",
"\n",
"fwhm_1 = 2.3548200*s_1\n",
"dfwhm_1 = 2.3548200*ds_1\n",
"\n",
"print('fwhm = %.5f \\u00B1 %.5f A'% tuple([np.abs(fwhm_1),dfwhm_1]))"
2023-08-21 11:26:02 +02:00
]
},
{
"cell_type": "code",
2023-08-28 09:35:22 +02:00
"execution_count": 53,
2023-08-21 11:26:02 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-08-28 09:35:22 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm4AAAHPCAYAAADqAFbFAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAACGVElEQVR4nO3deVyU1f4H8M/DNsMi4IAiIK6oZAoaudCNxEwk01TSm5WVmt1701yye9016ebSLyvNtG43S8vSyvVmbohKlkuWeQNN7bqLIrIoyDIMM+f3xzgjwwwwAzPMwuf9evHSOc+ZM+fLA8N3znnOeSQhhAAREREROTw3e3eAiIiIiMzDxI2IiIjISTBxIyIiInISTNyIiIiInAQTNyIiIiInwcSNiIiIyEkwcSMiIiJyEkzciIiIiJwEEzciIiIiJ+FwidvHH38MSZLg5+dnUD569GhIkmT0FRUVZbKd5cuXIyoqCjKZDG3btkVKSgpUKpVRvZycHIwePRrBwcHw8fFBXFwc0tLSbBIbERERUX142LsDlWVlZeHvf/87wsLCcOvWLaPj3t7e2Lt3r1FZVQsWLMDcuXMxY8YMJCYm4ujRo5gzZw6ysrLw0Ucf6esplUr069cPN2/exLJly9C8eXOsWLECSUlJ2LNnD/r06WP9IImIiIjqSHKke5UOHjwYkiRB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+VISEgwKl+9ejXc3d31xy5evIinn34aI0eORGRkJCRJQnp6OpYuXYp7770X48aN0z9XoVBgzpw5mDt3LhQKhX4D3vnz52PcuHH6PdwAYOzYsVixYgVGjBiBxYsXo3nz5li5ciVOnz6NPXv22Dp8IiIiIovYfXGCOfz9/RESEoJ33nkH169fh1qtRuvWrTFp0iTMmjXL6Bq42bNno0mTJlixYgWWLFmCFi1aYMaMGZg9e7ZBPZlMhrS0NEybNg0TJ05ESUkJunXrhh07dvCuCURERORwHDJxW716NVavXq1/3LRpU2zatMmiNiZNmoRJkybVWi8kJARr1qyxtItEREREDc5h7pxARERERDVj4kZERETkJJi4ERERETkJJm5EREREToKJGxEREZGTYOJGRERE5CSYuBERERE5CSZuRERERE6CiRsRERGRk2DiRkREROQkmLgREREROQkmbkREREROgokbERERkZNg4kZERETkJJi4ERERETkJJm5EREREToKJGxEREZGTYOJGRERE5CSYuBERERE5CSZuRERERE6CiRsRERGRk2DiRkREROQkmLgREREROQkmbkREREROgokbERERkZNg4kZERETkJJi4ERERETkJJm5EREREToKJGxEREZGTYOJGRERE5CSYuBERERE5CYdL3D7++GNIkgQ/Pz+jY8eOHcMjjzwCPz8/BAYGIjk5GefOnTPZzvLlyxEVFQWZTIa2bdsiJSUFKpXKqF5OTg5Gjx6N4OBg+Pj4IC4uDmlpaVaPi4iIiKi+HCpxy8rKwt///neEhYUZHTt16hQSEhJQXl6Or7/+Gp988gnOnDmD+Ph43Lhxw6DuggULMHnyZCQnJ2PXrl0YP348Fi5ciAkTJhjUUyqV6NevH9LS0rBs2TJs3boVISEhSEpKQnp6uk1jJSIiIrKUh707UNnf/vY3PPTQQ1AoFNiwYYPBsXnz5kEmk2Hbtm3w9/cHAMTGxqJDhw5YsmQJ3nzzTQBAXl4e3njjDbz44otYuHAhACAhIQEqlQpz5szBlClT0LlzZwDAqlWrkJmZiYMHDyIuLg4A0LdvX8TExGDatGk4cuRIQ4VOREREVCuHGXFbu3Yt0tPTsXLlSqNjFRUV2LZ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sWL0bx5c6xcuRKnT5/Gnj17bBk6ERERkcUcZh+32kRFRWH
2023-08-21 11:26:02 +02:00
"text/plain": [
2023-08-28 09:35:22 +02:00
"<Figure size 640x480 with 1 Axes>"
2023-08-21 11:26:02 +02:00
]
},
"metadata": {},
2023-08-28 09:35:22 +02:00
"output_type": "display_data"
2023-08-21 11:26:02 +02:00
},
2023-08-28 09:35:22 +02:00
{
"name": "stdout",
"output_type": "stream",
"text": [
"f = 0.28128 ± 0.00016 A\n",
"fwhm = 0.00680 ± 0.00039 A\n"
]
}
],
"source": [
"Brange=(0.26, 0.3)\n",
"\n",
"data = Ncount_mean_total.where(Brange[0]<Ncount_mean_total.als_final_current).where(Ncount_mean_total.als_final_current<Brange[1])\n",
"data = data.dropna(dim='als_final_current')\n",
"data_std = Ncount_std_total.where(Brange[0]<Ncount_mean_total.als_final_current).where(Ncount_mean_total.als_final_current<Brange[1])\n",
"data_std = data_std.dropna(dim='als_final_current')\n",
"\n",
"fitAnalyser = FitAnalyser(\"Gaussian With Offset\", fitDim=1)\n",
"params = fitAnalyser.guess(data, x='als_final_current', guess_kwargs=dict(negative=True), dask=\"parallelized\")\n",
"fitResult = fitAnalyser.fit(data, params, x='als_final_current', dask=\"parallelized\").load()\n",
"fitCurve = fitAnalyser.eval(fitResult, x=np.linspace(Brange[0], Brange[1], 500), dask=\"parallelized\").load()\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"\n",
"data.plot.errorbar(ax=ax, yerr = data_std, fmt='ob')\n",
"fitCurve.plot.errorbar(ax=ax)\n",
"\n",
"plt.ylim([0, 4500])\n",
"plt.ylabel('NCount')\n",
"plt.xlabel('Z_offset current (A)')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()\n",
"\n",
"f_1 = fitAnalyser.get_fit_value(fitResult).center\n",
"df_1 = fitAnalyser.get_fit_std(fitResult).center\n",
"\n",
"print('f = %.5f \\u00B1 %.5f A'% tuple([np.abs(f_1),df_1]))\n",
"\n",
"s_1 = fitAnalyser.get_fit_value(fitResult).sigma\n",
"ds_1 = fitAnalyser.get_fit_std(fitResult).sigma\n",
"\n",
"fwhm_1 = 2.3548200*s_1\n",
"dfwhm_1 = 2.3548200*ds_1\n",
"\n",
"print('fwhm = %.5f \\u00B1 %.5f A'% tuple([np.abs(fwhm_1),dfwhm_1]))"
]
},
{
"cell_type": "code",
"execution_count": 54,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"params.add(name=\"A_amplitude\", value= 1, max=np.inf, min=-np.inf, vary=True)\n",
"params.add(name=\"A_center\", value= 0, max=np.inf, min=-np.inf, vary=True)\n",
"params.add(name=\"A_sigma\", value= 1, max=np.inf, min= 0, vary=True)\n",
"params.add(name=\"B_amplitude\", value= 1, max=np.inf, min=-np.inf, vary=True)\n",
"params.add(name=\"B_center\", value= 0, max=np.inf, min=-np.inf, vary=True)\n",
"params.add(name=\"B_sigma\", value= 1, max=np.inf, min= 0, vary=True)\n",
"params.add(name=\"B_offset\", value= 0, max=np.inf, min=-np.inf, vary=True)\n",
"params.add(name=\"A_fwhm\", expr=\"2.3548200*A_sigma\")\n",
"params.add(name=\"A_height\", expr=\"0.3989423*A_amplitude/max(1e-15, A_sigma)\")\n",
"params.add(name=\"B_fwhm\", expr=\"2.3548200*B_sigma\")\n",
"params.add(name=\"B_height\", expr=\"0.3989423*B_amplitude/max(1e-15, B_sigma)\")\n"
]
}
],
"source": [
"from Analyser.FitAnalyser import GaussianModel, GaussianWithOffsetModel\n",
"\n",
"fitModel = GaussianModel(prefix='A_') + GaussianWithOffsetModel(prefix='B_')\n",
"fitAnalyser = FitAnalyser(fitModel, fitDim=1)\n",
"fitAnalyser.print_params_set_template()"
]
},
{
"cell_type": "code",
"execution_count": 55,
"metadata": {},
"outputs": [
2023-08-21 11:26:02 +02:00
{
"data": {
2023-08-28 09:35:22 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm4AAAHPCAYAAADqAFbFAAAAO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IYuBERERG5CAZuRERERC6CgRsRERGRi2DgRkREROQiGLgRERERuQgGbkREREQugoEbERERkYtg4EZERETkIhi4EREREbkIBm5ERERELoKBGxEREZGLYOBGRERE5CIYuBERERG5CAZuRERERC6CgRsRERGRi2DgRkREROQiGLgRERERuQgGbkREREQugoEbERERkYtg4EZERETkIhi4EREREbkIpwvcPvnkE0iSBF9fX4tzhw4dQv/+/eHr6wt/f3/ExcXh7NmzVvNZsmQJIiIioFQq0bx5cyQkJECr1Vqku379OsaMGYOgoCB4e3ujR48eSEpKsnm9iIiIiGrKqQK31NRU/Pvf/0ZYWJjFuRMnTiAmJgbFxcX49ttv8emnn+LUqVPo2bMnbty4YZZ2/vz5mDp1KuLi4rB161ZMnDgRCxYswKRJk8zSaTQa9OvXD0lJSVi8eDG+//57BAcHIzY2Frt377ZrXYmIiIiqSu7oApT2zDPPoFevXlCr1Vi3bp3ZuVdeeQVKpRIbN26En58fACA6OhqtW7fGokWL8OabbwIAMjIyMG/ePEyYMAELFiwAAMTExECr1SI+Ph7Tpk1Du3btAAArVqxASkoK9u7dix49egAA+vTpg6ioKEyfPh0HDhyoraoTERERVchpWtzWrFmD3bt3Y9myZRbndDodNm7ciAcffNAUtAFA06ZN0adPH6xfv950bMuWLSgqKsLYsWPN8hg7diyEENiwYYPp2Pr169G2bVtT0AYAcrkco0ePxq+//orU1FQb1pCIiIioZpyixe369euYNm0aFi5ciMaNG1ucP3PmDAoLC9GxY0eLcx07dsT27dtRVFQElUqFlJQUAEBkZKRZutDQUAQFBZnOA0BKSgp69uxpNU8AOHr0KBo1amS1zBqNBhqNxvQ6JycHAKDVaq2OpaspY572yNvZuFNdAfeqrzvVFWB96zJ3qivA+toj7+pyisBt4sSJaNu2LZ599lmr5zMyMgAAarXa4pxarYYQAllZWQgNDUVGRgaUSiV8fHyspjXmZcy3rDxLv681b7zxBhISEiyOb9u2Dd7e3mVeV1Pbt2+3W97Oxp3qCrhXfd2prgDrW5e5U10B1tcWCgoKanS9wwO37777Dj/++CP++OMPSJJUbtryzpc+V9l0VU1b2syZM/HCCy+YXufk5CA8PBwDBw406861Fa1Wi+3bt2PAgAFQKBQ2z9+ZuFNdAfeqrzvVFWB96zJ3qivA+tqSsYeuuhwauOXl5WHSpEmYPHkywsLCkJ2dDQAoLi4GAGRnZ0OhUCAwMBCA9RawzMxMSJIEf39/AEBgYCCKiopQUFBg0fKVmZmJ6Oho0+vAwMAy8wSst/AZKZVKKJVKi+MKhcKuP9T2zt+ZuFNdAfeqrzvVFWB96zJ3qivA+toqz5pw6OSE9PR0XLt2De+88w4CAgJMX1999RXy8/MREBCAf/3rX2jZsiW8vLxw5MgRizyOHDmCVq1aQaVSAbg9tu3OtGlpaUhPT0eHDh1MxyIjI8vME4BZWiIiIiJHc2jgFhISguTkZIuv++67DyqVCsnJyZg3bx7kcjmGDBmCxMRE5Obmmq6/ePEikpOTERcXZzoWGxsLlUqFVatWmb3XqlWrIEkShg0bZjo2fPhwnDhxwmzZD51OhzVr1qBbt25W15MjIiIichSHdpWqVCrExMRYHF+1ahU8PDzMziUkJKBLly4YPHgwZsyYgaKiIrzyyisICgrCiy++aEqnVqsRHx+POXPmQK1WY+DAgTh48CDmzp2L8ePHm9ZwA4Bx48Zh6dKlGDlyJBYuXIiGDRt
2023-08-21 11:26:02 +02:00
"text/plain": [
2023-08-28 09:35:22 +02:00
"<Figure size 640x480 with 1 Axes>"
2023-08-21 11:26:02 +02:00
]
},
"metadata": {},
"output_type": "display_data"
2023-08-28 09:35:22 +02:00
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"f = 0.22367 ± 0.07911 A\n",
"fwhm = 0.00031 ± 0.07203 A\n",
"f = 0.22962 ± 0.00013 A\n",
"fwhm = 0.00583 ± 0.00038 A\n"
]
2023-08-21 11:26:02 +02:00
}
],
"source": [
2023-08-28 09:35:22 +02:00
"Brange=(0.22, 0.240)\n",
"\n",
"from Analyser.FitAnalyser import GaussianModel, GaussianWithOffsetModel\n",
"\n",
"data = Ncount_mean_total.where(Brange[0]<Ncount_mean_total.als_final_current).where(Ncount_mean_total.als_final_current<Brange[1])\n",
"data = data.dropna(dim='als_final_current')\n",
"data_std = Ncount_std_total.where(Brange[0]<Ncount_mean_total.als_final_current).where(Ncount_mean_total.als_final_current<Brange[1])\n",
"data_std = data_std.dropna(dim='als_final_current')\n",
"\n",
"fitModel = GaussianModel(prefix='A_') + GaussianWithOffsetModel(prefix='B_')\n",
"fitAnalyser = FitAnalyser(fitModel, fitDim=1)\n",
"# params = fitAnalyser.guess(data, x='als_final_current', guess_kwargs=dict(negative=True), dask=\"parallelized\")\n",
"params = fitAnalyser.fitModel.make_params()\n",
"params.add(name=\"A_amplitude\", value= -0.65, max=np.inf, min=-0.7, vary=True)\n",
"params.add(name=\"A_center\", value= 0.22321, max=np.inf, min=-np.inf, vary=True)\n",
"params.add(name=\"A_sigma\", value= 0.00005, max=np.inf, min= 0, vary=True)\n",
"params.add(name=\"B_amplitude\", value= -11, max=np.inf, min=-np.inf, vary=True)\n",
"params.add(name=\"B_center\", value= 0.2280, max=np.inf, min=-np.inf, vary=True)\n",
"params.add(name=\"B_sigma\", value= 0.0025, max=np.inf, min= 0, vary=True)\n",
"params.add(name=\"B_offset\", value= 2500, max=np.inf, min=-np.inf, vary=True)\n",
"\n",
"fitResult = fitAnalyser.fit(data, params, x='als_final_current', dask=\"parallelized\").load()\n",
"fitCurve = fitAnalyser.eval(fitResult, x=np.linspace(Brange[0], Brange[1], 500), dask=\"parallelized\").load()\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"\n",
"data.plot.errorbar(ax=ax, yerr = data_std, fmt='ob')\n",
"fitCurve.plot.errorbar(ax=ax)\n",
"\n",
"plt.ylim([0, 4500])\n",
"plt.ylabel('NCount')\n",
"plt.xlabel('Z_offset current (A)')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()\n",
"\n",
"f_1 = fitAnalyser.get_fit_value(fitResult).A_center\n",
"df_1 = fitAnalyser.get_fit_std(fitResult).A_center\n",
"\n",
"print('f = %.5f \\u00B1 %.5f A'% tuple([np.abs(f_1),df_1]))\n",
"\n",
"s_1 = fitAnalyser.get_fit_value(fitResult).A_sigma\n",
"ds_1 = fitAnalyser.get_fit_std(fitResult).A_sigma\n",
"\n",
"fwhm_1 = 2.3548200*s_1\n",
"dfwhm_1 = 2.3548200*ds_1\n",
"\n",
"print('fwhm = %.5f \\u00B1 %.5f A'% tuple([np.abs(fwhm_1),dfwhm_1]))\n",
"\n",
"f_1 = fitAnalyser.get_fit_value(fitResult).B_center\n",
"df_1 = fitAnalyser.get_fit_std(fitResult).B_center\n",
"\n",
"print('f = %.5f \\u00B1 %.5f A'% tuple([np.abs(f_1),df_1]))\n",
"\n",
"s_1 = fitAnalyser.get_fit_value(fitResult).B_sigma\n",
"ds_1 = fitAnalyser.get_fit_std(fitResult).B_sigma\n",
"\n",
"fwhm_1 = 2.3548200*s_1\n",
"dfwhm_1 = 2.3548200*ds_1\n",
"\n",
"print('fwhm = %.5f \\u00B1 %.5f A'% tuple([np.abs(fwhm_1),dfwhm_1]))"
2023-08-21 11:26:02 +02:00
]
},
{
"cell_type": "code",
2023-08-28 09:35:22 +02:00
"execution_count": 56,
2023-08-21 11:26:02 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-08-28 09:35:22 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm4AAAHPCAYAAADqAFbFAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAACBqElEQVR4nO3deVxU5f4H8M8ZGGZYxQHZFHBBxQXQyIXK1FQi01TSX2aaYlg3zSW7mQuWdHPpXlvM9LaLpWVpLmluiEveXNNMcFdcUWSXTYYZeH5/IJMjoOxnhvm8X6956TznOc98vxyFL8855zmSEEKAiIiIiEyeQu4AiIiIiKhyWLgRERERmQkWbk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KuAPNtyCwpV4D51taYNSHrzQlpaWm4efMmPvjgAzRu3Njw+uGHH5CXl4fGjRvjhRdeQKtWrWBra4v4+PgyY8THx8PPzw9qtRrA39e23ds3OTkZaWlp6Nixo6EtICCgwjEBGPUlIiIikpushZuHhwd27dpV5vXkk09CrVZj165deO+992BtbY2BAwdi7dq1yMnJMex/5coV7Nq1C+Hh4Ya2sLAwqNVqxMTEGH1WTEwMJEnC4MGDDW1DhgzB6dOnjZb90Ov1WLFiBbp161buenJEREREcpH1VKlarUavXr3KtMfExMDKyspoW3R0NLp06YIBAwZg+vTpKCgowNtvvw1XV1e88cYbhn4ajQZRUVGYPXs2NBoNQkNDcfjwYcyZMweRkZGGNdwAYOzYsViyZAmGDRuGBQsWwM3NDUuXLsWZM2e
2023-08-21 11:26:02 +02:00
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
2023-08-28 09:35:22 +02:00
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"f = 0.21004 ± 0.00012 A\n",
"fwhm = 0.00118 ± 0.00025 A\n"
]
2023-08-21 11:26:02 +02:00
}
],
"source": [
2023-08-28 09:35:22 +02:00
"Brange=(0.208, 0.212)\n",
2023-08-21 11:26:02 +02:00
"\n",
2023-08-28 09:35:22 +02:00
"data = Ncount_mean_total.where(Brange[0]<Ncount_mean_total.als_final_current).where(Ncount_mean_total.als_final_current<Brange[1])\n",
"data = data.dropna(dim='als_final_current')\n",
"data_std = Ncount_std_total.where(Brange[0]<Ncount_mean_total.als_final_current).where(Ncount_mean_total.als_final_current<Brange[1])\n",
"data_std = data_std.dropna(dim='als_final_current')\n",
2023-08-21 11:26:02 +02:00
"\n",
2023-08-28 09:35:22 +02:00
"fitAnalyser = FitAnalyser(\"Gaussian With Offset\", fitDim=1)\n",
"params = fitAnalyser.guess(data, x='als_final_current', guess_kwargs=dict(negative=True), dask=\"parallelized\")\n",
"fitResult = fitAnalyser.fit(data, params, x='als_final_current', dask=\"parallelized\").load()\n",
"fitCurve = fitAnalyser.eval(fitResult, x=np.linspace(Brange[0], Brange[1], 500), dask=\"parallelized\").load()\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"\n",
"data.plot.errorbar(ax=ax, yerr = data_std, fmt='ob')\n",
"fitCurve.plot.errorbar(ax=ax)\n",
"\n",
"plt.ylim([0, 4500])\n",
"plt.ylabel('NCount')\n",
"plt.xlabel('Z_offset current (A)')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()\n",
"\n",
"f_1 = fitAnalyser.get_fit_value(fitResult).center\n",
"df_1 = fitAnalyser.get_fit_std(fitResult).center\n",
"\n",
"print('f = %.5f \\u00B1 %.5f A'% tuple([np.abs(f_1),df_1]))\n",
"\n",
"s_1 = fitAnalyser.get_fit_value(fitResult).sigma\n",
"ds_1 = fitAnalyser.get_fit_std(fitResult).sigma\n",
"\n",
"fwhm_1 = 2.3548200*s_1\n",
"dfwhm_1 = 2.3548200*ds_1\n",
"\n",
"print('fwhm = %.5f \\u00B1 %.5f A'% tuple([np.abs(fwhm_1),dfwhm_1]))"
2023-08-21 11:26:02 +02:00
]
},
{
"cell_type": "code",
2023-08-28 09:35:22 +02:00
"execution_count": 57,
2023-08-21 11:26:02 +02:00
"metadata": {},
"outputs": [
{
"data": {
2023-08-28 09:35:22 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm4AAAHPCAYAAADqAFbFAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABw1klEQVR4nO3de1yUVf4H8M8DDDNcRByGu3ilJBXQJS+0oZhKaLreN2utxNV200SzzbygSeutX3ZxXdyyLCy7al4284aI2q6mbGaCppZ3Ue4g92GA8/sDGR1nUGBmmBn4vF8vXjnnOXPm+3wD/HrO85xHEkIIEBEREZHVs7N0AERERETUMCzciI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ec2gc5s841pi/O8Opjc9ysTSEuXLY0DEtenNCbm4usrKy8NZbb6Fdu3bary+++AKlpaVo164d/vSnP6Fr165wcnJCWlqa3hhpaWkIDAyEQqEAcPvatrv7ZmZmIjc3Fz179tS2BQcH1zsmAJ2+RERERJZm0cLNx8cHKSkpel+PP/44FAoFUlJSsHTpUjg4OGDkyJHYsmULiouLte+/cuUKUlJSMHbsWG1bdHQ0FAoFEhMTdT4rMTERkiRh9OjR2rYxY8bgzJkzOtt+VFVVYePGjejXr5/B/eSIiIjIdKqrb//50CHd16TPokulCoUCkZGReu2JiYmwt7fXORYfH48+ffpgxIgRmDdvHioqKrB48WKoVCq8/PLL2n5KpRJxcXFYtGgRlEoloqKikJqaiiVLlmDq1KnaPdwAYMqUKUhISMC
2023-08-21 11:26:02 +02:00
"text/plain": [
2023-08-28 09:35:22 +02:00
"<Figure size 640x480 with 1 Axes>"
2023-08-21 11:26:02 +02:00
]
},
"metadata": {},
2023-08-28 09:35:22 +02:00
"output_type": "display_data"
2023-08-21 11:26:02 +02:00
},
2023-08-28 09:35:22 +02:00
{
"name": "stdout",
"output_type": "stream",
"text": [
"f = 0.18586 ± 0.00021 A\n",
"fwhm = 0.00085 ± 0.00025 A\n"
]
}
],
"source": [
"Brange=(0.183, 0.189)\n",
"\n",
"data = Ncount_mean_total.where(Brange[0]<Ncount_mean_total.als_final_current).where(Ncount_mean_total.als_final_current<Brange[1])\n",
"data = data.dropna(dim='als_final_current')\n",
"data_std = Ncount_std_total.where(Brange[0]<Ncount_mean_total.als_final_current).where(Ncount_mean_total.als_final_current<Brange[1])\n",
"data_std = data_std.dropna(dim='als_final_current')\n",
"\n",
"fitAnalyser = FitAnalyser(\"Gaussian With Offset\", fitDim=1)\n",
"# params = fitAnalyser.guess(data, x='als_final_current', guess_kwargs=dict(negative=True), dask=\"parallelized\")\n",
"params = fitAnalyser.fitModel.make_params()\n",
"params.add(name=\"amplitude\", value= -1500, max=np.inf, min=-np.inf, vary=True)\n",
"params.add(name=\"center\", value= 0.1858, max=np.inf, min=-np.inf, vary=True)\n",
"params.add(name=\"sigma\", value= 0.001, max=np.inf, min= 0, vary=True)\n",
"params.add(name=\"offset\", value= 3700, max=np.inf, min=-np.inf, vary=True)\n",
"fitResult = fitAnalyser.fit(data, params, x='als_final_current', dask=\"parallelized\").load()\n",
"fitCurve = fitAnalyser.eval(fitResult, x=np.linspace(Brange[0], Brange[1], 500), dask=\"parallelized\").load()\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"\n",
"data.plot.errorbar(ax=ax, yerr = data_std, fmt='ob')\n",
"fitCurve.plot.errorbar(ax=ax)\n",
"\n",
"plt.ylim([0, 4500])\n",
"plt.ylabel('NCount')\n",
"plt.xlabel('Z_offset current (A)')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()\n",
"\n",
"f_1 = fitAnalyser.get_fit_value(fitResult).center\n",
"df_1 = fitAnalyser.get_fit_std(fitResult).center\n",
"\n",
"print('f = %.5f \\u00B1 %.5f A'% tuple([np.abs(f_1),df_1]))\n",
"\n",
"s_1 = fitAnalyser.get_fit_value(fitResult).sigma\n",
"ds_1 = fitAnalyser.get_fit_std(fitResult).sigma\n",
"\n",
"fwhm_1 = 2.3548200*s_1\n",
"dfwhm_1 = 2.3548200*ds_1\n",
"\n",
"print('fwhm = %.5f \\u00B1 %.5f A'% tuple([np.abs(fwhm_1),dfwhm_1]))"
]
},
{
"cell_type": "code",
"execution_count": 58,
"metadata": {},
"outputs": [
2023-08-21 11:26:02 +02:00
{
"data": {
2023-08-28 09:35:22 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm4AAAHPCAYAAADqAFbFAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABxZklEQVR4nO3de1xUdf4/8NcBhhnuONxBxGuSCmjkhd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EjIZFINNu3bxfwt7/9ltJeey0KQUEi3nijCWPHiiYfh61qqX5kmM5ev9tPjz7yyCPQ83vhXXX2GhqL9TOONdfv1gkrAICLSwJGjBCtcvLB3DWsvL0QrbBocKuursb06dMxY8YMBAYGory8HADQ0NAAACgvL4dEIoGXlxcA/TNgpaWlEAQBnp6eAAAvLy/U19ejtrZWZ+artLQUkZGRmtdeXl4t9gnon+FTk0qlkEqlOtslEolZfyhu73/bNmDCBEC8I59duyZgwgQHbN0KJCaabSg2ydz/f+51nbV+tx+yqgbG9NU5a2gqrJ9xrK1+27YBKSm/vX7iCQd07QqsWWO9/36Zq4aG9mnRmxOKi4tx48YNvP766+jSpYvm65NPPkFNTQ26dOmCP/3pT+jVqxecnJyQl5en00deXh569+4NmUwG4Ldr2+5sW1hYiOLiYgwYMECzLSwsrMU+AWi1tTZNTcDMmbqhDfht26xZqnZERETWZts2YNw44M77AAsKVNu3bbPMuKydRYObv78/srOzdb4
2023-08-21 11:26:02 +02:00
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
2023-08-28 09:35:22 +02:00
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"f = 0.17055 ± 0.00175 A\n",
"fwhm = 0.00069 ± 0.00203 A\n"
]
2023-08-21 11:26:02 +02:00
}
],
"source": [
2023-08-28 09:35:22 +02:00
"Brange=(0.167, 0.173)\n",
"\n",
"data = Ncount_mean_total.where(Brange[0]<Ncount_mean_total.als_final_current).where(Ncount_mean_total.als_final_current<Brange[1])\n",
"data = data.dropna(dim='als_final_current')\n",
"data_std = Ncount_std_total.where(Brange[0]<Ncount_mean_total.als_final_current).where(Ncount_mean_total.als_final_current<Brange[1])\n",
"data_std = data_std.dropna(dim='als_final_current')\n",
"\n",
"fitAnalyser = FitAnalyser(\"Gaussian With Offset\", fitDim=1)\n",
"# params = fitAnalyser.guess(data, x='als_final_current', guess_kwargs=dict(negative=True), dask=\"parallelized\")\n",
"params = fitAnalyser.fitModel.make_params()\n",
"params.add(name=\"amplitude\", value= -10, max=np.inf, min=-np.inf, vary=True)\n",
"params.add(name=\"center\", value= 0.1708, max=np.inf, min=-np.inf, vary=True)\n",
"params.add(name=\"sigma\", value= 0.001, max=np.inf, min= 0, vary=True)\n",
"params.add(name=\"offset\", value= 3700, max=np.inf, min=-np.inf, vary=True)\n",
"fitResult = fitAnalyser.fit(data, params, x='als_final_current', dask=\"parallelized\").load()\n",
"fitCurve = fitAnalyser.eval(fitResult, x=np.linspace(Brange[0], Brange[1], 500), dask=\"parallelized\").load()\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"\n",
"data.plot.errorbar(ax=ax, yerr = data_std, fmt='ob')\n",
"fitCurve.plot.errorbar(ax=ax)\n",
"\n",
"plt.ylim([0, 4500])\n",
"plt.ylabel('NCount')\n",
"plt.xlabel('Z_offset current (A)')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()\n",
"\n",
"f_1 = fitAnalyser.get_fit_value(fitResult).center\n",
"df_1 = fitAnalyser.get_fit_std(fitResult).center\n",
"\n",
"print('f = %.5f \\u00B1 %.5f A'% tuple([np.abs(f_1),df_1]))\n",
2023-08-21 11:26:02 +02:00
"\n",
2023-08-28 09:35:22 +02:00
"s_1 = fitAnalyser.get_fit_value(fitResult).sigma\n",
"ds_1 = fitAnalyser.get_fit_std(fitResult).sigma\n",
"\n",
"fwhm_1 = 2.3548200*s_1\n",
"dfwhm_1 = 2.3548200*ds_1\n",
"\n",
"print('fwhm = %.5f \\u00B1 %.5f A'% tuple([np.abs(fwhm_1),dfwhm_1]))"
2023-08-21 11:26:02 +02:00
]
},
{
"cell_type": "code",
2023-08-28 09:35:22 +02:00
"execution_count": 59,
2023-08-21 11:26:02 +02:00
"metadata": {},
"outputs": [
{
2023-08-28 09:35:22 +02:00
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAm4AAAHPCAYAAADqAFbFAAAAOXRFWHRTb2Z0d2FyZQBNYX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wXV5eDl9fX4SHhxtN59an1WqRnZ2NsLAwuLi4NFiPWh9jIR+MhbwwHvLBWMiHrWOhn6lrLocmbrdu3cL8+fOxYMEC+Pj44Pr16wCAO3fuAACuX78OFxcXeHh4ADA/AlZWVgZJktCtWzcAgIeHB6qqqlBZWWky8lVWVoagoCDDtoeHR4NtAuZH+PRUKhVUKpVJuYuLi0UBtbQetT7GQj4YC3lhPOSDsZAPW8XC2jYc+nBCSUkJLl++jNdffx3du3c3fH300UeoqKhA9+7d8Yc//AEDBw6Eq6srCgoKTNooKCjAoEGDoFarAdy7t61+3eLiYpSUlGDYsGGGMn9//wbbBGBUl4iIiMjRHJq49erVC7m5uSZfEydOhFqtRm5uLlauXAlnZ2dMmTIFmZmZuHnzpuH48+fPIzc3F1FRUYayiIgIqNVqZGRkGH1WRkYGJEnCtGnTDGWRkZE4ffq00bIfNTU12LZtG0aPHm12PTkiIiIiR3HoVKlarUZoaKhJeUZGBpycnIz2paSkYOTIkZg8eTISEhJQVVWFFStWwNPTEy+88IKhnkajQVJSEpYvXw6NRoPw8HDk5+cjOTkZsbGxhjXcAGDOnDlIT0/HjBkzsGbNGvTs2RMbN27EDz/8gEOHDrXmqRMRERE1m2zWcWuKn58fjhw5Ahc
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"Brange=(0.07, 0.095)\n",
"\n",
"from Analyser.FitAnalyser import GaussianModel, GaussianWithOffsetModel\n",
"\n",
"data = Ncount_mean_total.where(Brange[0]<Ncount_mean_total.als_final_current).where(Ncount_mean_total.als_final_current<Brange[1])\n",
"data = data.dropna(dim='als_final_current')\n",
"data_std = Ncount_std_total.where(Brange[0]<Ncount_mean_total.als_final_current).where(Ncount_mean_total.als_final_current<Brange[1])\n",
"data_std = data_std.dropna(dim='als_final_current')\n",
"\n",
"# fitModel = GaussianModel(prefix='A_') + GaussianWithOffsetModel(prefix='B_')\n",
"# fitAnalyser = FitAnalyser(fitModel, fitDim=1)\n",
"# # fitAnalyser = FitAnalyser(\"Gaussian With Offset\", fitDim=1)\n",
"# # params = fitAnalyser.guess(data, x='als_final_current', guess_kwargs=dict(negative=True), dask=\"parallelized\")\n",
"# params = fitAnalyser.fitModel.make_params()\n",
"# params.add(name=\"A_amplitude\", value= -1, max=np.inf, min=-0.7, vary=True)\n",
"# params.add(name=\"A_center\", value= 0.09, max=np.inf, min=-np.inf, vary=True)\n",
"# params.add(name=\"A_sigma\", value= 0.0005, max=np.inf, min= 0, vary=True)\n",
"# params.add(name=\"B_amplitude\", value= -11, max=np.inf, min=-np.inf, vary=True)\n",
"# params.add(name=\"B_center\", value= 0.085, max=np.inf, min=-np.inf, vary=True)\n",
"# params.add(name=\"B_sigma\", value= 0.01, max=np.inf, min= 0, vary=True)\n",
"# params.add(name=\"B_offset\", value= 3500, max=np.inf, min=-np.inf, vary=True)\n",
"\n",
"# fitResult = fitAnalyser.fit(data, params, x='als_final_current', dask=\"parallelized\").load()\n",
"# fitCurve = fitAnalyser.eval(fitResult, x=np.linspace(Brange[0], Brange[1], 500), dask=\"parallelized\").load()\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"\n",
"data.plot.errorbar(ax=ax, yerr = data_std, fmt='ob')\n",
"# fitCurve.plot.errorbar(ax=ax)\n",
"\n",
"plt.ylim([0, 4500])\n",
"plt.ylabel('NCount')\n",
"plt.xlabel('Z_offset current (A)')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()\n",
"\n",
"# f_1 = fitAnalyser.get_fit_value(fitResult).A_center\n",
"# df_1 = fitAnalyser.get_fit_std(fitResult).A_center\n",
"\n",
"# print('f = %.5f \\u00B1 %.5f A'% tuple([np.abs(f_1),df_1]))\n",
"\n",
"# s_1 = fitAnalyser.get_fit_value(fitResult).A_sigma\n",
"# ds_1 = fitAnalyser.get_fit_std(fitResult).A_sigma\n",
"\n",
"# fwhm_1 = 2.3548200*s_1\n",
"# dfwhm_1 = 2.3548200*ds_1\n",
"\n",
"# print('fwhm = %.5f \\u00B1 %.5f A'% tuple([np.abs(fwhm_1),dfwhm_1]))\n",
"\n",
"# f_1 = fitAnalyser.get_fit_value(fitResult).B_center\n",
"# df_1 = fitAnalyser.get_fit_std(fitResult).B_center\n",
"\n",
"# print('f = %.5f \\u00B1 %.5f A'% tuple([np.abs(f_1),df_1]))\n",
"\n",
"# s_1 = fitAnalyser.get_fit_value(fitResult).B_sigma\n",
"# ds_1 = fitAnalyser.get_fit_std(fitResult).B_sigma\n",
"\n",
"# fwhm_1 = 2.3548200*s_1\n",
"# dfwhm_1 = 2.3548200*ds_1\n",
"\n",
"# print('fwhm = %.5f \\u00B1 %.5f A'% tuple([np.abs(fwhm_1),dfwhm_1]))"
]
},
{
"cell_type": "code",
"execution_count": 60,
"metadata": {},
"outputs": [
2023-08-21 11:26:02 +02:00
{
"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",
2023-08-28 09:35:22 +02:00
"</style><pre class='xr-text-repr-fallback'><xarray.DataArray 'OD' (als_final_current: 1)>\n",
"array([332.40889692])\n",
2023-08-21 11:26:02 +02:00
"Coordinates:\n",
2023-08-28 09:35:22 +02:00
" * als_final_current (als_final_current) float64 0.0903</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'>als_final_current</span>: 1</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-003831ed-ef8c-4353-a89a-07d86978ba42' class='xr-array-in' type='checkbox' checked><label for='section-003831ed-ef8c-4353-a89a-07d86978ba42' 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>332.4</span></div><div class='xr-array-data'><pre>array([332.40889692])</pre></div></div></li><li class='xr-section-item'><input id='section-4cc78a1f-a9a6-41c2-925f-7a400b6a7c67' class='xr-section-summary-in' type='checkbox' checked><label for='section-4cc78a1f-a9a6-41c2-925f-7a400b6a7c67' 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'>als_final_current</span></div><div class='xr-var-dims'>(als_final_current)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0903</div><input id='attrs-77640650-a651-4b7f-9a87-bfb5fff7b00a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-77640650-a651-4b7f-9a87-bfb5fff7b00a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-159832ff-7ba7-40e1-bdef-5e2129e28470' class='xr-var-data-in' type='checkbox'><label for='data-159832ff-7ba7-40e1-bdef-5e2129e28470' 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.0903])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-ab676435-7c40-4818-b13d-724fa314ba5f' class='xr-section-summary-in' type='checkbox' ><label for='section-ab676435-7c40-4818-b13d-724fa314ba5f' 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>als_final_current</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-84aad126-830b-4d0d-b08c-642b0b846989' class='xr-index-data-in' type='checkbox'/><label for='index-84aad126-830b-4d0d-b08c-642b0b846989' 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.0903], dtype='float64', name='als_final_current'))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-733a1cca-031d-4106-9c7c-717e605f3e7c' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-733a1cca-031d-4106-9c7c-717e605f3e7c' 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>"
2023-08-21 11:26:02 +02:00
],
"text/plain": [
2023-08-28 09:35:22 +02:00
"<xarray.DataArray 'OD' (als_final_current: 1)>\n",
"array([332.40889692])\n",
2023-08-21 11:26:02 +02:00
"Coordinates:\n",
2023-08-28 09:35:22 +02:00
" * als_final_current (als_final_current) float64 0.0903"
2023-08-21 11:26:02 +02:00
]
},
2023-08-28 09:35:22 +02:00
"execution_count": 60,
2023-08-21 11:26:02 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
2023-08-28 09:35:22 +02:00
"data.where(data==data.min(), drop='True')"
2023-08-21 11:26:02 +02:00
]
},
{
"cell_type": "code",
2023-08-28 09:35:22 +02:00
"execution_count": 61,
2023-08-21 11:26:02 +02:00
"metadata": {},
2023-08-28 09:35:22 +02:00
"outputs": [],
2023-08-21 11:26:02 +02:00
"source": [
2023-08-28 09:35:22 +02:00
"Ncount_mean_total_origin = copy.deepcopy(Ncount_mean_total)\n",
"Ncount_mean_std_origin = copy.deepcopy(Ncount_std_total)"
2023-08-21 11:26:02 +02:00
]
},
{
"cell_type": "code",
2023-08-28 09:35:22 +02:00
"execution_count": 62,
2023-08-21 11:26:02 +02:00
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
2023-08-28 09:35:22 +02:00
"<xarray.backends.zarr.ZarrStore at 0x29546678dd0>"
2023-08-21 11:26:02 +02:00
]
},
2023-08-28 09:35:22 +02:00
"execution_count": 62,
2023-08-21 11:26:02 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
2023-08-28 09:35:22 +02:00
"res = Ncount_mean_total_origin.to_dataset()\n",
"res = res.assign(std = Ncount_mean_std_origin)\n",
"res.to_zarr('./CompZ.zarr')"
2023-08-21 11:26:02 +02:00
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
2023-08-28 09:35:22 +02:00
"source": [
"Ncount_mean_total = copy.deepcopy(Ncount_mean_total_origin)\n",
"Ncount_mean_std = copy.deepcopy(Ncount_mean_std_origin)\n",
"\n",
"B = np.sqrt((Ncount_mean_total['als_final_current'] * 10.6021 + 0.3254)**2 + (0.4333**2 - 0.3254**2))\n",
"Ncount_mean_total['als_final_current'] = B\n",
"Ncount_std_total['als_final_current'] = B"
]
2023-08-21 11:26:02 +02:00
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
2023-08-28 09:35:22 +02:00
"source": [
"import matplotlib.patches as patches\n",
"\n",
"B0 = [1.2950, 1.3060, 2.1740, 2.3360, 2.5910, 2.7400, 2.8030, 2.7800, 3.3570, 4.9490, 5.0830]# , 7.1720, 7.2040, 7.1340]\n",
"B0_width = [0.0090, 0.0100, 0.0005, 0.0005, 0.0010, 0.0005, 0.0210, 0.0150, 0.0430, 0.0005, 0.1300]# , 0.0240, 0.0005, 0.0360]\n",
"\n",
"fig = plt.figure(figsize=(24,6))\n",
"ax = fig.gca()\n",
"Ncount_mean_total.plot.errorbar(ax=ax, yerr = Ncount_std_total, fmt='ob')\n",
"\n",
"for i in range(len(B0)):\n",
" rect = patches.Rectangle((B0[i] - B0_width[i], 000), B0_width[i]*2, 4000, linewidth=1, edgecolor='r', facecolor='r', alpha=0.4)\n",
" ax.add_patch(rect)\n",
"\n",
"plt.ylim([0, 4500])\n",
"plt.ylabel('NCount')\n",
"plt.xlabel('Magnetic Field (G)')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
2023-08-21 11:26:02 +02:00
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
2023-08-28 09:35:22 +02:00
"source": [
"f = [0.44224, 0.28128, 0.22367, 0.22962, 0.21004, 0.18586, 0.17055, 0.0903] \n",
"df = [0.00038, 0.00016, 0.01, 0.00013, 0.00012, 0.00021, 0.00175, 0]\n",
"B = [(1.2950 + 1.3060)/2, 2.1740, 2.3360, 2.5910, 2.7400, (2.8030 + 2.7800)/2, 3.3570, 5.0830]# , 7.1720, 7.2040, 7.1340]\n",
"\n",
"# f = [0.44224, 0.28128, 0.21004, 0.18586, 0.17055, 0.0903] \n",
"# df = [0.00038, 0.00016, 0.00012, 0.00021, 0.00175, 0]\n",
"# B = [(1.2950 + 1.3060)/2, 2.1740, 2.3360, 2.5910, 3.3570, 5.0830]# , 7.1720, 7.2040, 7.1340]\n",
"B = np.flip(B)\n",
"\n",
"data = xr.DataArray(\n",
" data=B,\n",
" dims='x',\n",
" coords=dict(x=f)\n",
")\n",
"\n",
"data_std = xr.DataArray(\n",
" data=df,\n",
" dims='x',\n",
" coords=dict(x=f)\n",
")\n",
"\n",
"fitAnalyser = FitAnalyser(\"Linear\", fitDim=1)\n",
"params = fitAnalyser.guess(data, dask=\"parallelized\")\n",
"# params = fitAnalyser.fitModel.make_params()\n",
"fitResult = fitAnalyser.fit(data, params, dask=\"parallelized\").load()\n",
"fitCurve = fitAnalyser.eval(fitResult, x=np.linspace(f[-1], f[0], 500), dask=\"parallelized\").load()\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"data.plot.errorbar(ax=ax, xerr = df, fmt='ob')\n",
"fitCurve.plot.errorbar(ax=ax)\n",
"\n",
"# plt.ylim([0, 4500])\n",
"plt.ylabel('Magnetic Field (G)')\n",
"plt.xlabel('Z_offset current (A)')\n",
"plt.tight_layout()\n",
"plt.grid(visible=1)\n",
"plt.show()\n",
"\n",
"slope = fitAnalyser.get_fit_value(fitResult).slope\n",
"dslope = fitAnalyser.get_fit_std(fitResult).slope\n",
"\n",
"print('slope = %.5f \\u00B1 %.5f A'% tuple([np.abs(slope),dslope]))\n",
"\n",
"intercept = fitAnalyser.get_fit_value(fitResult).intercept\n",
"dintercept = fitAnalyser.get_fit_std(fitResult).intercept\n",
"\n",
"print('intercept = %.5f \\u00B1 %.5f A'% tuple([np.abs(intercept),dintercept]))"
]
2023-08-21 11:26:02 +02:00
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
2023-08-28 09:35:22 +02:00
"source": [
"def magnetic_field_func(x, b0=0, by0=0, alpha=1):\n",
" return np.sqrt( (b0**2 - by0**2) + (alpha * x + by0)**2 )\n",
"\n",
"data_quadratic = data\n",
"\n",
"fitModel_quadratic = NewFitModel(magnetic_field_func)\n",
"fitAnalyser_quadratic = FitAnalyser(fitModel_quadratic, fitDim=1)\n",
"params_quadratic = fitAnalyser_quadratic.fitModel.make_params()\n",
"params_quadratic.add(name=\"b0\", value= 0.4333, max=np.inf, min=-np.inf, vary=True)\n",
"params_quadratic.add(name=\"by0\", value= 0.33732, max=np.inf, min=-np.inf, vary=True)\n",
"params_quadratic.add(name=\"alpha\", value= 10.6021, max=np.inf, min=-np.inf, vary=True)\n",
"fitResult_quadratic = fitAnalyser_quadratic.fit(data_quadratic, params_quadratic).load()\n",
"\n",
"fitCurve_quadratic = fitAnalyser_quadratic.eval(fitResult_quadratic, x=np.linspace(0, 0.6, 100), dask=\"parallelized\").load()"
]
2023-08-21 11:26:02 +02:00
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
2023-08-28 09:35:22 +02:00
"source": [
"data_linear = data[3:]\n",
"\n",
"fitAnalyser_linear = FitAnalyser('Linear', fitDim=1)\n",
"params_linear = fitAnalyser_linear.guess(data_linear, dask=\"parallelized\")\n",
"fitResult_linear = fitAnalyser_linear.fit(data_linear, params_linear).load()\n",
"\n",
"fitCurve_linear = fitAnalyser_linear.eval(fitResult_linear, x=np.linspace(0, 0.5, 100), dask=\"parallelized\").load()\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"\n",
"data.plot.errorbar(ax=ax, fmt='ob', yerr=data_std)\n",
"# fitCurve_linear.plot.errorbar(ax=ax)\n",
"fitCurve_quadratic.plot.errorbar(ax=ax)\n",
"\n",
"plt.ylabel('Magnetic Field (G)')\n",
"plt.xlabel('Z_offset current (A)')\n",
"plt.xticks(fontsize=12)\n",
"plt.yticks(fontsize=12)\n",
"# plt.legend(fontsize=12)\n",
"#plt.xlim(-0.01, 0.04)\n",
"# plt.ylim(0, 10000)\n",
"plt.grid(visible=1)\n",
"plt.tight_layout()\n",
"plt.show()"
]
2023-08-21 11:26:02 +02:00
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
2023-08-28 09:35:22 +02:00
"source": [
"alpha = fitAnalyser.get_fit_value(fitResult_quadratic).alpha\n",
"dalpha = fitAnalyser.get_fit_std(fitResult_quadratic).alpha\n",
"\n",
"print('alpha = %.5f \\u00B1 %.5f G/A'% tuple([np.abs(alpha),dalpha]))\n",
"\n",
"beta = fitAnalyser.get_fit_value(fitResult_quadratic).by0\n",
"dbeta = fitAnalyser.get_fit_std(fitResult_quadratic).by0\n",
"\n",
"print('beta = %.5f \\u00B1 %.5f A'% tuple([beta,dbeta]))\n",
"\n",
"b0 = fitAnalyser.get_fit_value(fitResult_quadratic).b0\n",
"db0 = fitAnalyser.get_fit_std(fitResult_quadratic).b0\n",
"\n",
"print('b0 = %.5f \\u00B1 %.5f A'% tuple([b0,db0]))"
]
2023-08-21 11:26:02 +02:00
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
2023-08-28 09:35:22 +02:00
"source": [
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"\n",
"ax.errorbar([0], [9.46], fmt='ob', label='Theory')\n",
"ax.errorbar([1], [9.52], yerr=[0.05], fmt='or', label='RF')\n",
"ax.errorbar([2], [9.523], yerr=[0.019], fmt='og', label='ALS Linear')\n",
"ax.errorbar([3], [9.576], yerr=[0.032], fmt='ok', label='ALS Quadratic')\n",
"\n",
"plt.ylabel('Alpha X (G/A)')\n",
"\n",
"plt.legend()\n",
"plt.show()"
]
2023-08-21 11:26:02 +02:00
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
2023-08-28 09:35:22 +02:00
"source": [
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"\n",
"ax.errorbar([1], [-0.164], yerr=[0.017], fmt='or', label='RF')\n",
"ax.errorbar([2], [0.105], yerr=[0.006], fmt='og', label='ALS Linear')\n",
"ax.errorbar([3], [ -0.138], yerr=[0.018], fmt='ok', label='ALS Quadratic')\n",
"\n",
"plt.xlim([-0.1, 3.1])\n",
"plt.ylabel('Beta X (G)')\n",
"\n",
"plt.legend()\n",
"plt.show()"
]
2023-08-21 11:26:02 +02:00
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
2023-08-28 09:35:22 +02:00
"source": [
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"\n",
"ax.errorbar([0], [10.75], fmt='ob', label='Theory')\n",
"ax.errorbar([1], [10.6021], yerr=[0.0022], fmt='or', label='RF')\n",
"ax.errorbar([2], [10.73], yerr=[0.12], fmt='og', label='ALS Linear')\n",
"ax.errorbar([3], [10.683], yerr=[0.028], fmt='ok', label='ALS Quadratic')\n",
"\n",
"plt.ylabel('Alpha Z (G/A)')\n",
"\n",
"plt.legend()\n",
"plt.show()"
]
2023-08-21 11:26:02 +02:00
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
2023-08-28 09:35:22 +02:00
"source": [
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"\n",
"ax.errorbar([1], [0.3254], yerr=[0.0008], fmt='or', label='RF')\n",
"ax.errorbar([2], [0.337], yerr=[0.031], fmt='og', label='ALS Linear')\n",
"ax.errorbar([3], [0.365], yerr=[0.014], fmt='ok', label='ALS Quadratic')\n",
"\n",
"plt.xlim([-0.1, 3.1])\n",
"plt.ylabel('Beta Z (G)')\n",
"\n",
"plt.legend()\n",
"plt.show()"
]
2023-08-21 11:26:02 +02:00
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
2023-08-28 09:35:22 +02:00
"source": [
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"\n",
"ax.errorbar([0], [10.18], fmt='ob', label='Theory')\n",
"ax.errorbar([1], [10.30], yerr=[0.05], fmt='or', label='RF')\n",
"ax.errorbar([2], [10.447], yerr=[0.023], fmt='og', label='ALS Linear')\n",
"ax.errorbar([3], [10.516], yerr=[0.038], fmt='ok', label='ALS Quadratic')\n",
"\n",
"plt.ylabel('Alpha Y (G/A)')\n",
"\n",
"plt.legend()\n",
"plt.show()"
]
2023-08-21 11:26:02 +02:00
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
2023-08-28 09:35:22 +02:00
"source": [
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"\n",
"ax.errorbar([1], [0.202], yerr=[0.015], fmt='or', label='RF')\n",
"ax.errorbar([2], [0.0762 ], yerr=[0.0064], fmt='og', label='ALS Linear')\n",
"ax.errorbar([3], [0.039 ], yerr=[0.019], fmt='ok', label='ALS Quadratic')\n",
"\n",
"plt.xlim([-0.1, 3.1])\n",
"plt.ylabel('Beta Y (G)')\n",
"\n",
"plt.legend()\n",
"plt.show()"
]
2023-08-21 11:26:02 +02:00
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
2023-08-28 09:35:22 +02:00
"source": [
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"\n",
"ax.errorbar([1], [-0.164], yerr=[0.017], fmt='or', label='RF')\n",
"ax.errorbar([3], [-0.138], yerr=[0.018], fmt='ok', label='ALS Quadratic')\n",
"ax.errorbar([4], [0.417], yerr=[0.01], fmt='ob', label='RF average')\n",
"\n",
"plt.xlim([-0.1, 4.1])\n",
"plt.ylabel('B0 X (G)')\n",
"\n",
"plt.legend()\n",
"plt.show()"
]
2023-08-21 11:26:02 +02:00
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
2023-08-28 09:35:22 +02:00
"source": [
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"\n",
"ax.errorbar([1], [0.440], yerr=[0.009], fmt='or', label='RF')\n",
"ax.errorbar([3], [0.313], yerr=[0.071], fmt='ok', label='ALS Quadratic')\n",
"ax.errorbar([4], [0.417], yerr=[0.01], fmt='ob', label='RF average')\n",
"\n",
"plt.xlim([-0.1, 4.1])\n",
"plt.ylabel('B0 Y (G)')\n",
"\n",
"plt.legend()\n",
"plt.show()"
]
2023-08-21 11:26:02 +02:00
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
2023-08-28 09:35:22 +02:00
"source": [
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"\n",
"ax.errorbar([1], [0.4333], yerr=[0.0007], fmt='or', label='RF')\n",
"ax.errorbar([3], [0.243 ], yerr=[0.054], fmt='ok', label='ALS Quadratic')\n",
"ax.errorbar([4], [0.417], yerr=[0.01], fmt='ob', label='RF average')\n",
"\n",
"plt.xlim([-0.1, 4.1])\n",
"plt.ylabel('B0 Z (G)')\n",
"\n",
"plt.legend()\n",
"plt.show()"
]
2023-08-21 11:26:02 +02:00
},
{
2023-08-28 09:35:22 +02:00
"attachments": {},
"cell_type": "markdown",
2023-08-21 11:26:02 +02:00
"metadata": {},
2023-08-28 09:35:22 +02:00
"source": [
"# Test"
]
2023-08-21 11:26:02 +02:00
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%matplotlib notebook\n",
"shotNum = \"0024\"\n",
"filePath = folderPath + \"/\" + shotNum + \"/*.h5\"\n",
"\n",
"dataSetDict = {\n",
" dskey[groupList[i]]: read_hdf5_file(filePath, groupList[i], excludeAxis = ['sweep_start_freq', 'sweep_stop_freq'])\n",
" for i in [0]\n",
"}\n",
"\n",
"dataSet = dataSetDict[\"camera_0\"]\n",
"\n",
"print_scanAxis(dataSet)\n",
"\n",
"scanAxis = get_scanAxis(dataSet)\n",
"\n",
"dataSet = auto_rechunk(dataSet)\n",
"\n",
"dataSet = imageAnalyser.get_absorption_images(dataSet)\n",
"\n",
"imageAnalyser.center = (135, 990)\n",
"imageAnalyser.span = (250, 250)\n",
"imageAnalyser.fraction = (0.1, 0.1)\n",
"\n",
"dataSet_cropOD = imageAnalyser.crop_image(dataSet.OD)\n",
"dataSet_cropOD = imageAnalyser.substract_offset(dataSet_cropOD).load()\n",
"\n",
"Ncount = imageAnalyser.get_Ncount(dataSet_cropOD)\n",
"Ncount_mean = calculate_mean(Ncount)\n",
"Ncount_std = calculate_std(Ncount)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.gca()\n",
"Ncount_mean.plot.errorbar(ax=ax, yerr = Ncount_std, fmt='ob')\n",
"\n",
"plt.ylabel('NCount')\n",
"plt.tight_layout()\n",
"#plt.ylim([0, 3500])\n",
"plt.grid(visible=1)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": false
},
"outputs": [],
"source": [
2023-08-28 09:35:22 +02:00
"l = list(np.arange(525e-3, 552e-3, 0.9e-3))\n",
2023-08-21 11:26:02 +02:00
"# l = np.logspace(np.log10(250e-6), np.log10(500e-3), num=15)\n",
"\n",
"l = [round(item, 7) for item in l]\n",
2023-08-28 09:35:22 +02:00
"#random.shuffle(l)\n",
2023-08-21 11:26:02 +02:00
"\n",
"print(l)\n",
"print(len(l))\n",
"np.mean(l)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"pixel = 5.86e-6\n",
"M = 0.6827\n",
"F = (1/(0.3725*8.4743e-14)) * (pixel / M)**2\n",
"NCount = 85000\n",
"AtomNumber = NCount * F / 1e8\n",
"print(AtomNumber)\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"muB = 9.274e-24\n",
"hbar = 6.626e-34 / (2 * np.pi)\n",
"gJ = 1.24\n",
"Delta = 2 * np.pi * 100 * 1e3\n",
"\n",
"Bz = (Delta*hbar) / (muB*gJ)\n",
"print(Bz * 1e4)"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## ODT 1 Calibration"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"v_high = 2.7\n",
"\"\"\"High Power\"\"\"\n",
"P_arm1_high = 5.776 * v_high - 0.683\n",
"\n",
"v_mid = 0.2076\n",
"\"\"\"Intermediate Power\"\"\"\n",
"P_arm1_mid = 5.815 * v_mid - 0.03651\n",
"\n",
2023-08-28 09:35:22 +02:00
"v_low = 0.062\n",
2023-08-21 11:26:02 +02:00
"\"\"\"Low Power\"\"\"\n",
"P_arm1_low = 5271 * v_low - 27.5\n",
"\n",
"print(round(P_arm1_high, 3))\n",
"print(round(P_arm1_mid, 3))\n",
"print(round(P_arm1_low, 3))"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## ODT 2 Power Calibration"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
2023-08-28 09:35:22 +02:00
"v = 0.842\n",
2023-08-21 11:26:02 +02:00
"P_arm2 = 2.302 * v - 0.06452\n",
"print(round(P_arm2, 3))"
]
2023-08-28 09:35:22 +02:00
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
2023-08-21 11:26:02 +02:00
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
},
"vscode": {
"interpreter": {
"hash": "c05913ad4f24fdc6b2418069394dc5835b1981849b107c9ba6df693aafd66650"
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}