From 2ab03678bf16543f79414065e4e3a6fbe4f4ca10 Mon Sep 17 00:00:00 2001 From: Gao Date: Wed, 14 Jun 2023 14:54:57 +0200 Subject: [PATCH] debug --- Analyser/ImagingAnalyser.py | 2 +- DataContainer/MongoDB.py | 42 +- testMongoDB.ipynb | 5152 ++--------------------------------- 3 files changed, 222 insertions(+), 4974 deletions(-) diff --git a/Analyser/ImagingAnalyser.py b/Analyser/ImagingAnalyser.py index 197b31d..6445c7c 100644 --- a/Analyser/ImagingAnalyser.py +++ b/Analyser/ImagingAnalyser.py @@ -142,7 +142,7 @@ class ImageAnalyser(): } ) - dataSet[self._image_name['OD']].attrs.update(dataSet.attrs) + # dataSet[self._image_name['OD']].attrs.update(dataSet.attrs) return dataSet diff --git a/DataContainer/MongoDB.py b/DataContainer/MongoDB.py index 36fe098..05af6a7 100644 --- a/DataContainer/MongoDB.py +++ b/DataContainer/MongoDB.py @@ -61,6 +61,15 @@ class MongoDB: if not date is None: self.set_date(date) + data = { + 'year': self.year, + 'month': self.month, + 'day': self.day, + 'shotNum': shotNum, + } + + self.mongoDB['global'].delete_many(data) + data = { 'year': self.year, 'month': self.month, @@ -91,6 +100,11 @@ class MongoDB: ) stackedDataArray = self._break_dataSet(dataSet) + try: + stackedDataArray.load() + except: + pass + stackedDataArray = stackedDataArray.groupby('_scanAxis') for i in stackedDataArray: @@ -133,7 +147,7 @@ class MongoDB: self.mongoDB['global'].update_one(filter, {"$set": data}, upsert=False) - def _add_data_xarray_dataArray(self, shotNum, dataArray, scanAxis=None): + def _add_data_xarray_dataArray(self, shotNum, dataArray, name=None, scanAxis=None): if scanAxis is None: scanAxis = list(dataArray.coords) @@ -255,9 +269,9 @@ class MongoDB: self._add_data_normal(shotNum=shotNum, runNum=runNum, data=data) elif engine == 'xarray': if isinstance(data, type(xr.Dataset())): - self._add_data_xarray_dataSet(shotNum=shotNum, data=data, name=name) + self._add_data_xarray_dataSet(shotNum=shotNum, dataSet=data, name=name) else: - self._add_data_xarray_dataArray(shotNum=shotNum, data=data, name=name) + self._add_data_xarray_dataArray(shotNum=shotNum, dataArray=data, name=name) elif engine == 'additional': self._add_data_additional(shotNum=shotNum, runNum=runNum, data=data, name=name) @@ -293,11 +307,12 @@ class MongoDB: result = {} dropped_attrs = OrderedDict() - docs = self.mongoDB['global'].find(filter) + docs = self.mongoDB['global'].find(filter).sort('runNum') + docs = [doc['global_parameters'] for doc in docs] for doc in docs: - global_parameters = doc['global_parameters'] + global_parameters = doc result.update( { @@ -322,7 +337,7 @@ class MongoDB: for doc in docs: - global_parameters = doc['global_parameters'] + global_parameters = doc dropped_attrs.update( { @@ -333,20 +348,19 @@ class MongoDB: scan_attrs = OrderedDict() scan_length = [] + for attrs_key in dropped_attrs.keys(): flag = True for key in scan_attrs.keys(): if equivalent(scan_attrs[key], dropped_attrs[attrs_key]): flag = False - result.update({attrs_key: key}) - break - if flag: - scan_attrs.update({ - attrs_key: dropped_attrs[attrs_key] - }) - scan_length = np.append(scan_length, len(dropped_attrs[attrs_key])) + if flag: + scan_attrs.update({ + attrs_key: dropped_attrs[attrs_key] + }) + scan_length = np.append(scan_length, len(dropped_attrs[attrs_key])) result.update( { @@ -381,7 +395,7 @@ class MongoDB: if field is None: field = globalDict - res = field + res = {} for key in field: if isinstance(globalDict[key], dict) and ('mongoID' in globalDict[key]): diff --git a/testMongoDB.ipynb b/testMongoDB.ipynb index 402e167..637c9c3 100644 --- a/testMongoDB.ipynb +++ b/testMongoDB.ipynb @@ -16,7 +16,7 @@ }, { "cell_type": "code", - "execution_count": 178, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -27,20 +27,9 @@ }, { "cell_type": "code", - "execution_count": 174, + "execution_count": 3, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'ok': 1.0}" - ] - }, - "execution_count": 174, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# mongoClient.admin.command(\n", "# 'createUser', 'control', \n", @@ -51,20 +40,9 @@ }, { "cell_type": "code", - "execution_count": 173, + "execution_count": 4, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'ok': 1.0}" - ] - }, - "execution_count": 173, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# mongoClient.admin.command(\n", "# 'dropUser', 'contorl'\n", @@ -73,44 +51,9 @@ }, { "cell_type": "code", - "execution_count": 175, + "execution_count": 5, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'users': [{'_id': 'admin.control',\n", - " 'userId': Binary(b'\\xef\\x01\\xec\\xf4\\xfc\\xe2Bp\\x84v\\xcaZ\\xa3D\\xbb\\x18', 4),\n", - " 'user': 'control',\n", - " 'db': 'admin',\n", - " 'roles': [{'role': 'readWriteAnyDatabase', 'db': 'admin'}],\n", - " 'mechanisms': ['SCRAM-SHA-1', 'SCRAM-SHA-256']},\n", - " {'_id': 'admin.dbAdmin',\n", - " 'userId': Binary(b'\\xfc\\x84\\x07\\x13\\xfc\\x81F\\xc9\\x87\\xbc<\\xe6D\\xf7\\xcc\\xe0', 4),\n", - " 'user': 'dbAdmin',\n", - " 'db': 'admin',\n", - " 'roles': [{'role': 'dbAdminAnyDatabase', 'db': 'admin'}],\n", - " 'mechanisms': ['SCRAM-SHA-1', 'SCRAM-SHA-256']},\n", - " {'_id': 'admin.root',\n", - " 'userId': Binary(b'\\x07\\xe1\\xc7\\x18\\xca\\xacN5\\x93\\xf7{s`+\\xc2\\xf7', 4),\n", - " 'user': 'root',\n", - " 'db': 'admin',\n", - " 'roles': [{'role': 'root', 'db': 'admin'}],\n", - " 'mechanisms': ['SCRAM-SHA-1', 'SCRAM-SHA-256']},\n", - " {'_id': 'admin.userAdmin',\n", - " 'userId': Binary(b'\\x83U\\xb4YraK\\xc7\\xadB\\x11\\xcb\\x08\\x0eL\\x9a', 4),\n", - " 'user': 'userAdmin',\n", - " 'db': 'admin',\n", - " 'roles': [{'role': 'userAdminAnyDatabase', 'db': 'admin'}],\n", - " 'mechanisms': ['SCRAM-SHA-1', 'SCRAM-SHA-256']}],\n", - " 'ok': 1.0}" - ] - }, - "execution_count": 175, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# mongoClient.admin.command('usersInfo')" ] @@ -125,12 +68,12 @@ "output_type": "stream", "text": [ "Task executing\n", - "\n", "Task2 executing \n", "\n", + "\n", "Task2 done\n", - "Task done\n", "\n", + "Task done\n", "\n" ] } @@ -312,7 +255,7 @@ "
\n", "
\n", "

Client

\n", - "

Client-8ed8b0e1-09e5-11ee-bf58-80e82ce2fa8e

\n", + "

Client-e928dd09-0a9f-11ee-b50c-80e82ce2fa8e

\n", " \n", "\n", " \n", @@ -343,7 +286,7 @@ " \n", "
\n", "

LocalCluster

\n", - "

5b1feb01

\n", + "

f62d3f1c

\n", "
\n", " \n", "
\n", @@ -380,11 +323,11 @@ "
\n", "
\n", "

Scheduler

\n", - "

Scheduler-26a37a65-33ec-4a1b-8178-b6175add1767

\n", + "

Scheduler-2b02de43-b3ad-400f-ae4c-0914b85d2b71

\n", " \n", " \n", " \n", "
\n", - " Comm: tcp://127.0.0.1:51440\n", + " Comm: tcp://127.0.0.1:62759\n", " \n", " Workers: 6\n", @@ -426,7 +369,7 @@ " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", @@ -471,7 +414,7 @@ "
\n", - " Comm: tcp://127.0.0.1:51467\n", + " Comm: tcp://127.0.0.1:62781\n", " \n", " Total threads: 10\n", @@ -434,7 +377,7 @@ "
\n", - " Dashboard: http://127.0.0.1:51468/status\n", + " Dashboard: http://127.0.0.1:62787/status\n", " \n", " Memory: 9.31 GiB\n", @@ -442,13 +385,13 @@ "
\n", - " Nanny: tcp://127.0.0.1:51443\n", + " Nanny: tcp://127.0.0.1:62762\n", "
\n", - " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-dx7rbtlb\n", + " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-3gcis6xr\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", @@ -516,7 +459,7 @@ "
\n", - " Comm: tcp://127.0.0.1:51473\n", + " Comm: tcp://127.0.0.1:62795\n", " \n", " Total threads: 10\n", @@ -479,7 +422,7 @@ "
\n", - " Dashboard: http://127.0.0.1:51476/status\n", + " Dashboard: http://127.0.0.1:62799/status\n", " \n", " Memory: 9.31 GiB\n", @@ -487,13 +430,13 @@ "
\n", - " Nanny: tcp://127.0.0.1:51444\n", + " Nanny: tcp://127.0.0.1:62763\n", "
\n", - " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-qg83_2a9\n", + " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-z8bj7z95\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", @@ -561,7 +504,7 @@ "
\n", - " Comm: tcp://127.0.0.1:51470\n", + " Comm: tcp://127.0.0.1:62789\n", " \n", " Total threads: 10\n", @@ -524,7 +467,7 @@ "
\n", - " Dashboard: http://127.0.0.1:51471/status\n", + " Dashboard: http://127.0.0.1:62791/status\n", " \n", " Memory: 9.31 GiB\n", @@ -532,13 +475,13 @@ "
\n", - " Nanny: tcp://127.0.0.1:51445\n", + " Nanny: tcp://127.0.0.1:62764\n", "
\n", - " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-_5umuerf\n", + " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-67f2wwr0\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", @@ -606,7 +549,7 @@ "
\n", - " Comm: tcp://127.0.0.1:51479\n", + " Comm: tcp://127.0.0.1:62797\n", " \n", " Total threads: 10\n", @@ -569,7 +512,7 @@ "
\n", - " Dashboard: http://127.0.0.1:51480/status\n", + " Dashboard: http://127.0.0.1:62802/status\n", " \n", " Memory: 9.31 GiB\n", @@ -577,13 +520,13 @@ "
\n", - " Nanny: tcp://127.0.0.1:51446\n", + " Nanny: tcp://127.0.0.1:62765\n", "
\n", - " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-72uth4_y\n", + " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-g84sd6u2\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", @@ -651,7 +594,7 @@ "
\n", - " Comm: tcp://127.0.0.1:51482\n", + " Comm: tcp://127.0.0.1:62796\n", " \n", " Total threads: 10\n", @@ -614,7 +557,7 @@ "
\n", - " Dashboard: http://127.0.0.1:51483/status\n", + " Dashboard: http://127.0.0.1:62798/status\n", " \n", " Memory: 9.31 GiB\n", @@ -622,13 +565,13 @@ "
\n", - " Nanny: tcp://127.0.0.1:51447\n", + " Nanny: tcp://127.0.0.1:62766\n", "
\n", - " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-zjy152o_\n", + " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-55nj59xw\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", @@ -700,7 +643,7 @@ "" ], "text/plain": [ - "" + "" ] }, "execution_count": 11, @@ -794,7 +737,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 15, "metadata": {}, "outputs": [ { @@ -1188,8 +1131,8 @@ " compX_final_current: [0. 0.002 0.004 0.006 0.008 0.01 0...\n", " runs: [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 1...\n", " scanAxis: ['compX_final_current' 'runs']\n", - " scanAxisLength: [33. 33.]
\n", - " Comm: tcp://127.0.0.1:51474\n", + " Comm: tcp://127.0.0.1:62790\n", " \n", " Total threads: 10\n", @@ -659,7 +602,7 @@ "
\n", - " Dashboard: http://127.0.0.1:51475/status\n", + " Dashboard: http://127.0.0.1:62793/status\n", " \n", " Memory: 9.31 GiB\n", @@ -667,13 +610,13 @@ "
\n", - " Nanny: tcp://127.0.0.1:51448\n", + " Nanny: tcp://127.0.0.1:62767\n", "
\n", - " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-j1fo7yyx\n", + " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-s47mqrsf\n", "
\n", + " scanAxisLength: [33. 33.]
\n", " \n", "
\n", " \n", @@ -1284,7 +1227,7 @@ "\n", " \n", " \n", - "
  • background
    (compX_final_current, runs, y, x)
    uint16
    dask.array<chunksize=(9, 3, 1200, 1920), meta=np.ndarray>
    IMAGE_SUBCLASS :
    IMAGE_GRAYSCALE
    IMAGE_VERSION :
    1.2
    IMAGE_WHITE_IS_ZERO :
    0
    \n", + "
  • background
    (compX_final_current, runs, y, x)
    uint16
    dask.array<chunksize=(9, 3, 1200, 1920), meta=np.ndarray>
    IMAGE_SUBCLASS :
    IMAGE_GRAYSCALE
    IMAGE_VERSION :
    1.2
    IMAGE_WHITE_IS_ZERO :
    0
    \n", " \n", "
    \n", " \n", @@ -1379,7 +1322,7 @@ "\n", " \n", " \n", - "
  • dark
    (compX_final_current, runs, y, x)
    uint16
    dask.array<chunksize=(9, 3, 1200, 1920), meta=np.ndarray>
    IMAGE_SUBCLASS :
    IMAGE_GRAYSCALE
    IMAGE_VERSION :
    1.2
    IMAGE_WHITE_IS_ZERO :
    0
    \n", + "
  • dark
    (compX_final_current, runs, y, x)
    uint16
    dask.array<chunksize=(9, 3, 1200, 1920), meta=np.ndarray>
    IMAGE_SUBCLASS :
    IMAGE_GRAYSCALE
    IMAGE_VERSION :
    1.2
    IMAGE_WHITE_IS_ZERO :
    0
    \n", " \n", "
    \n", " \n", @@ -1474,7 +1417,7 @@ "\n", " \n", " \n", - "
  • shotNum
    (compX_final_current, runs)
    <U2
    dask.array<chunksize=(11, 3), meta=np.ndarray>
    \n", + "
  • shotNum
    (compX_final_current, runs)
    <U2
    dask.array<chunksize=(11, 3), meta=np.ndarray>
    \n", " \n", "
    \n", " \n", @@ -1529,10 +1472,7 @@ "\n", " \n", " \n", - "
  • OD
    (compX_final_current, runs, y, x)
    float64
    dask.array<chunksize=(9, 3, 1200, 1920), meta=np.ndarray>
    IMAGE_SUBCLASS :
    IMAGE_GRAYSCALE
    IMAGE_VERSION :
    1.2
    IMAGE_WHITE_IS_ZERO :
    0
    TOF_free :
    0.022
    abs_img_freq :
    110.858
    absorption_imaging_flag :
    True
    backup_data :
    True
    blink_off_time :
    0.001
    blink_on_time :
    0.001
    c_duration :
    0.2
    carrier_amp :
    3
    carrier_freq :
    0.85
    carrier_offset :
    0
    carrier_phase :
    0
    channel_in_use :
    1
    cmot_final_current :
    0.65
    cmot_hold :
    0.06
    cmot_initial_current :
    0.18
    compX_current :
    0
    compX_current_sg :
    0.0
    compX_initial_current :
    0
    compY_current :
    0
    compY_current_sg :
    0.0
    compY_final_current :
    0
    compY_initial_current :
    0
    compZ_current :
    0
    compZ_current_sg :
    0.189
    compZ_final_current :
    0.264
    compZ_initial_current :
    0
    default_camera :
    0
    deltaf :
    0.161
    evap_1_arm_1_final_pow :
    0.35
    evap_1_arm_1_mod_depth_final :
    0
    evap_1_arm_1_mod_depth_initial :
    1.0
    evap_1_arm_1_mod_ramp_duration :
    1.15
    evap_1_arm_1_pow_ramp_duration :
    1.65
    evap_1_arm_1_start_pow :
    7
    evap_1_arm_2_final_pow :
    5
    evap_1_arm_2_ramp_duration :
    0.5
    evap_1_arm_2_start_pow :
    0
    evap_1_mod_ramp_trunc_value :
    1
    evap_1_pow_ramp_trunc_value :
    1.0
    evap_1_rate_constant_1 :
    0.525
    evap_1_rate_constant_2 :
    0.51
    evap_2_arm_1_final_pow :
    0.037
    evap_2_arm_1_start_pow :
    0.35
    evap_2_arm_2_final_pow :
    0.09
    evap_2_arm_2_start_pow :
    5
    evap_2_ramp_duration :
    1.0
    evap_2_ramp_trunc_value :
    1.0
    evap_2_rate_constant_1 :
    0.37
    evap_2_rate_constant_2 :
    0.71
    evap_3_arm_1_final_pow :
    0.1038
    evap_3_arm_1_mod_depth_final :
    0.43
    evap_3_arm_1_mod_depth_initial :
    0
    evap_3_arm_1_start_pow :
    0.037
    evap_3_ramp_duration :
    0.1
    evap_3_ramp_trunc_value :
    1.0
    evap_3_rate_constant_1 :
    -0.879
    evap_3_rate_constant_2 :
    -0.297
    final_amp :
    0.00012
    final_freq :
    104.0
    final_pow_1 :
    0.1038
    final_pow_2 :
    0.09
    gradCoil_current :
    0.18
    gradCoil_current_sg :
    0
    imaging_method :
    in_situ_absorption
    imaging_pulse_duration :
    2.5e-05
    imaging_wavelength :
    4.21291e-07
    initial_amp :
    0.62
    initial_freq :
    102.13
    mod_depth_fin :
    0.43
    mod_depth_ini :
    0
    mod_depth_initial :
    1.0
    mot_3d_amp :
    0.62
    mot_3d_camera_trigger_duration :
    0.00025
    mot_3d_freq :
    102.13
    mot_load_duration :
    2
    odt_axis_camera_trigger_duration :
    0.002
    odt_hold_time_1 :
    0.01
    odt_hold_time_2 :
    0.1
    odt_hold_time_3 :
    0.1
    odt_hold_time_4 :
    1.0
    odt_hold_time_5 :
    0.01
    operation_mode :
    SWEEP
    pow_arm_1 :
    7
    pow_arm_2 :
    0
    pulse_delay :
    8e-05
    pulse_width :
    0.01
    push_amp :
    0.16
    push_freq :
    102.66
    ramp_duration :
    1
    recomp_ramp_duration :
    0.5
    recomp_ramp_pow_fin_arm_1 :
    0.1038
    recomp_ramp_pow_fin_arm_2 :
    0.09
    recomp_ramp_pow_ini_arm_1 :
    0.1038
    recomp_ramp_pow_ini_arm_2 :
    0.09
    save_results :
    False
    sin_mod_amplitude :
    0.00519
    sin_mod_dc_offset :
    0.1038
    sin_mod_duration :
    nan
    sin_mod_freq :
    nan
    sin_mod_phase :
    0.0
    start_pow_1 :
    0.037
    start_pow_2 :
    0.09
    stern_gerlach_duration :
    0.001
    sweep_duration :
    0.4
    sweep_start_freq :
    0.7695
    sweep_stop_freq :
    0.9305
    tf_meas_ramp_duration :
    0.1
    wait_after_2dmot_off :
    0
    wait_time_between_images :
    0.22
    wavetype :
    SINE
    x_offset :
    0.0
    x_offset_img :
    0
    y_offset :
    0.0
    y_offset_img :
    0
    z_offset :
    0.189
    z_offset_img :
    0.189
    compX_final_current :
    [0. 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02 0.\n", - " 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02 0. 0.002\n", - " 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02 ]
    runs :
    [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 2. 2.\n", - " 2. 2. 2. 2. 2. 2. 2. 2. 2.]
    scanAxis :
    ['compX_final_current' 'runs']
    scanAxisLength :
    [33. 33.]
    \n", + "
  • OD
    (compX_final_current, runs, y, x)
    float64
    dask.array<chunksize=(9, 3, 1200, 1920), meta=np.ndarray>
    IMAGE_SUBCLASS :
    IMAGE_GRAYSCALE
    IMAGE_VERSION :
    1.2
    IMAGE_WHITE_IS_ZERO :
    0
    \n", " \n", "
    \n", " \n", @@ -1627,9 +1567,9 @@ "\n", " \n", " \n", - "
    • compX_final_current
      PandasIndex
      PandasIndex(Float64Index([0.0, 0.002, 0.004, 0.006, 0.008, 0.01, 0.012, 0.014, 0.016,\n",
      +       "
    • compX_final_current
      PandasIndex
      PandasIndex(Float64Index([0.0, 0.002, 0.004, 0.006, 0.008, 0.01, 0.012, 0.014, 0.016,\n",
              "              0.018, 0.02],\n",
      -       "             dtype='float64', name='compX_final_current'))
    • runs
      PandasIndex
      PandasIndex(Float64Index([0.0, 1.0, 2.0], dtype='float64', name='runs'))
  • TOF_free :
    0.022
    abs_img_freq :
    110.858
    absorption_imaging_flag :
    True
    backup_data :
    True
    blink_off_time :
    0.001
    blink_on_time :
    0.001
    c_duration :
    0.2
    carrier_amp :
    3
    carrier_freq :
    0.85
    carrier_offset :
    0
    carrier_phase :
    0
    channel_in_use :
    1
    cmot_final_current :
    0.65
    cmot_hold :
    0.06
    cmot_initial_current :
    0.18
    compX_current :
    0
    compX_current_sg :
    0.0
    compX_initial_current :
    0
    compY_current :
    0
    compY_current_sg :
    0.0
    compY_final_current :
    0
    compY_initial_current :
    0
    compZ_current :
    0
    compZ_current_sg :
    0.189
    compZ_final_current :
    0.264
    compZ_initial_current :
    0
    default_camera :
    0
    deltaf :
    0.161
    evap_1_arm_1_final_pow :
    0.35
    evap_1_arm_1_mod_depth_final :
    0
    evap_1_arm_1_mod_depth_initial :
    1.0
    evap_1_arm_1_mod_ramp_duration :
    1.15
    evap_1_arm_1_pow_ramp_duration :
    1.65
    evap_1_arm_1_start_pow :
    7
    evap_1_arm_2_final_pow :
    5
    evap_1_arm_2_ramp_duration :
    0.5
    evap_1_arm_2_start_pow :
    0
    evap_1_mod_ramp_trunc_value :
    1
    evap_1_pow_ramp_trunc_value :
    1.0
    evap_1_rate_constant_1 :
    0.525
    evap_1_rate_constant_2 :
    0.51
    evap_2_arm_1_final_pow :
    0.037
    evap_2_arm_1_start_pow :
    0.35
    evap_2_arm_2_final_pow :
    0.09
    evap_2_arm_2_start_pow :
    5
    evap_2_ramp_duration :
    1.0
    evap_2_ramp_trunc_value :
    1.0
    evap_2_rate_constant_1 :
    0.37
    evap_2_rate_constant_2 :
    0.71
    evap_3_arm_1_final_pow :
    0.1038
    evap_3_arm_1_mod_depth_final :
    0.43
    evap_3_arm_1_mod_depth_initial :
    0
    evap_3_arm_1_start_pow :
    0.037
    evap_3_ramp_duration :
    0.1
    evap_3_ramp_trunc_value :
    1.0
    evap_3_rate_constant_1 :
    -0.879
    evap_3_rate_constant_2 :
    -0.297
    final_amp :
    0.00012
    final_freq :
    104.0
    final_pow_1 :
    0.1038
    final_pow_2 :
    0.09
    gradCoil_current :
    0.18
    gradCoil_current_sg :
    0
    imaging_method :
    in_situ_absorption
    imaging_pulse_duration :
    2.5e-05
    imaging_wavelength :
    4.21291e-07
    initial_amp :
    0.62
    initial_freq :
    102.13
    mod_depth_fin :
    0.43
    mod_depth_ini :
    0
    mod_depth_initial :
    1.0
    mot_3d_amp :
    0.62
    mot_3d_camera_trigger_duration :
    0.00025
    mot_3d_freq :
    102.13
    mot_load_duration :
    2
    odt_axis_camera_trigger_duration :
    0.002
    odt_hold_time_1 :
    0.01
    odt_hold_time_2 :
    0.1
    odt_hold_time_3 :
    0.1
    odt_hold_time_4 :
    1.0
    odt_hold_time_5 :
    0.01
    operation_mode :
    SWEEP
    pow_arm_1 :
    7
    pow_arm_2 :
    0
    pulse_delay :
    8e-05
    pulse_width :
    0.01
    push_amp :
    0.16
    push_freq :
    102.66
    ramp_duration :
    1
    recomp_ramp_duration :
    0.5
    recomp_ramp_pow_fin_arm_1 :
    0.1038
    recomp_ramp_pow_fin_arm_2 :
    0.09
    recomp_ramp_pow_ini_arm_1 :
    0.1038
    recomp_ramp_pow_ini_arm_2 :
    0.09
    save_results :
    False
    sin_mod_amplitude :
    0.00519
    sin_mod_dc_offset :
    0.1038
    sin_mod_duration :
    nan
    sin_mod_freq :
    nan
    sin_mod_phase :
    0.0
    start_pow_1 :
    0.037
    start_pow_2 :
    0.09
    stern_gerlach_duration :
    0.001
    sweep_duration :
    0.4
    sweep_start_freq :
    0.7695
    sweep_stop_freq :
    0.9305
    tf_meas_ramp_duration :
    0.1
    wait_after_2dmot_off :
    0
    wait_time_between_images :
    0.22
    wavetype :
    SINE
    x_offset :
    0.0
    x_offset_img :
    0
    y_offset :
    0.0
    y_offset_img :
    0
    z_offset :
    0.189
    z_offset_img :
    0.189
    compX_final_current :
    [0. 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02 0.\n", + " dtype='float64', name='compX_final_current'))
  • runs
    PandasIndex
    PandasIndex(Float64Index([0.0, 1.0, 2.0], dtype='float64', name='runs'))
  • TOF_free :
    0.022
    abs_img_freq :
    110.858
    absorption_imaging_flag :
    True
    backup_data :
    True
    blink_off_time :
    0.001
    blink_on_time :
    0.001
    c_duration :
    0.2
    carrier_amp :
    3
    carrier_freq :
    0.85
    carrier_offset :
    0
    carrier_phase :
    0
    channel_in_use :
    1
    cmot_final_current :
    0.65
    cmot_hold :
    0.06
    cmot_initial_current :
    0.18
    compX_current :
    0
    compX_current_sg :
    0.0
    compX_initial_current :
    0
    compY_current :
    0
    compY_current_sg :
    0.0
    compY_final_current :
    0
    compY_initial_current :
    0
    compZ_current :
    0
    compZ_current_sg :
    0.189
    compZ_final_current :
    0.264
    compZ_initial_current :
    0
    default_camera :
    0
    deltaf :
    0.161
    evap_1_arm_1_final_pow :
    0.35
    evap_1_arm_1_mod_depth_final :
    0
    evap_1_arm_1_mod_depth_initial :
    1.0
    evap_1_arm_1_mod_ramp_duration :
    1.15
    evap_1_arm_1_pow_ramp_duration :
    1.65
    evap_1_arm_1_start_pow :
    7
    evap_1_arm_2_final_pow :
    5
    evap_1_arm_2_ramp_duration :
    0.5
    evap_1_arm_2_start_pow :
    0
    evap_1_mod_ramp_trunc_value :
    1
    evap_1_pow_ramp_trunc_value :
    1.0
    evap_1_rate_constant_1 :
    0.525
    evap_1_rate_constant_2 :
    0.51
    evap_2_arm_1_final_pow :
    0.037
    evap_2_arm_1_start_pow :
    0.35
    evap_2_arm_2_final_pow :
    0.09
    evap_2_arm_2_start_pow :
    5
    evap_2_ramp_duration :
    1.0
    evap_2_ramp_trunc_value :
    1.0
    evap_2_rate_constant_1 :
    0.37
    evap_2_rate_constant_2 :
    0.71
    evap_3_arm_1_final_pow :
    0.1038
    evap_3_arm_1_mod_depth_final :
    0.43
    evap_3_arm_1_mod_depth_initial :
    0
    evap_3_arm_1_start_pow :
    0.037
    evap_3_ramp_duration :
    0.1
    evap_3_ramp_trunc_value :
    1.0
    evap_3_rate_constant_1 :
    -0.879
    evap_3_rate_constant_2 :
    -0.297
    final_amp :
    0.00012
    final_freq :
    104.0
    final_pow_1 :
    0.1038
    final_pow_2 :
    0.09
    gradCoil_current :
    0.18
    gradCoil_current_sg :
    0
    imaging_method :
    in_situ_absorption
    imaging_pulse_duration :
    2.5e-05
    imaging_wavelength :
    4.21291e-07
    initial_amp :
    0.62
    initial_freq :
    102.13
    mod_depth_fin :
    0.43
    mod_depth_ini :
    0
    mod_depth_initial :
    1.0
    mot_3d_amp :
    0.62
    mot_3d_camera_trigger_duration :
    0.00025
    mot_3d_freq :
    102.13
    mot_load_duration :
    2
    odt_axis_camera_trigger_duration :
    0.002
    odt_hold_time_1 :
    0.01
    odt_hold_time_2 :
    0.1
    odt_hold_time_3 :
    0.1
    odt_hold_time_4 :
    1.0
    odt_hold_time_5 :
    0.01
    operation_mode :
    SWEEP
    pow_arm_1 :
    7
    pow_arm_2 :
    0
    pulse_delay :
    8e-05
    pulse_width :
    0.01
    push_amp :
    0.16
    push_freq :
    102.66
    ramp_duration :
    1
    recomp_ramp_duration :
    0.5
    recomp_ramp_pow_fin_arm_1 :
    0.1038
    recomp_ramp_pow_fin_arm_2 :
    0.09
    recomp_ramp_pow_ini_arm_1 :
    0.1038
    recomp_ramp_pow_ini_arm_2 :
    0.09
    save_results :
    False
    sin_mod_amplitude :
    0.00519
    sin_mod_dc_offset :
    0.1038
    sin_mod_duration :
    nan
    sin_mod_freq :
    nan
    sin_mod_phase :
    0.0
    start_pow_1 :
    0.037
    start_pow_2 :
    0.09
    stern_gerlach_duration :
    0.001
    sweep_duration :
    0.4
    sweep_start_freq :
    0.7695
    sweep_stop_freq :
    0.9305
    tf_meas_ramp_duration :
    0.1
    wait_after_2dmot_off :
    0
    wait_time_between_images :
    0.22
    wavetype :
    SINE
    x_offset :
    0.0
    x_offset_img :
    0
    y_offset :
    0.0
    y_offset_img :
    0
    z_offset :
    0.189
    z_offset_img :
    0.189
    compX_final_current :
    [0. 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02 0.\n", " 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02 0. 0.002\n", " 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02 ]
    runs :
    [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 2. 2.\n", " 2. 2. 2. 2. 2. 2. 2. 2. 2.]
    scanAxis :
    ['compX_final_current' 'runs']
    scanAxisLength :
    [33. 33.]
  • " @@ -1663,7 +1603,7 @@ " scanAxisLength: [33. 33.]" ] }, - "execution_count": 37, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -1693,7 +1633,7 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 16, "metadata": {}, "outputs": [ { @@ -1702,7 +1642,7 @@ "(11, 3)" ] }, - "execution_count": 43, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -1713,7 +1653,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 17, "metadata": {}, "outputs": [ { @@ -1722,7 +1662,7 @@ "['atoms', 'background', 'dark', 'shotNum', 'OD']" ] }, - "execution_count": 16, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -1741,7 +1681,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 18, "metadata": {}, "outputs": [ { @@ -1773,3708 +1713,24 @@ }, { "cell_type": "code", - "execution_count": 62, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
    \n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
    <xarray.Dataset>\n",
    -       "Dimensions:              (compX_final_current: 11, runs: 3, y: 1200, x: 1920)\n",
    -       "Coordinates:\n",
    -       "  * compX_final_current  (compX_final_current) float64 0.0 0.002 ... 0.018 0.02\n",
    -       "  * runs                 (runs) float64 0.0 1.0 2.0\n",
    -       "Dimensions without coordinates: y, x\n",
    -       "Data variables:\n",
    -       "    atoms                (compX_final_current, runs, y, x) uint16 dask.array<chunksize=(9, 3, 1200, 1920), meta=np.ndarray>\n",
    -       "    background           (compX_final_current, runs, y, x) uint16 dask.array<chunksize=(9, 3, 1200, 1920), meta=np.ndarray>\n",
    -       "    dark                 (compX_final_current, runs, y, x) uint16 dask.array<chunksize=(9, 3, 1200, 1920), meta=np.ndarray>\n",
    -       "    shotNum              (compX_final_current, runs) <U2 '00' '11' ... '21' '32'\n",
    -       "    OD                   (compX_final_current, runs, y, x) float64 dask.array<chunksize=(9, 3, 1200, 1920), meta=np.ndarray>\n",
    -       "Attributes: (12/120)\n",
    -       "    TOF_free:                          0.022\n",
    -       "    abs_img_freq:                      110.858\n",
    -       "    absorption_imaging_flag:           True\n",
    -       "    backup_data:                       True\n",
    -       "    blink_off_time:                    0.001\n",
    -       "    blink_on_time:                     0.001\n",
    -       "    ...                                ...\n",
    -       "    z_offset:                          0.189\n",
    -       "    z_offset_img:                      0.189\n",
    -       "    compX_final_current:               [0.    0.002 0.004 0.006 0.008 0.01  0...\n",
    -       "    runs:                              [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 1...\n",
    -       "    scanAxis:                          ['compX_final_current' 'runs']\n",
    -       "    scanAxisLength:                    [33. 33.]
    " - ], - "text/plain": [ - "\n", - "Dimensions: (compX_final_current: 11, runs: 3, y: 1200, x: 1920)\n", - "Coordinates:\n", - " * compX_final_current (compX_final_current) float64 0.0 0.002 ... 0.018 0.02\n", - " * runs (runs) float64 0.0 1.0 2.0\n", - "Dimensions without coordinates: y, x\n", - "Data variables:\n", - " atoms (compX_final_current, runs, y, x) uint16 dask.array\n", - " background (compX_final_current, runs, y, x) uint16 dask.array\n", - " dark (compX_final_current, runs, y, x) uint16 dask.array\n", - " shotNum (compX_final_current, runs) \n", - "Attributes: (12/120)\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " backup_data: True\n", - " blink_off_time: 0.001\n", - " blink_on_time: 0.001\n", - " ... ...\n", - " z_offset: 0.189\n", - " z_offset_img: 0.189\n", - " compX_final_current: [0. 0.002 0.004 0.006 0.008 0.01 0...\n", - " runs: [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 1...\n", - " scanAxis: ['compX_final_current' 'runs']\n", - " scanAxisLength: [33. 33.]" - ] - }, - "execution_count": 62, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "dataSet" - ] - }, - { - "cell_type": "code", - "execution_count": 46, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "('compX_final_current', 'runs')" - ] - }, - "execution_count": 46, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "tuple(dataSet.scanAxis)" - ] - }, - { - "cell_type": "code", - "execution_count": 102, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
    \n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
    <xarray.Dataset>\n",
    -       "Dimensions:              (y: 1200, x: 1920, z: 33)\n",
    -       "Coordinates:\n",
    -       "  * z                    (z) object MultiIndex\n",
    -       "  * compX_final_current  (z) float64 0.0 0.0 0.0 0.002 ... 0.018 0.02 0.02 0.02\n",
    -       "  * runs                 (z) float64 0.0 1.0 2.0 0.0 1.0 ... 1.0 2.0 0.0 1.0 2.0\n",
    -       "Dimensions without coordinates: y, x\n",
    -       "Data variables:\n",
    -       "    atoms                (y, x, z) uint16 dask.array<chunksize=(1200, 1920, 27), meta=np.ndarray>\n",
    -       "    background           (y, x, z) uint16 dask.array<chunksize=(1200, 1920, 27), meta=np.ndarray>\n",
    -       "    dark                 (y, x, z) uint16 dask.array<chunksize=(1200, 1920, 27), meta=np.ndarray>\n",
    -       "    shotNum              (z) <U2 '00' '11' '22' '01' ... '31' '10' '21' '32'\n",
    -       "    OD                   (y, x, z) float64 dask.array<chunksize=(1200, 1920, 27), meta=np.ndarray>\n",
    -       "Attributes: (12/120)\n",
    -       "    TOF_free:                          0.022\n",
    -       "    abs_img_freq:                      110.858\n",
    -       "    absorption_imaging_flag:           True\n",
    -       "    backup_data:                       True\n",
    -       "    blink_off_time:                    0.001\n",
    -       "    blink_on_time:                     0.001\n",
    -       "    ...                                ...\n",
    -       "    z_offset:                          0.189\n",
    -       "    z_offset_img:                      0.189\n",
    -       "    compX_final_current:               [0.    0.002 0.004 0.006 0.008 0.01  0...\n",
    -       "    runs:                              [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 1...\n",
    -       "    scanAxis:                          ['compX_final_current' 'runs']\n",
    -       "    scanAxisLength:                    [33. 33.]
    " - ], - "text/plain": [ - "\n", - "Dimensions: (y: 1200, x: 1920, z: 33)\n", - "Coordinates:\n", - " * z (z) object MultiIndex\n", - " * compX_final_current (z) float64 0.0 0.0 0.0 0.002 ... 0.018 0.02 0.02 0.02\n", - " * runs (z) float64 0.0 1.0 2.0 0.0 1.0 ... 1.0 2.0 0.0 1.0 2.0\n", - "Dimensions without coordinates: y, x\n", - "Data variables:\n", - " atoms (y, x, z) uint16 dask.array\n", - " background (y, x, z) uint16 dask.array\n", - " dark (y, x, z) uint16 dask.array\n", - " shotNum (z) \n", - "Attributes: (12/120)\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " backup_data: True\n", - " blink_off_time: 0.001\n", - " blink_on_time: 0.001\n", - " ... ...\n", - " z_offset: 0.189\n", - " z_offset_img: 0.189\n", - " compX_final_current: [0. 0.002 0.004 0.006 0.008 0.01 0...\n", - " runs: [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 1...\n", - " scanAxis: ['compX_final_current' 'runs']\n", - " scanAxisLength: [33. 33.]" - ] - }, - "execution_count": 102, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "aaa" - ] - }, - { - "cell_type": "code", - "execution_count": 146, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['compX_final_current', 'runs']" - ] - }, - "execution_count": 146, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "list(scanAxis.astype(str))" - ] - }, - { - "cell_type": "code", - "execution_count": 148, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
    \n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
    <xarray.Dataset>\n",
    -       "Dimensions:              (compX_final_current: 11, runs: 3, y: 1200, x: 1920)\n",
    -       "Coordinates:\n",
    -       "  * compX_final_current  (compX_final_current) float64 0.0 0.002 ... 0.018 0.02\n",
    -       "  * runs                 (runs) float64 0.0 1.0 2.0\n",
    -       "Dimensions without coordinates: y, x\n",
    -       "Data variables:\n",
    -       "    atoms                (compX_final_current, runs, y, x) uint16 dask.array<chunksize=(9, 3, 1200, 1920), meta=np.ndarray>\n",
    -       "    background           (compX_final_current, runs, y, x) uint16 dask.array<chunksize=(9, 3, 1200, 1920), meta=np.ndarray>\n",
    -       "    dark                 (compX_final_current, runs, y, x) uint16 dask.array<chunksize=(9, 3, 1200, 1920), meta=np.ndarray>\n",
    -       "    shotNum              (compX_final_current, runs) <U2 '00' '11' ... '21' '32'\n",
    -       "    OD                   (compX_final_current, runs, y, x) float64 dask.array<chunksize=(9, 3, 1200, 1920), meta=np.ndarray>\n",
    -       "Attributes: (12/120)\n",
    -       "    TOF_free:                          0.022\n",
    -       "    abs_img_freq:                      110.858\n",
    -       "    absorption_imaging_flag:           True\n",
    -       "    backup_data:                       True\n",
    -       "    blink_off_time:                    0.001\n",
    -       "    blink_on_time:                     0.001\n",
    -       "    ...                                ...\n",
    -       "    z_offset:                          0.189\n",
    -       "    z_offset_img:                      0.189\n",
    -       "    compX_final_current:               [0.0, 0.002, 0.004, 0.006, 0.008, 0.01...\n",
    -       "    runs:                              [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0....\n",
    -       "    scanAxis:                          ['compX_final_current', 'runs']\n",
    -       "    scanAxisLength:                    [33.0, 33.0]
    " - ], - "text/plain": [ - "\n", - "Dimensions: (compX_final_current: 11, runs: 3, y: 1200, x: 1920)\n", - "Coordinates:\n", - " * compX_final_current (compX_final_current) float64 0.0 0.002 ... 0.018 0.02\n", - " * runs (runs) float64 0.0 1.0 2.0\n", - "Dimensions without coordinates: y, x\n", - "Data variables:\n", - " atoms (compX_final_current, runs, y, x) uint16 dask.array\n", - " background (compX_final_current, runs, y, x) uint16 dask.array\n", - " dark (compX_final_current, runs, y, x) uint16 dask.array\n", - " shotNum (compX_final_current, runs) \n", - "Attributes: (12/120)\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " backup_data: True\n", - " blink_off_time: 0.001\n", - " blink_on_time: 0.001\n", - " ... ...\n", - " z_offset: 0.189\n", - " z_offset_img: 0.189\n", - " compX_final_current: [0.0, 0.002, 0.004, 0.006, 0.008, 0.01...\n", - " runs: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0....\n", - " scanAxis: ['compX_final_current', 'runs']\n", - " scanAxisLength: [33.0, 33.0]" - ] - }, - "execution_count": 148, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "dataSet" - ] - }, - { - "cell_type": "code", - "execution_count": 147, - "metadata": {}, - "outputs": [ - { - "ename": "TypeError", - "evalue": "`group` must be an xarray.DataArray or the name of an xarray variable or dimension. Received ['compX_final_current', 'runs'] instead.", - "output_type": "error", - "traceback": [ - "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)", - "\u001b[1;32mf:\\Jianshun\\analyseScript\\testMongoDB.ipynb Cell 30\u001b[0m in \u001b[0;36m1\n\u001b[1;32m----> 1\u001b[0m rrr \u001b[39m=\u001b[39m dataSet\u001b[39m.\u001b[39;49mgroupby(\u001b[39mlist\u001b[39;49m(scanAxis))\n", - "File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\core\\dataset.py:8966\u001b[0m, in \u001b[0;36mDataset.groupby\u001b[1;34m(self, group, squeeze, restore_coord_dims)\u001b[0m\n\u001b[0;32m 8961\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mnot\u001b[39;00m \u001b[39misinstance\u001b[39m(squeeze, \u001b[39mbool\u001b[39m):\n\u001b[0;32m 8962\u001b[0m \u001b[39mraise\u001b[39;00m \u001b[39mTypeError\u001b[39;00m(\n\u001b[0;32m 8963\u001b[0m \u001b[39mf\u001b[39m\u001b[39m\"\u001b[39m\u001b[39m`squeeze` must be True or False, but \u001b[39m\u001b[39m{\u001b[39;00msqueeze\u001b[39m}\u001b[39;00m\u001b[39m was supplied\u001b[39m\u001b[39m\"\u001b[39m\n\u001b[0;32m 8964\u001b[0m )\n\u001b[1;32m-> 8966\u001b[0m \u001b[39mreturn\u001b[39;00m DatasetGroupBy(\n\u001b[0;32m 8967\u001b[0m \u001b[39mself\u001b[39;49m, group, squeeze\u001b[39m=\u001b[39;49msqueeze, restore_coord_dims\u001b[39m=\u001b[39;49mrestore_coord_dims\n\u001b[0;32m 8968\u001b[0m )\n", - "File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\core\\groupby.py:465\u001b[0m, in \u001b[0;36mGroupBy.__init__\u001b[1;34m(self, obj, group, squeeze, grouper, bins, restore_coord_dims, cut_kwargs)\u001b[0m\n\u001b[0;32m 463\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mnot\u001b[39;00m \u001b[39misinstance\u001b[39m(group, (DataArray, IndexVariable)):\n\u001b[0;32m 464\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mnot\u001b[39;00m hashable(group):\n\u001b[1;32m--> 465\u001b[0m \u001b[39mraise\u001b[39;00m \u001b[39mTypeError\u001b[39;00m(\n\u001b[0;32m 466\u001b[0m \u001b[39m\"\u001b[39m\u001b[39m`group` must be an xarray.DataArray or the \u001b[39m\u001b[39m\"\u001b[39m\n\u001b[0;32m 467\u001b[0m \u001b[39m\"\u001b[39m\u001b[39mname of an xarray variable or dimension. \u001b[39m\u001b[39m\"\u001b[39m\n\u001b[0;32m 468\u001b[0m \u001b[39mf\u001b[39m\u001b[39m\"\u001b[39m\u001b[39mReceived \u001b[39m\u001b[39m{\u001b[39;00mgroup\u001b[39m!r}\u001b[39;00m\u001b[39m instead.\u001b[39m\u001b[39m\"\u001b[39m\n\u001b[0;32m 469\u001b[0m )\n\u001b[0;32m 470\u001b[0m group \u001b[39m=\u001b[39m obj[group]\n\u001b[0;32m 471\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mlen\u001b[39m(group) \u001b[39m==\u001b[39m \u001b[39m0\u001b[39m:\n", - "\u001b[1;31mTypeError\u001b[0m: `group` must be an xarray.DataArray or the name of an xarray variable or dimension. Received ['compX_final_current', 'runs'] instead." - ] - } - ], - "source": [ - "rrr = dataSet.groupby(list(scanAxis))" - ] - }, - { - "cell_type": "code", - "execution_count": 135, - "metadata": {}, - "outputs": [], - "source": [ - "for i in rrr:\n", - " b = i" - ] - }, - { - "cell_type": "code", - "execution_count": 140, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "array(['compX_final_current', 'runs'], dtype='\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
    <xarray.Dataset>\n",
    -       "Dimensions:              (y: 1200, x: 1920)\n",
    -       "Coordinates:\n",
    -       "    z                    object (0.02, 2.0)\n",
    -       "    compX_final_current  float64 0.02\n",
    -       "    runs                 float64 2.0\n",
    -       "Dimensions without coordinates: y, x\n",
    -       "Data variables:\n",
    -       "    atoms                (y, x) uint16 dask.array<chunksize=(1200, 1920), meta=np.ndarray>\n",
    -       "    background           (y, x) uint16 dask.array<chunksize=(1200, 1920), meta=np.ndarray>\n",
    -       "    dark                 (y, x) uint16 dask.array<chunksize=(1200, 1920), meta=np.ndarray>\n",
    -       "    shotNum              <U2 '32'\n",
    -       "    OD                   (y, x) float64 dask.array<chunksize=(1200, 1920), meta=np.ndarray>\n",
    -       "Attributes: (12/120)\n",
    -       "    TOF_free:                          0.022\n",
    -       "    abs_img_freq:                      110.858\n",
    -       "    absorption_imaging_flag:           True\n",
    -       "    backup_data:                       True\n",
    -       "    blink_off_time:                    0.001\n",
    -       "    blink_on_time:                     0.001\n",
    -       "    ...                                ...\n",
    -       "    z_offset:                          0.189\n",
    -       "    z_offset_img:                      0.189\n",
    -       "    compX_final_current:               [0.    0.002 0.004 0.006 0.008 0.01  0...\n",
    -       "    runs:                              [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 1...\n",
    -       "    scanAxis:                          ['compX_final_current' 'runs']\n",
    -       "    scanAxisLength:                    [33. 33.]
    " - ], - "text/plain": [ - "\n", - "Dimensions: (y: 1200, x: 1920)\n", - "Coordinates:\n", - " z object (0.02, 2.0)\n", - " compX_final_current float64 0.02\n", - " runs float64 2.0\n", - "Dimensions without coordinates: y, x\n", - "Data variables:\n", - " atoms (y, x) uint16 dask.array\n", - " background (y, x) uint16 dask.array\n", - " dark (y, x) uint16 dask.array\n", - " shotNum \n", - "Attributes: (12/120)\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " backup_data: True\n", - " blink_off_time: 0.001\n", - " blink_on_time: 0.001\n", - " ... ...\n", - " z_offset: 0.189\n", - " z_offset_img: 0.189\n", - " compX_final_current: [0. 0.002 0.004 0.006 0.008 0.01 0...\n", - " runs: [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 1...\n", - " scanAxis: ['compX_final_current' 'runs']\n", - " scanAxisLength: [33. 33.]" - ] - }, - "execution_count": 139, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "b[1]" - ] - }, - { - "cell_type": "code", - "execution_count": 125, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
    \n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
    <xarray.DataArray 'shotNum' ()>\n",
    -       "array('32', dtype='<U2')\n",
    -       "Coordinates:\n",
    -       "    compX_final_current  float64 0.02\n",
    -       "    runs                 float64 2.0
    " - ], - "text/plain": [ - "\n", - "array('32', dtype='>> with dask.config.set(**{'array.slicing.split_large_chunks': False}):\n", - " ... array.reshape(shape)\n", - "\n", - "To avoid creating the large chunks, set the option\n", - " >>> with dask.config.set(**{'array.slicing.split_large_chunks': True}):\n", - " ... array.reshape(shape)Explictly passing ``limit`` to ``reshape`` will also silence this warning\n", - " >>> array.reshape(shape, limit='128 MiB')\n", - " result = result._stack_once(dims, new_dim)\n" - ] - } - ], - "source": [ - "aaa = dataSet.stack(z=tuple(dataSet.scanAxis))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "type(np.array([0]))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "name in dataSet.OD.attrs" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "list(dataSet.data_vars)" - ] - }, - { - "cell_type": "code", - "execution_count": 120, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['compX_final_current', 'runs']" - ] - }, - "execution_count": 120, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "list(dataSet.OD.coords)" - ] - }, - { - "cell_type": "code", - "execution_count": 185, + "execution_count": 22, + "metadata": {}, + "outputs": [], + "source": [ + "from DataContainer.MongoDB import MongoDB\n", + "\n", + "DB = MongoDB(mongoClient, mongoDB, date='2023/05/23')\n", + "\n", + "DB.create_global('0069', dataSet)\n", + "\n", + "DB.read_global_all('0069')\n", + "\n", + "DB.add_data('0069', dataSet_cropOD, engine='xarray')" + ] + }, + { + "cell_type": "code", + "execution_count": 20, "metadata": {}, "outputs": [ { @@ -5596,32 +1852,91 @@ " 'y_offset_img': 0,\n", " 'z_offset': 0.189,\n", " 'z_offset_img': 0.189,\n", - " 'compX_final_current': [],\n", - " 'scanAxis': ['compX_final_current'],\n", - " 'scanAxisLength': array([0.])}" + " 'compX_final_current': array([0. , 0.002, 0.004, 0.006, 0.008, 0.01 , 0.012, 0.014, 0.016,\n", + " 0.018, 0.02 , 0. , 0.002, 0.004, 0.006, 0.008, 0.01 , 0.012,\n", + " 0.014, 0.016, 0.018, 0.02 , 0. , 0.002, 0.004, 0.006, 0.008,\n", + " 0.01 , 0.012, 0.014, 0.016, 0.018, 0.02 ]),\n", + " 'runs': array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 1., 1., 1., 1., 1.,\n", + " 1., 1., 1., 1., 1., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.]),\n", + " 'scanAxis': ['compX_final_current', 'runs'],\n", + " 'scanAxisLength': array([33., 33.])}" ] }, - "execution_count": 185, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "from DataContainer.MongoDB import MongoDB\n", - "\n", - "DB = MongoDB(mongoClient, mongoDB, date='2023/05/23')\n", - "\n", "DB.read_global_all('0069')" ] }, { "cell_type": "code", - "execution_count": 182, + "execution_count": 27, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'OD': \n", + " array([[-0.16156055, -0.05236126, -0.06646893, ..., -0.00193041,\n", + " -0.04918329, -0.00193041],\n", + " [-0.05072057, 0.01406993, -0.00193041, ..., 0.04252135,\n", + " -0.03091795, 0.10034844],\n", + " [-0.069753 , -0.06862178, -0.12908558, ..., 0.04187221,\n", + " -0.00193041, -0.07390391],\n", + " ...,\n", + " [ 0.12868977, -0.02390931, -0.00193041, ..., 0.01487671,\n", + " 0.07562783, 0.10343011],\n", + " [ 0.09570806, 0.11247994, -0.04739278, ..., 0.01288468,\n", + " -0.04845042, 0.02981829],\n", + " [ 0.20392165, 0.07039025, -0.04955846, ..., 0.02792256,\n", + " -0.12976378, -0.03367911]])\n", + " Coordinates:\n", + " compX_final_current float64 0.002\n", + " runs float64 0.0\n", + " Dimensions without coordinates: y, x\n", + " Attributes:\n", + " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", + " IMAGE_VERSION: 1.2\n", + " IMAGE_WHITE_IS_ZERO: 0\n", + " x_start: 810\n", + " x_end: 1110\n", + " y_end: 1025\n", + " y_start: 725\n", + " x_center: 960\n", + " y_center: 875\n", + " x_span: 300\n", + " y_span: 300}" + ] + }, + "execution_count": 27, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "res = DB.load_data_single('0069', 1, field={'OD':None})\n", + "res" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from collections import OrderedDict\n", "\n", + "import numpy as np\n", "import pymongo\n", "import xarray_mongodb\n", "import bson\n", @@ -5687,6 +2002,15 @@ " 'month': self.month,\n", " 'day': self.day,\n", " 'shotNum': shotNum,\n", + " }\n", + "\n", + " self.mongoDB['global'].delete_many(data)\n", + " \n", + " data = {\n", + " 'year': self.year,\n", + " 'month': self.month,\n", + " 'day': self.day,\n", + " 'shotNum': shotNum,\n", " 'runNum': 0,\n", " 'global_parameters' : {},\n", " }\n", @@ -5712,6 +2036,11 @@ " )\n", " \n", " stackedDataArray = self._break_dataSet(dataSet)\n", + " try:\n", + " stackedDataArray.load()\n", + " except:\n", + " pass\n", + " \n", " stackedDataArray = stackedDataArray.groupby('_scanAxis')\n", " \n", " for i in stackedDataArray:\n", @@ -5754,7 +2083,7 @@ " \n", " self.mongoDB['global'].update_one(filter, {\"$set\": data}, upsert=False)\n", " \n", - " def _add_data_xarray_dataArray(self, shotNum, dataArray, scanAxis=None):\n", + " def _add_data_xarray_dataArray(self, shotNum, dataArray, name=None, scanAxis=None):\n", " \n", " if scanAxis is None:\n", " scanAxis = list(dataArray.coords)\n", @@ -5876,9 +2205,9 @@ " self._add_data_normal(shotNum=shotNum, runNum=runNum, data=data)\n", " elif engine == 'xarray':\n", " if isinstance(data, type(xr.Dataset())):\n", - " self._add_data_xarray_dataSet(shotNum=shotNum, data=data, name=name)\n", + " self._add_data_xarray_dataSet(shotNum=shotNum, dataSet=data, name=name)\n", " else:\n", - " self._add_data_xarray_dataArray(shotNum=shotNum, data=data, name=name)\n", + " self._add_data_xarray_dataArray(shotNum=shotNum, dataArray=data, name=name)\n", " elif engine == 'additional':\n", " self._add_data_additional(shotNum=shotNum, runNum=runNum, data=data, name=name)\n", " \n", @@ -5914,11 +2243,12 @@ " result = {}\n", " dropped_attrs = OrderedDict()\n", " \n", - " docs = self.mongoDB['global'].find(filter)\n", + " docs = self.mongoDB['global'].find(filter).sort('runNum')\n", + " docs = [doc['global_parameters'] for doc in docs]\n", " \n", " for doc in docs:\n", " \n", - " global_parameters = doc['global_parameters']\n", + " global_parameters = doc\n", " \n", " result.update(\n", " {\n", @@ -5943,7 +2273,7 @@ " \n", " for doc in docs:\n", " \n", - " global_parameters = doc['global_parameters']\n", + " global_parameters = doc\n", " \n", " dropped_attrs.update(\n", " {\n", @@ -5954,20 +2284,19 @@ " \n", " scan_attrs = OrderedDict()\n", " scan_length = []\n", + " \n", " for attrs_key in dropped_attrs.keys():\n", " flag = True\n", " for key in scan_attrs.keys():\n", " if equivalent(scan_attrs[key], dropped_attrs[attrs_key]):\n", " flag = False\n", - " \n", " result.update({attrs_key: key})\n", - "\n", " break\n", - " if flag:\n", - " scan_attrs.update({\n", - " attrs_key: dropped_attrs[attrs_key]\n", - " })\n", - " scan_length = np.append(scan_length, len(dropped_attrs[attrs_key]))\n", + " if flag:\n", + " scan_attrs.update({\n", + " attrs_key: dropped_attrs[attrs_key]\n", + " })\n", + " scan_length = np.append(scan_length, len(dropped_attrs[attrs_key]))\n", "\n", " result.update(\n", " {\n", @@ -6002,7 +2331,7 @@ " if field is None:\n", " field = globalDict\n", " \n", - " res = field\n", + " res = {}\n", " \n", " for key in field:\n", " if isinstance(globalDict[key], dict) and ('mongoID' in globalDict[key]):\n", @@ -6033,6 +2362,15 @@ "res" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "DB.add_data('0069', dataSet_cropOD, engine='xarray')" + ] + }, { "cell_type": "code", "execution_count": null, @@ -6047,1072 +2385,9 @@ }, { "cell_type": "code", - "execution_count": 161, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "array([[ 0.1152197 , -0.01741923, 0.09469807, ..., -0.06412552,\n", - " 0.06190824, 0.02570519],\n", - " [ 0.04898483, -0.05190541, 0.04817805, ..., -0.04506388,\n", - " -0.07363725, 0.05574082],\n", - " [-0.06730349, 0.01648232, -0.03138377, ..., 0.10636001,\n", - " -0.05618196, 0.04319051],\n", - " ...,\n", - " [-0.07122968, -0.07122968, -0.04409723, ..., -0.03570343,\n", - " -0.04940228, -0.05279787],\n", - " [-0.07293278, 0.09247831, 0.0459079 , ..., -0.09443087,\n", - " 0.13291928, 0.06498517],\n", - " [-0.18293367, 0.0419475 , -0.13718765, ..., -0.10924595,\n", - " -0.01459836, 0.14135815]])\n", - "Coordinates:\n", - " compX_final_current float64 0.0\n", - " runs float64 0.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[ 0.01548795, 0.03431875, -0.06531109, ..., -0.03202512,\n", - " 0.0142653 , -0.06976544],\n", - " [ 0.0659188 , -0.1299843 , -0.15734163, ..., 0.01404251,\n", - " -0.00077257, 0.0423996 ],\n", - " [-0.01703309, -0.04878179, -0.11660439, ..., 0.02908039,\n", - " -0.00077257, 0.02864131],\n", - " ...,\n", - " [ 0.16628151, -0.02376209, 0.16628151, ..., 0.03312898,\n", - " -0.09314589, 0.01473161],\n", - " [ 0.11985542, 0.19028266, 0.02392004, ..., -0.07833081,\n", - " -0.04522434, 0.03201725],\n", - " [-0.00077257, 0.09019921, -0.00077257, ..., -0.06636986,\n", - " -0.00077257, 0.04367919]])\n", - "Coordinates:\n", - " compX_final_current float64 0.0\n", - " runs float64 1.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[ 0.2166106 , -0.06159272, -0.00653295, ..., -0.05454217,\n", - " 0.0247196 , 0.03543125],\n", - " [ 0.1175197 , -0.03879381, 0.00999635, ..., -0.03730461,\n", - " 0.08307921, 0.11669969],\n", - " [ 0.07615877, -0.10661641, -0.02253329, ..., -0.1278938 ,\n", - " -0.11932844, 0.1130122 ],\n", - " ...,\n", - " [-0.05305296, -0.17560928, 0.06245992, ..., -0.02306225,\n", - " -0.0222813 , 0.04306399],\n", - " [-0.00653295, -0.00653295, -0.13715313, ..., -0.02253329,\n", - " -0.06809084, -0.00653295],\n", - " [-0.00653295, 0.01699755, 0.18067859, ..., 0.08443883,\n", - " -0.03470382, 0.01056149]])\n", - "Coordinates:\n", - " compX_final_current float64 0.0\n", - " runs float64 2.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[-0.16156055, -0.05236126, -0.06646893, ..., -0.00193041,\n", - " -0.04918329, -0.00193041],\n", - " [-0.05072057, 0.01406993, -0.00193041, ..., 0.04252135,\n", - " -0.03091795, 0.10034844],\n", - " [-0.069753 , -0.06862178, -0.12908558, ..., 0.04187221,\n", - " -0.00193041, -0.07390391],\n", - " ...,\n", - " [ 0.12868977, -0.02390931, -0.00193041, ..., 0.01487671,\n", - " 0.07562783, 0.10343011],\n", - " [ 0.09570806, 0.11247994, -0.04739278, ..., 0.01288468,\n", - " -0.04845042, 0.02981829],\n", - " [ 0.20392165, 0.07039025, -0.04955846, ..., 0.02792256,\n", - " -0.12976378, -0.03367911]])\n", - "Coordinates:\n", - " compX_final_current float64 0.002\n", - " runs float64 0.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[ 0.14410312, -0.06251112, -0.04662808, ..., 0.05160218,\n", - " -0.05323749, 0.02027507],\n", - " [-0.08882843, -0.12485426, 0.06620098, ..., 0.06999515,\n", - " -0.1130634 , 0.00648175],\n", - " [ 0.14463209, -0.01032537, -0.00977877, ..., -0.05603861,\n", - " -0.03732088, -0.03863869],\n", - " ...,\n", - " [-0.11130129, 0.00648175, 0.05194412, ..., -0.02630808,\n", - " 0.00648175, 0.07794071],\n", - " [ 0.0305793 , -0.07147979, 0.02947126, ..., -0.02630808,\n", - " 0.02087048, -0.05805677],\n", - " [ 0.07709931, 0.07392303, -0.21124174, ..., -0.20227307,\n", - " -0.05414288, 0.0222301 ]])\n", - "Coordinates:\n", - " compX_final_current float64 0.002\n", - " runs float64 1.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[ 0.03213286, -0.14123891, 0.0481332 , ..., -0.05195025,\n", - " -0.05195025, -0.04510872],\n", - " [-0.00065696, -0.03455851, -0.00065696, ..., 0.0316039 ,\n", - " -0.01640532, -0.06317732],\n", - " [ 0.08789644, 0.08203476, -0.03291782, ..., 0.0316039 ,\n", - " -0.06128158, -0.00065696],\n", - " ...,\n", - " [ 0.02466085, -0.06964983, -0.00065696, ..., 0.05152879,\n", - " 0.03059558, -0.08766834],\n", - " [-0.05330069, 0.02466085, -0.18297852, ..., 0.07690127,\n", - " 0.07571602, 0.03382922],\n", - " [-0.00065696, -0.09829543, -0.10074042, ..., -0.01691748,\n", - " 0.05650145, 0.05543251]])\n", - "Coordinates:\n", - " compX_final_current float64 0.002\n", - " runs float64 2.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[ 0.02905711, -0.00269159, -0.01895211, ..., 0.04382842,\n", - " -0.05148176, -0.17530434],\n", - " [-0.00269159, 0.09739187, -0.11303965, ..., 0.05982876,\n", - " -0.01772947, 0.03986802],\n", - " [-0.00269159, 0.06290569, 0.04609857, ..., -0.09506491,\n", - " -0.00269159, -0.04649422],\n", - " ...,\n", - " [-0.05270201, -0.04921161, -0.13926713, ..., -0.05312245,\n", - " -0.06331621, 0.03179458],\n", - " [-0.07013287, -0.05270201, -0.04815397, ..., -0.15172717,\n", - " -0.03254456, -0.01869193],\n", - " [-0.21400069, -0.09366337, 0.02262622, ..., 0.04176017,\n", - " -0.04781203, 0.03064483]])\n", - "Coordinates:\n", - " compX_final_current float64 0.004\n", - " runs float64 0.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[ 0.04431942, -0.00293347, -0.01843765, ..., 0.04507575,\n", - " -0.06747199, -0.00293347],\n", - " [ 0.01306687, 0.02985636, -0.00293347, ..., -0.06177397,\n", - " 0.0293274 , -0.06177397],\n", - " [ 0.01416097, 0.09550661, -0.05604329, ..., -0.01691971,\n", - " -0.0480539 , -0.01893381],\n", - " ...,\n", - " [-0.05294389, 0.0676841 , 0.01768582, ..., -0.05094269,\n", - " 0.01281489, -0.00293347],\n", - " [-0.02890895, -0.02762608, -0.04738523, ..., 0.06375791,\n", - " 0.08667869, -0.06644687],\n", - " [ 0.15121721, 0.06450781, -0.11114705, ..., 0.01306687,\n", - " -0.1207165 , 0.06160505]])\n", - "Coordinates:\n", - " compX_final_current float64 0.004\n", - " runs float64 1.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[-0.10342511, 0.02549931, -0.02464423, ..., 0.02578662,\n", - " 0.05670141, 0.04951418],\n", - " [ 0.00869219, 0.05748235, 0.07538356, ..., 0.0552122 ,\n", - " -0.00730815, -0.02409764],\n", - " [ 0.02671069, 0.05594507, 0.02522149, ..., -0.07831919,\n", - " -0.00634569, 0.05594507],\n", - " ...,\n", - " [-0.12136094, 0.10400237, -0.03575958, ..., 0.04259374,\n", - " -0.05482122, 0.14927414],\n", - " [ 0.00869219, 0.03401 , 0.15897439, ..., 0.00869219,\n", - " -0.12288417, -0.05482122],\n", - " [ 0.07613347, 0.00869219, 0.00869219, ..., 0.08747306,\n", - " -0.03447998, -0.0385607 ]])\n", - "Coordinates:\n", - " compX_final_current float64 0.004\n", - " runs float64 2.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[-1.26369915e-01, -5.13694843e-02, 1.12041108e-01, ...,\n", - " -7.61899375e-05, 1.41894071e-01, -5.72346038e-02],\n", - " [ 3.32602303e-02, -1.35877731e-01, -1.12193488e-01, ...,\n", - " 1.65716065e-01, 7.62967888e-02, -1.58245469e-02],\n", - " [-8.86295873e-02, -3.57942725e-02, 3.50151299e-02, ...,\n", - " 9.22971302e-02, 2.89113469e-02, -1.53436621e-02],\n", - " ...,\n", - " [ 1.86509766e-01, -1.95820767e-01, -9.77146595e-02, ...,\n", - " -5.05070436e-02, -9.38949452e-02, -7.61899375e-05],\n", - " [-1.23690146e-01, -1.05436706e-01, -4.77042389e-02, ...,\n", - " -1.55803765e-02, -1.02355039e-01, -1.05436706e-01],\n", - " [ 1.23537766e-01, -4.55385640e-02, -7.61899375e-05, ...,\n", - " 1.08557651e-01, -8.96883486e-02, -7.61899375e-05]])\n", - "Coordinates:\n", - " compX_final_current float64 0.006\n", - " runs float64 0.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[ 0.06218603, 0.01474194, -0.03683867, ..., -0.09766267,\n", - " 0.09773097, -0.21291726],\n", - " [-0.00235249, -0.01835283, 0.07287093, ..., -0.05194943,\n", - " -0.11818431, 0.01291498],\n", - " [ 0.01339587, 0.08173063, 0.01445463, ..., -0.04816203,\n", - " -0.00235249, 0.02890005],\n", - " ...,\n", - " [ 0.06664038, -0.07467315, 0.04416753, ..., -0.01944692,\n", - " -0.13368849, -0.05453824],\n", - " [-0.08031403, 0.14074835, 0.02296532, ..., 0.02939621,\n", - " -0.00235249, -0.06487285],\n", - " [ 0.02296532, 0.06664038, 0.02296532, ..., -0.03568891,\n", - " -0.01695129, -0.00235249]])\n", - "Coordinates:\n", - " compX_final_current float64 0.006\n", - " runs float64 1.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[-0.01090789, 0.02188193, -0.09281866, ..., 0.09114358,\n", - " 0.06814177, 0.07558 ],\n", - " [-0.04397553, -0.01090789, 0.03841123, ..., -0.14391032,\n", - " 0.03639307, 0.05521835],\n", - " [ 0.05691471, -0.01147302, 0.05441158, ..., 0.00562141,\n", - " -0.03883035, -0.05500321],\n", - " ...,\n", - " [ 0.02915191, -0.0378637 , 0.12069074, ..., -0.06220119,\n", - " -0.01063911, -0.01177033],\n", - " [ 0.05324946, 0.05826514, 0.15590361, ..., -0.02515025,\n", - " -0.06635209, -0.04480944],\n", - " [-0.12790998, -0.09446205, 0.00562141, ..., 0.03419478,\n", - " 0.01980605, 0.15977209]])\n", - "Coordinates:\n", - " compX_final_current float64 0.006\n", - " runs float64 2.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[-0.13409807, -0.12750826, -0.07964216, ..., 0.16334483,\n", - " -0.01404488, 0.05366321],\n", - " [ 0.18075171, -0.0936067 , 0.03247513, ..., -0.03108635,\n", - " -0.0133344 , -0.04209915],\n", - " [ 0.00170348, -0.10007922, 0.06521688, ..., 0.12493612,\n", - " 0.01609221, -0.09211528],\n", - " ...,\n", - " [ 0.17995171, 0.12233146, 0.04822349, ..., 0.00170348,\n", - " 0.03295602, 0.16422241],\n", - " [-0.02496477, -0.07061719, -0.01980273, ..., -0.03055739,\n", - " -0.04274829, 0.01770382],\n", - " [ 0.07069635, 0.11948651, 0.14830695, ..., 0.01651856,\n", - " -0.02860187, -0.12152916]])\n", - "Coordinates:\n", - " compX_final_current float64 0.008\n", - " runs float64 0.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[-0.0619665 , 0.07371775, -0.0274598 , ..., 0.00702638,\n", - " -0.11075666, -0.07753101],\n", - " [-0.00978074, -0.01006806, 0.02253056, ..., -0.05751214,\n", - " 0.1139985 , 0.1139985 ],\n", - " [-0.00950293, -0.05648703, -0.00847781, ..., 0.02302672,\n", - " -0.079985 , 0.02229385],\n", - " ...,\n", - " [ 0.03055687, 0.03055687, -0.01359291, ..., 0.0421177 ,\n", - " -0.11075666, -0.11075666],\n", - " [-0.1395771 , -0.0882838 , -0.04060167, ..., 0.0232869 ,\n", - " -0.03435884, -0.05359825],\n", - " [ 0.16525038, 0.02949923, -0.07521172, ..., 0.00702638,\n", - " 0.02229385, 0.06858427]])\n", - "Coordinates:\n", - " compX_final_current float64 0.008\n", - " runs float64 1.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[ 0.04801859, 0.13025669, -0.03410799, ..., 0.07927113,\n", - " 0.06274183, 0.07927113],\n", - " [-0.01730088, -0.03467313, -0.00077157, ..., -0.00077157,\n", - " 0.0144959 , -0.00077157],\n", - " [ 0.15579749, -0.05206487, -0.04878079, ..., -0.00077157,\n", - " 0.09720884, 0.01497678],\n", - " ...,\n", - " [ 0.23690008, -0.06821285, 0.06984599, ..., -0.01847115,\n", - " -0.04878079, 0.01603554],\n", - " [ 0.04923885, -0.02608938, 0.1458319 , ..., 0.11902963,\n", - " 0.04005042, 0.01522877],\n", - " [ 0.09931189, 0.02332598, 0.02454623, ..., -0.12031672,\n", - " -0.01475782, -0.05120243]])\n", - "Coordinates:\n", - " compX_final_current float64 0.008\n", - " runs float64 2.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[ 6.68550437e-02, 6.91565407e-02, 3.35000895e-02, ...,\n", - " 1.63669237e-04, 1.63669237e-04, 5.81509269e-02],\n", - " [-5.20220839e-02, -1.05196846e-01, -4.49567660e-02, ...,\n", - " -1.66434491e-02, 1.49787550e-02, 9.39824245e-02],\n", - " [-1.40418281e-01, -3.20971930e-02, -9.82764036e-02, ...,\n", - " -7.98790384e-02, -2.84097032e-02, 1.66929712e-02],\n", - " ...,\n", - " [ 2.42612208e-02, 1.63669237e-04, -4.52987048e-02, ...,\n", - " -3.55544134e-02, -9.82764036e-02, 1.63669237e-04],\n", - " [ 1.63669237e-04, 2.72097385e-01, 6.76049500e-02, ...,\n", - " 8.02063769e-02, 1.47624687e-02, 9.54738490e-02],\n", - " [ 2.75626434e-02, -8.68477078e-02, 1.20791657e-01, ...,\n", - " 3.14162127e-02, -1.36296529e-02, -6.04609526e-02]])\n", - "Coordinates:\n", - " compX_final_current float64 0.01\n", - " runs float64 0.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[-0.03381881, 0.05760861, 0.03588525, ..., -0.07382415,\n", - " -0.01319952, -0.0116358 ],\n", - " [ 0.08389447, -0.10099185, 0.11466613, ..., -0.07623204,\n", - " 0.00254883, -0.02775652],\n", - " [-0.03381881, -0.04546039, -0.04470405, ..., 0.04980172,\n", - " -0.02775652, -0.04397118],\n", - " ...,\n", - " [-0.01992402, -0.06340913, 0.04510845, ..., -0.0158003 ,\n", - " -0.02870371, 0.01994058],\n", - " [ 0.02664639, -0.02342665, -0.09054159, ..., -0.05900906,\n", - " 0.03153637, -0.01345151],\n", - " [ 0.00254883, -0.02044068, 0.02664639, ..., 0.00254883,\n", - " -0.0264387 , -0.07382415]])\n", - "Coordinates:\n", - " compX_final_current float64 0.01\n", - " runs float64 1.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[-0.00999835, 0.07798992, 0.00653095, ..., -0.08048042,\n", - " 0.00653095, 0.03470183],\n", - " [-0.06129164, -0.02795522, 0.00653095, ..., -0.00972957,\n", - " -0.23578251, -0.18452428],\n", - " [ 0.13282468, 0.03986737, -0.05906633, ..., 0.04909057,\n", - " -0.1038171 , -0.0559894 ],\n", - " ...,\n", - " [-0.14007252, 0.00653095, -0.08655947, ..., 0.05696181,\n", - " -0.0872878 , 0.04101713],\n", - " [-0.04225921, -0.13656989, -0.02086802, ..., 0.00653095,\n", - " -0.03858948, 0.02279147],\n", - " [ 0.03250644, -0.15473719, 0.05532112, ..., 0.00653095,\n", - " -0.00785778, -0.05800757]])\n", - "Coordinates:\n", - " compX_final_current float64 0.01\n", - " runs float64 2.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[-0.12579189, -0.09656225, -0.02327633, ..., -0.10809231,\n", - " -0.02375721, 0.00523637],\n", - " [ 0.04328444, 0.00852045, -0.10038217, ..., -0.10881355,\n", - " 0.05171038, 0.06721457],\n", - " [ 0.12332715, -0.06019461, -0.07360614, ..., 0.113352 ,\n", - " -0.1511097 , 0.09426999],\n", - " ...,\n", - " [ 0.01552164, 0.014464 , 0.2734036 , ..., -0.12579189,\n", - " -0.05679902, 0.13770296],\n", - " [-0.10331903, 0.0160887 , -0.02998776, ..., -0.04026972,\n", - " -0.00800885, 0.02425201],\n", - " [ 0.06431181, -0.25313131, -0.00800885, ..., -0.0240092 ,\n", - " -0.03540783, -0.07254738]])\n", - "Coordinates:\n", - " compX_final_current float64 0.012\n", - " runs float64 0.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[-0.08772671, 0.02593261, 0.02411277, ..., 0.05559269,\n", - " -0.08478985, -0.09469538],\n", - " [-0.10824835, 0.0246779 , 0.02384399, ..., -0.02416523,\n", - " -0.07245924, -0.091789 ],\n", - " [-0.02575295, 0.02358381, 0.05559269, ..., -0.02318819,\n", - " -0.15574159, 0.08169144],\n", - " ...,\n", - " [ 0.03005633, 0.03005633, 0.09274128, ..., -0.02690271,\n", - " 0.02384399, -0.02813461],\n", - " [ 0.03168102, 0.09459485, -0.0665245 , ..., -0.00951096,\n", - " 0.02176811, -0.06997476],\n", - " [-0.0665245 , -0.0378789 , 0.08356938, ..., -0.03822607,\n", - " 0.03699736, -0.10276459]])\n", - "Coordinates:\n", - " compX_final_current float64 0.012\n", - " runs float64 1.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[ 0.06432596, -0.0058783 , 0.04213092, ..., -0.0058783 ,\n", - " -0.08857001, -0.0058783 ],\n", - " [-0.03921472, 0.045415 , 0.14072518, ..., -0.08996141,\n", - " 0.10109382, 0.04137459],\n", - " [ 0.06311458, -0.04291957, -0.02187864, ..., 0.04064172,\n", - " 0.00791503, -0.02114577],\n", - " ...,\n", - " [-0.10351677, 0.06473927, 0.01821926, ..., 0.03048935,\n", - " 0.01121614, 0.02921302],\n", - " [ 0.045415 , -0.05466846, 0.15175065, ..., -0.02114577,\n", - " -0.03664996, -0.02213882],\n", - " [-0.0058783 , 0.28892124, -0.14897914, ..., -0.0058783 ,\n", - " -0.07041682, 0.07546734]])\n", - "Coordinates:\n", - " compX_final_current float64 0.012\n", - " runs float64 2.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[-0.07624171, 0.05971131, 0.07487774, ..., 0.0588774 ,\n", - " -0.00622373, 0.0232667 ],\n", - " [-0.090803 , 0.07487774, -0.0351713 , ..., 0.08683869,\n", - " -0.00575742, -0.06269304],\n", - " [ 0.07381898, 0.00928046, -0.07341126, ..., 0.06726772,\n", - " 0.038268 , -0.10850258],\n", - " ...,\n", - " [ 0.05690851, -0.1143335 , -0.05525806, ..., -0.04201284,\n", - " 0.02387926, 0.12706349],\n", - " [-0.01970708, -0.01541215, 0.03175331, ..., -0.07341126,\n", - " -0.04787796, 0.05440089],\n", - " [ 0.19586641, -0.03834759, -0.13048148, ..., -0.00598701,\n", - " -0.0487068 , -0.00698006]])\n", - "Coordinates:\n", - " compX_final_current float64 0.014\n", - " runs float64 0.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[-0.0579705 , -0.04087607, 0.04205729, ..., 0.02472121,\n", - " -0.0579705 , -0.07704595],\n", - " [ 0.14452241, -0.00753965, 0.02446923, ..., -0.0653871 ,\n", - " -0.00727947, -0.00727947],\n", - " [ 0.02611261, 0.06001416, -0.11108033, ..., 0.05673009,\n", - " 0.06934549, -0.12481052],\n", - " ...,\n", - " [-0.10906217, -0.01537668, 0.00872087, ..., -0.06148339,\n", - " -0.03853201, -0.00808625],\n", - " [ 0.15532434, -0.0889176 , -0.15635888, ..., -0.11843431,\n", - " -0.00609422, 0.12455269],\n", - " [ 0.08282884, 0.11872177, -0.11803084, ..., 0.05673009,\n", - " 0.08282884, 0.02472121]])\n", - "Coordinates:\n", - " compX_final_current float64 0.014\n", - " runs float64 1.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[ 0.05689172, 0.1366028 , 0.05487355, ..., -0.14344835,\n", - " 0.12156493, 0.15940728],\n", - " [-0.04213298, -0.0076468 , 0.0723959 , ..., 0.03816273,\n", - " -0.02339516, 0.00810155],\n", - " [ 0.06255745, 0.03887321, -0.02503855, ..., 0.00810155,\n", - " 0.02265855, -0.05489969],\n", - " ...,\n", - " [ 0.03998125, -0.10295698, -0.0076468 , ..., 0.08250429,\n", - " 0.08617195, -0.0076468 ],\n", - " [-0.12827479, 0.09500735, -0.03174436, ..., -0.07218533,\n", - " 0.02013276, 0.02568962],\n", - " [ 0.01832868, 0.03998125, 0.09771371, ..., -0.05807766,\n", - " 0.02312485, 0.05904457]])\n", - "Coordinates:\n", - " compX_final_current float64 0.014\n", - " runs float64 2.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[-0.04668283, 0.15194969, 0.050167 , ..., 0.03466281,\n", - " -0.06377726, 0.05926705],\n", - " [-0.0797776 , 0.00291411, 0.00291411, ..., -0.07712859,\n", - " 0.08629572, -0.06268317],\n", - " [ 0.01944342, -0.01389301, -0.09239607, ..., -0.0436059 ,\n", - " 0.13259194, 0.0177292 ],\n", - " ...,\n", - " [ 0.0288896 , -0.06607876, -0.13061728, ..., 0.05797389,\n", - " 0.00291411, 0.12271531],\n", - " [ 0.08295682, 0.02644461, 0.0918616 , ..., -0.09393571,\n", - " 0.08992549, -0.01283424],\n", - " [-0.1024464 , -0.08409726, -0.07307179, ..., 0.01891445,\n", - " -0.01168469, 0.00291411]])\n", - "Coordinates:\n", - " compX_final_current float64 0.016\n", - " runs float64 0.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[-0.05523765, 0.04439219, 0.09199259, ..., 0.05582089,\n", - " 0.00930087, 0.03747175],\n", - " [-0.15234048, 0.02639531, 0.06059417, ..., 0.04055342,\n", - " -0.00620331, -0.05132375],\n", - " [ 0.00930087, -0.02403555, -0.06592255, ..., 0.07085877,\n", - " 0.08232601, 0.00930087],\n", - " ...,\n", - " [-0.01368865, -0.07964661, 0.07829374, ..., 0.05973173,\n", - " -0.02147079, -0.02295999],\n", - " [ 0.00930087, 0.03669985, 0.17056902, ..., 0.02504923,\n", - " 0.12884602, 0.06902011],\n", - " [-0.07074183, 0.07991844, -0.01479668, ..., 0.04007253,\n", - " 0.17023124, -0.05421253]])\n", - "Coordinates:\n", - " compX_final_current float64 0.016\n", - " runs float64 1.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[-0.05843604, 0.06431622, 0.14440715, ..., 0.04164742,\n", - " -0.02394987, 0.00745605],\n", - " [-0.07383412, -0.04223407, 0.00966437, ..., -0.14476413,\n", - " -0.00714275, 0.09821777],\n", - " [-0.00714275, 0.02564708, -0.10558282, ..., 0.08246941,\n", - " -0.03531362, 0.00704189],\n", - " ...,\n", - " [-0.0547708 , -0.00714275, 0.03634236, ..., -0.02394987,\n", - " -0.00714275, 0.07694037],\n", - " [-0.05593291, 0.06884316, -0.00714275, ..., -0.03839529,\n", - " -0.03613028, -0.02394987],\n", - " [ 0.07509535, -0.03013227, -0.03381099, ..., -0.06870064,\n", - " -0.1094216 , 0.07837943]])\n", - "Coordinates:\n", - " compX_final_current float64 0.016\n", - " runs float64 2.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[ 0.02919774, 0.0298245 , 0.02585512, ..., 0.05761982,\n", - " 0.13386836, -0.00589358],\n", - " [-0.0885853 , 0.12763781, -0.06745148, ..., 0.08239902,\n", - " -0.08000156, 0.08371858],\n", - " [ 0.01120085, 0.02585512, 0.01010676, ..., 0.05473104,\n", - " 0.0850782 , 0.13172779],\n", - " ...,\n", - " [ 0.06309929, -0.02836644, -0.09484107, ..., -0.11313911,\n", - " 0.00985477, -0.05718688],\n", - " [-0.10120376, -0.0305862 , -0.10597704, ..., -0.08226656,\n", - " -0.07684532, -0.0539028 ],\n", - " [-0.13264529, -0.14246912, -0.10854774, ..., -0.00589358,\n", - " 0.06821439, -0.11624164]])\n", - "Coordinates:\n", - " compX_final_current float64 0.018\n", - " runs float64 0.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[-0.05281059, -0.1782704 , 0.05268004, ..., -0.06797702,\n", - " 0.06113367, -0.00237974],\n", - " [ 0.06431164, 0.01531984, -0.08507145, ..., 0.03041009,\n", - " 0.13524164, -0.03315139],\n", - " [-0.03686591, -0.01864026, -0.06797702, ..., -0.00237974,\n", - " 0.02792561, 0.0751785 ],\n", - " ...,\n", - " [ 0.04641043, 0.02115076, -0.02591023, ..., 0.03210644,\n", - " 0.10298078, 0.05268004],\n", - " [ 0.14072111, -0.10246319, -0.02647729, ..., -0.08242244,\n", - " 0.08463164, -0.05197668],\n", - " [ 0.08217765, 0.04763068, 0.20347232, ..., -0.05197668,\n", - " 0.0573395 , -0.03571616]])\n", - "Coordinates:\n", - " compX_final_current float64 0.018\n", - " runs float64 1.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[-0.17990667, 0.05132731, 0.01540208, ..., 0.03089026,\n", - " -0.00085844, -0.03027233],\n", - " [-0.00085844, -0.05045538, 0.0151419 , ..., -0.04597888,\n", - " -0.00085844, 0.1901968 ],\n", - " [ 0.03485964, 0.03089026, 0.15598403, ..., 0.10450208,\n", - " -0.00085844, 0.01440903],\n", - " ...,\n", - " [-0.20152914, 0.09678003, 0.1389035 , ..., 0.08615294,\n", - " -0.05128929, 0.03247798],\n", - " [ 0.04915198, 0.12275552, 0.06813443, ..., 0.07918427,\n", - " -0.08662526, 0.09922502],\n", - " [ 0.02383417, 0.07146222, 0.1422424 , ..., 0.05886079,\n", - " -0.21057897, -0.0496486 ]])\n", - "Coordinates:\n", - " compX_final_current float64 0.018\n", - " runs float64 2.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[ 0.01130851, 0.06381319, -0.06990448, ..., -0.00639107,\n", - " 0.03741155, 0.02177981],\n", - " [ 0.1504514 , -0.06990448, -0.02319819, ..., -0.00639107,\n", - " 0.02346189, -0.08161449],\n", - " [ 0.02932701, 0.02694535, 0.09369239, ..., 0.02302281,\n", - " 0.1096811 , -0.02142895],\n", - " ...,\n", - " [ 0.01659845, 0.10608691, 0.05814745, ..., 0.06381319,\n", - " -0.06794896, -0.00639107],\n", - " [ 0.07157047, 0.11423692, -0.05185345, ..., -0.02213943,\n", - " -0.09600323, 0.05423355],\n", - " [ 0.0677169 , -0.02992157, -0.05185345, ..., 0.05423355,\n", - " -0.06354949, -0.05220061]])\n", - "Coordinates:\n", - " compX_final_current float64 0.02\n", - " runs float64 0.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[-0.0577009 , 0.00683762, 0.05643456, ..., -0.0577009 ,\n", - " 0.10527769, 0.02044327],\n", - " [-0.0259522 , -0.06462134, 0.00683762, ..., -0.04195254,\n", - " 0.05195806, 0.06839551],\n", - " [ 0.02364474, 0.07466022, 0.03858632, ..., 0.05643456,\n", - " 0.03669058, 0.10621009],\n", - " ...,\n", - " [ 0.10447609, 0.00683762, 0.17591395, ..., -0.12669377,\n", - " 0.02364474, -0.0472296 ],\n", - " [ 0.03350587, 0.05813091, -0.0396824 , ..., 0.12638277,\n", - " 0.00683762, 0.10527769],\n", - " [-0.01983063, 0.05684804, 0.03153023, ..., -0.02441492,\n", - " -0.08413416, -0.02542324]])\n", - "Coordinates:\n", - " compX_final_current float64 0.02\n", - " runs float64 1.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n", - "\n", - "array([[ 0.04603954, 0.01094822, -0.00614622, ..., -0.07760518,\n", - " -0.02080048, 0.02533695],\n", - " [ 0.05895744, 0.04731586, -0.05464907, ..., -0.05687438,\n", - " -0.0223882 , -0.00505212],\n", - " [-0.02295334, -0.0058589 , 0.06054516, ..., 0.02598609,\n", - " 0.05606865, -0.02131265],\n", - " ...,\n", - " [ 0.1062584 , -0.08669025, 0.07690618, ..., -0.09259246,\n", - " 0.07250611, 0.08505619],\n", - " [ 0.0369237 , 0.06359195, -0.06503769, ..., -0.11041264,\n", - " 0.10191999, 0.06054516],\n", - " [ 0.01094822, 0.14100134, 0.14814934, ..., -0.02030433,\n", - " -0.0462102 , -0.04034508]])\n", - "Coordinates:\n", - " compX_final_current float64 0.02\n", - " runs float64 2.0\n", - "Dimensions without coordinates: y, x\n", - "Attributes: (12/131)\n", - " IMAGE_SUBCLASS: IMAGE_GRAYSCALE\n", - " IMAGE_VERSION: 1.2\n", - " IMAGE_WHITE_IS_ZERO: 0\n", - " TOF_free: 0.022\n", - " abs_img_freq: 110.858\n", - " absorption_imaging_flag: True\n", - " ... ...\n", - " y_end: 1025\n", - " y_start: 725\n", - " x_center: 960\n", - " y_center: 875\n", - " x_span: 300\n", - " y_span: 300\n" - ] - } - ], + "outputs": [], "source": [ "DB._add_data_xarray_dataArray(shotNum, dataSet_cropOD)" ] @@ -7139,37 +2414,9 @@ }, { "cell_type": "code", - "execution_count": 164, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "atoms\n", - "background\n", - "dark\n", - "shotNum\n", - "OD\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "C:\\Users\\data\\AppData\\Roaming\\Python\\Python39\\site-packages\\xarray\\core\\variable.py:1745: PerformanceWarning: Reshaping is producing a large chunk. To accept the large\n", - "chunk and silence this warning, set the option\n", - " >>> with dask.config.set(**{'array.slicing.split_large_chunks': False}):\n", - " ... array.reshape(shape)\n", - "\n", - "To avoid creating the large chunks, set the option\n", - " >>> with dask.config.set(**{'array.slicing.split_large_chunks': True}):\n", - " ... array.reshape(shape)Explictly passing ``limit`` to ``reshape`` will also silence this warning\n", - " >>> array.reshape(shape, limit='128 MiB')\n", - " result = result._stack_once(dims, new_dim)\n" - ] - } - ], + "outputs": [], "source": [ "DB._add_data_xarray_dataSet(shotNum, dataSet, 'aaa')" ] @@ -7185,7 +2432,7 @@ }, { "cell_type": "code", - "execution_count": 156, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -7194,7 +2441,7 @@ }, { "cell_type": "code", - "execution_count": 183, + "execution_count": 28, "metadata": {}, "outputs": [ { @@ -7316,12 +2563,17 @@ " 'y_offset_img': 0,\n", " 'z_offset': 0.189,\n", " 'z_offset_img': 0.189,\n", - " 'compX_final_current': [],\n", - " 'scanAxis': ['compX_final_current'],\n", - " 'scanAxisLength': array([0.])}" + " 'compX_final_current': array([0. , 0.002, 0.004, 0.006, 0.008, 0.01 , 0.012, 0.014, 0.016,\n", + " 0.018, 0.02 , 0. , 0.002, 0.004, 0.006, 0.008, 0.01 , 0.012,\n", + " 0.014, 0.016, 0.018, 0.02 , 0. , 0.002, 0.004, 0.006, 0.008,\n", + " 0.01 , 0.012, 0.014, 0.016, 0.018, 0.02 ]),\n", + " 'runs': array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 1., 1., 1., 1., 1.,\n", + " 1., 1., 1., 1., 1., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.]),\n", + " 'scanAxis': ['compX_final_current', 'runs'],\n", + " 'scanAxisLength': array([33., 33.])}" ] }, - "execution_count": 183, + "execution_count": 28, "metadata": {}, "output_type": "execute_result" } @@ -7332,27 +2584,9 @@ }, { "cell_type": "code", - "execution_count": 171, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'_id': ObjectId('64889137f1f9594635fc401c'), 'year': 2023, 'month': 5, 'day': 23, 'shotNum': '0069', 'runNum': 0, 'global_parameters': {'TOF_free': 0.022, 'abs_img_freq': 110.858, 'absorption_imaging_flag': True, 'backup_data': True, 'blink_off_time': 0.001, 'blink_on_time': 0.001, 'c_duration': 0.2, 'carrier_amp': 3, 'carrier_freq': 0.85, 'carrier_offset': 0, 'carrier_phase': 0, 'channel_in_use': 1, 'cmot_final_current': 0.65, 'cmot_hold': 0.06, 'cmot_initial_current': 0.18, 'compX_current': 0, 'compX_current_sg': 0.0, 'compX_initial_current': 0, 'compY_current': 0, 'compY_current_sg': 0.0, 'compY_final_current': 0, 'compY_initial_current': 0, 'compZ_current': 0, 'compZ_current_sg': 0.189, 'compZ_final_current': 0.264, 'compZ_initial_current': 0, 'default_camera': 0, 'deltaf': 0.161, 'evap_1_arm_1_final_pow': 0.35, 'evap_1_arm_1_mod_depth_final': 0, 'evap_1_arm_1_mod_depth_initial': 1.0, 'evap_1_arm_1_mod_ramp_duration': 1.15, 'evap_1_arm_1_pow_ramp_duration': 1.65, 'evap_1_arm_1_start_pow': 7, 'evap_1_arm_2_final_pow': 5, 'evap_1_arm_2_ramp_duration': 0.5, 'evap_1_arm_2_start_pow': 0, 'evap_1_mod_ramp_trunc_value': 1, 'evap_1_pow_ramp_trunc_value': 1.0, 'evap_1_rate_constant_1': 0.525, 'evap_1_rate_constant_2': 0.51, 'evap_2_arm_1_final_pow': 0.037, 'evap_2_arm_1_start_pow': 0.35, 'evap_2_arm_2_final_pow': 0.09, 'evap_2_arm_2_start_pow': 5, 'evap_2_ramp_duration': 1.0, 'evap_2_ramp_trunc_value': 1.0, 'evap_2_rate_constant_1': 0.37, 'evap_2_rate_constant_2': 0.71, 'evap_3_arm_1_final_pow': 0.1038, 'evap_3_arm_1_mod_depth_final': 0.43, 'evap_3_arm_1_mod_depth_initial': 0, 'evap_3_arm_1_start_pow': 0.037, 'evap_3_ramp_duration': 0.1, 'evap_3_ramp_trunc_value': 1.0, 'evap_3_rate_constant_1': -0.879, 'evap_3_rate_constant_2': -0.297, 'final_amp': 0.00012, 'final_freq': 104.0, 'final_pow_1': 0.1038, 'final_pow_2': 0.09, 'gradCoil_current': 0.18, 'gradCoil_current_sg': 0, 'imaging_method': 'in_situ_absorption', 'imaging_pulse_duration': 2.5e-05, 'imaging_wavelength': 4.21291e-07, 'initial_amp': 0.62, 'initial_freq': 102.13, 'mod_depth_fin': 0.43, 'mod_depth_ini': 0, 'mod_depth_initial': 1.0, 'mot_3d_amp': 0.62, 'mot_3d_camera_trigger_duration': 0.00025, 'mot_3d_freq': 102.13, 'mot_load_duration': 2, 'odt_axis_camera_trigger_duration': 0.002, 'odt_hold_time_1': 0.01, 'odt_hold_time_2': 0.1, 'odt_hold_time_3': 0.1, 'odt_hold_time_4': 1.0, 'odt_hold_time_5': 0.01, 'operation_mode': 'SWEEP', 'pow_arm_1': 7, 'pow_arm_2': 0, 'pulse_delay': 8e-05, 'pulse_width': 0.01, 'push_amp': 0.16, 'push_freq': 102.66, 'ramp_duration': 1, 'recomp_ramp_duration': 0.5, 'recomp_ramp_pow_fin_arm_1': 0.1038, 'recomp_ramp_pow_fin_arm_2': 0.09, 'recomp_ramp_pow_ini_arm_1': 0.1038, 'recomp_ramp_pow_ini_arm_2': 0.09, 'save_results': False, 'sin_mod_amplitude': 0.00519, 'sin_mod_dc_offset': 0.1038, 'sin_mod_duration': nan, 'sin_mod_freq': nan, 'sin_mod_phase': 0.0, 'start_pow_1': 0.037, 'start_pow_2': 0.09, 'stern_gerlach_duration': 0.001, 'sweep_duration': 0.4, 'sweep_start_freq': 0.7695, 'sweep_stop_freq': 0.9305, 'tf_meas_ramp_duration': 0.1, 'wait_after_2dmot_off': 0, 'wait_time_between_images': 0.22, 'wavetype': 'SINE', 'x_offset': 0.0, 'x_offset_img': 0, 'y_offset': 0.0, 'y_offset_img': 0, 'z_offset': 0.189, 'z_offset_img': 0.189, 'compX_final_current': 0.0, 'runs': 0.0}, 'OD': {'name': 'OD', 'mongoID': ObjectId('648891baf1f9594635fc403d'), 'engine': 'xarray', 'dtype': 'dataArray'}, 'aaa': {'name': 'aaa', 'mongoID': ObjectId('64889337f1f9594635fc40c1'), 'engine': 'xarray', 'dtype': 'dataSet'}}\n" - ] - }, - { - "data": { - "text/plain": [ - "dict_keys(['_id', 'year', 'month', 'day', 'shotNum', 'runNum', 'global_parameters', 'OD', 'aaa'])" - ] - }, - "execution_count": 171, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "DB.load_data_single(shotNum='0069', runNum=0).keys()" ]