diff --git a/Analyser/FitAnalyser.py b/Analyser/FitAnalyser.py index 94ca740..8bcdbd3 100644 --- a/Analyser/FitAnalyser.py +++ b/Analyser/FitAnalyser.py @@ -298,6 +298,7 @@ class FitAnalyser(): return self.fitModel.guess(data=data, x=x, **kwargs) def _guess_2D(self, data, x, y, **kwargs): + data = data.flatten(order='F') return self.fitModel.guess(data=data, x=x, y=y, **kwargs) def guess(self, dataArray, x=None, y=None, guess_kwargs={}, input_core_dims=None, dask='parallelized', vectorize=True, keep_attrs=True, daskKwargs=None, **kwargs): @@ -374,9 +375,9 @@ class FitAnalyser(): _x = _x.flatten() _y = _y.flatten() - dataArray = dataArray.stack(_z=(kwargs["input_core_dims"][0][0], kwargs["input_core_dims"][0][1])) + # dataArray = dataArray.stack(_z=(kwargs["input_core_dims"][0][0], kwargs["input_core_dims"][0][1])) - kwargs["input_core_dims"][0] = ['_z'] + # kwargs["input_core_dims"][0] = ['_z'] guess_kwargs.update( { @@ -391,10 +392,10 @@ class FitAnalyser(): ) def _fit_1D(self, data, params, x): - # try: return self.fitModel.fit(data=data, x=x, params=params) def _fit_2D(self, data, params, x, y): + data = data.flatten(order='F') return self.fitModel.fit(data=data, x=x, y=y, params=params) def fit(self, dataArray, paramsArray, x=None, y=None, input_core_dims=None, dask='parallelized', vectorize=True, keep_attrs=True, daskKwargs=None, **kwargs): @@ -464,9 +465,9 @@ class FitAnalyser(): _x = _x.flatten() _y = _y.flatten() - dataArray = dataArray.stack(_z=(kwargs["input_core_dims"][0][0], kwargs["input_core_dims"][0][1])) + # dataArray = dataArray.stack(_z=(kwargs["input_core_dims"][0][0], kwargs["input_core_dims"][0][1])) - kwargs["input_core_dims"][0] = ['_z'] + # kwargs["input_core_dims"][0] = ['_z'] return xr.apply_ufunc(self._fit_2D, dataArray, kwargs={'params':paramsArray,'x':_x, 'y':_y}, output_dtypes=[type(lmfit.model.ModelResult(self.fitModel, self.fitModel.make_params()))], @@ -520,9 +521,9 @@ class FitAnalyser(): _x = _x.flatten() _y = _y.flatten() - dataArray = dataArray.stack(_z=(kwargs["input_core_dims"][0][0], kwargs["input_core_dims"][0][1])) + # dataArray = dataArray.stack(_z=(kwargs["input_core_dims"][0][0], kwargs["input_core_dims"][0][1])) - kwargs["input_core_dims"][0] = ['_z'] + # kwargs["input_core_dims"][0] = ['_z'] return xr.apply_ufunc(self._fit_2D, dataArray, paramsArray, kwargs={'x':_x, 'y':_y}, output_dtypes=[type(lmfit.model.ModelResult(self.fitModel, self.fitModel.make_params()))], @@ -533,7 +534,7 @@ class FitAnalyser(): def _eval_2D(self, fitResult, x, y, shape): res = self.fitModel.eval(x=x, y=y, **fitResult.best_values) - return res.reshape(shape) + return res.reshape(shape, order='F') def eval(self, fitResultArray, x=None, y=None, output_core_dims=None, prefix="", dask='parallelized', vectorize=True, daskKwargs=None, **kwargs): diff --git a/Example.ipynb b/Example.ipynb index 2849d6d..b873397 100644 --- a/Example.ipynb +++ b/Example.ipynb @@ -10,7 +10,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -45,7 +45,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "metadata": {}, "outputs": [ { @@ -55,7 +55,7 @@ "
\n", "
\n", "

Client

\n", - "

Client-f1495c59-edaf-11ed-9258-80e82ce2fa8e

\n", + "

Client-a81c158c-f2f5-11ed-9770-80e82ce2fa8e

\n", " \n", "\n", " \n", @@ -86,7 +86,7 @@ " \n", "
\n", "

LocalCluster

\n", - "

ecfd5eec

\n", + "

116b747f

\n", "
\n", " \n", "
\n", @@ -123,11 +123,11 @@ "
\n", "
\n", "

Scheduler

\n", - "

Scheduler-080ba6de-3233-4c43-b6be-81fbc76eed14

\n", + "

Scheduler-01769d9b-6488-4b9d-a514-715f8d0b544a

\n", " \n", " \n", " \n", "
\n", - " Comm: tcp://127.0.0.1:50503\n", + " Comm: tcp://127.0.0.1:60175\n", " \n", " Workers: 6\n", @@ -169,7 +169,7 @@ " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", @@ -214,7 +214,7 @@ "
\n", - " Comm: tcp://127.0.0.1:50545\n", + " Comm: tcp://127.0.0.1:60213\n", " \n", " Total threads: 10\n", @@ -177,7 +177,7 @@ "
\n", - " Dashboard: http://127.0.0.1:50546/status\n", + " Dashboard: http://127.0.0.1:60214/status\n", " \n", " Memory: 9.31 GiB\n", @@ -185,13 +185,13 @@ "
\n", - " Nanny: tcp://127.0.0.1:50506\n", + " Nanny: tcp://127.0.0.1:60178\n", "
\n", - " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-_95_zmec\n", + " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-6nf75z53\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", @@ -259,7 +259,7 @@ "
\n", - " Comm: tcp://127.0.0.1:50539\n", + " Comm: tcp://127.0.0.1:60204\n", " \n", " Total threads: 10\n", @@ -222,7 +222,7 @@ "
\n", - " Dashboard: http://127.0.0.1:50542/status\n", + " Dashboard: http://127.0.0.1:60205/status\n", " \n", " Memory: 9.31 GiB\n", @@ -230,13 +230,13 @@ "
\n", - " Nanny: tcp://127.0.0.1:50507\n", + " Nanny: tcp://127.0.0.1:60179\n", "
\n", - " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-u2j01lew\n", + " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-p59ejrm0\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", @@ -304,7 +304,7 @@ "
\n", - " Comm: tcp://127.0.0.1:50540\n", + " Comm: tcp://127.0.0.1:60207\n", " \n", " Total threads: 10\n", @@ -267,7 +267,7 @@ "
\n", - " Dashboard: http://127.0.0.1:50541/status\n", + " Dashboard: http://127.0.0.1:60209/status\n", " \n", " Memory: 9.31 GiB\n", @@ -275,13 +275,13 @@ "
\n", - " Nanny: tcp://127.0.0.1:50508\n", + " Nanny: tcp://127.0.0.1:60180\n", "
\n", - " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-vopd2ne3\n", + " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-jfsb9czh\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", @@ -349,7 +349,7 @@ "
\n", - " Comm: tcp://127.0.0.1:50520\n", + " Comm: tcp://127.0.0.1:60216\n", " \n", " Total threads: 10\n", @@ -312,7 +312,7 @@ "
\n", - " Dashboard: http://127.0.0.1:50531/status\n", + " Dashboard: http://127.0.0.1:60218/status\n", " \n", " Memory: 9.31 GiB\n", @@ -320,13 +320,13 @@ "
\n", - " Nanny: tcp://127.0.0.1:50509\n", + " Nanny: tcp://127.0.0.1:60181\n", "
\n", - " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-pyyg__lu\n", + " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-kstv_j3s\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", @@ -394,7 +394,7 @@ "
\n", - " Comm: tcp://127.0.0.1:50533\n", + " Comm: tcp://127.0.0.1:60208\n", " \n", " Total threads: 10\n", @@ -357,7 +357,7 @@ "
\n", - " Dashboard: http://127.0.0.1:50535/status\n", + " Dashboard: http://127.0.0.1:60211/status\n", " \n", " Memory: 9.31 GiB\n", @@ -365,13 +365,13 @@ "
\n", - " Nanny: tcp://127.0.0.1:50510\n", + " Nanny: tcp://127.0.0.1:60182\n", "
\n", - " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-9w5j5ysn\n", + " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-6km3qbof\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", @@ -443,10 +443,10 @@ "" ], "text/plain": [ - "" + "" ] }, - "execution_count": 2, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } @@ -467,7 +467,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -486,7 +486,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -513,7 +513,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 6, "metadata": {}, "outputs": [ { @@ -906,9 +906,9 @@ " z_offset_img: 0.189\n", " final_amp: [3.00e-05 5.50e-05 8.00e-05 1.05e-04 1...\n", " runs: [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 1...\n", - " scanAxis: ['final_amp', 'runs']\n", - " scanAxisLength: [33. 33.]
\n", - " Comm: tcp://127.0.0.1:50534\n", + " Comm: tcp://127.0.0.1:60217\n", " \n", " Total threads: 10\n", @@ -402,7 +402,7 @@ "
\n", - " Dashboard: http://127.0.0.1:50537/status\n", + " Dashboard: http://127.0.0.1:60219/status\n", " \n", " Memory: 9.31 GiB\n", @@ -410,13 +410,13 @@ "
\n", - " Nanny: tcp://127.0.0.1:50511\n", + " Nanny: tcp://127.0.0.1:60183\n", "
\n", - " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-k5qtsgw6\n", + " Local directory: C:\\Users\\data\\AppData\\Local\\Temp\\dask-worker-space\\worker-amu1evk8\n", "
\n", + " scanAxis: ['final_amp' 'runs']\n", + " scanAxisLength: [33. 33.]
\n", " \n", "
\n", " \n", @@ -1003,7 +1003,7 @@ "\n", " \n", " \n", - "
  • background
    (final_amp, runs, x, y)
    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
    (final_amp, runs, x, y)
    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", @@ -1098,7 +1098,7 @@ "\n", " \n", " \n", - "
  • dark
    (final_amp, runs, x, y)
    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
    (final_amp, runs, x, y)
    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", @@ -1193,7 +1193,7 @@ "\n", " \n", " \n", - "
  • shotNum
    (final_amp, runs)
    int64
    dask.array<chunksize=(11, 3), meta=np.ndarray>
    \n", + "
  • shotNum
    (final_amp, runs)
    int64
    dask.array<chunksize=(11, 3), meta=np.ndarray>
    \n", " \n", "
    \n", " \n", @@ -1248,7 +1248,7 @@ "\n", " \n", " \n", - "
  • OD
    (final_amp, runs, x, y)
    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", + "
  • OD
    (final_amp, runs, x, y)
    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", @@ -1343,14 +1343,14 @@ "\n", " \n", " \n", - "
    • final_amp
      PandasIndex
      PandasIndex(Float64Index([   3e-05,  5.5e-05,    8e-05, 0.000105,  0.00013, 0.000155,\n",
      +       "
    • final_amp
      PandasIndex
      PandasIndex(Float64Index([   3e-05,  5.5e-05,    8e-05, 0.000105,  0.00013, 0.000155,\n",
              "               0.00018, 0.000205,  0.00023, 0.000255,  0.00028],\n",
      -       "             dtype='float64', name='final_amp'))
    • runs
      PandasIndex
      PandasIndex(Float64Index([0.0, 1.0, 2.0], dtype='float64', name='runs'))
  • TOF_free :
    0.01
    abs_img_freq :
    110.858
    absorption_imaging_flag :
    True
    backup_data :
    True
    blink_off_time :
    nan
    blink_on_time :
    nan
    c_duration :
    0.2
    cmot_final_current :
    0.65
    cmot_hold :
    0.06
    cmot_initial_current :
    0.18
    compX_current :
    0.005
    compX_current_sg :
    0
    compX_final_current :
    0.002
    compX_initial_current :
    0.005
    compY_current :
    0
    compY_current_sg :
    0
    compY_final_current :
    0
    compY_initial_current :
    0
    compZ_current :
    0
    compZ_current_sg :
    0.189
    compZ_final_current :
    0.285
    compZ_initial_current :
    0
    default_camera :
    1
    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_freq :
    104
    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 :
    101.896
    mod_depth_initial :
    1.0
    mot_3d_amp :
    0.62
    mot_3d_camera_exposure_time :
    0.002
    mot_3d_camera_trigger_duration :
    0.00025
    mot_3d_freq :
    101.896
    mot_load_duration :
    4
    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
    pow_arm_1 :
    7
    pow_arm_2 :
    0
    pulse_delay :
    8e-05
    push_amp :
    0.16
    push_freq :
    102.95
    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
    stern_gerlach_duration :
    0.001
    wait_after_2dmot_off :
    0
    wait_time_between_images :
    0.22
    x_offset :
    0
    x_offset_img :
    0
    y_offset :
    0
    y_offset_img :
    0
    z_offset :
    0.189
    z_offset_img :
    0.189
    final_amp :
    [3.00e-05 5.50e-05 8.00e-05 1.05e-04 1.30e-04 1.55e-04 1.80e-04 2.05e-04\n", + " dtype='float64', name='final_amp'))
  • runs
    PandasIndex
    PandasIndex(Float64Index([0.0, 1.0, 2.0], dtype='float64', name='runs'))
  • TOF_free :
    0.01
    abs_img_freq :
    110.858
    absorption_imaging_flag :
    True
    backup_data :
    True
    blink_off_time :
    nan
    blink_on_time :
    nan
    c_duration :
    0.2
    cmot_final_current :
    0.65
    cmot_hold :
    0.06
    cmot_initial_current :
    0.18
    compX_current :
    0.005
    compX_current_sg :
    0
    compX_final_current :
    0.002
    compX_initial_current :
    0.005
    compY_current :
    0
    compY_current_sg :
    0
    compY_final_current :
    0
    compY_initial_current :
    0
    compZ_current :
    0
    compZ_current_sg :
    0.189
    compZ_final_current :
    0.285
    compZ_initial_current :
    0
    default_camera :
    1
    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_freq :
    104
    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 :
    101.896
    mod_depth_initial :
    1.0
    mot_3d_amp :
    0.62
    mot_3d_camera_exposure_time :
    0.002
    mot_3d_camera_trigger_duration :
    0.00025
    mot_3d_freq :
    101.896
    mot_load_duration :
    4
    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
    pow_arm_1 :
    7
    pow_arm_2 :
    0
    pulse_delay :
    8e-05
    push_amp :
    0.16
    push_freq :
    102.95
    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
    stern_gerlach_duration :
    0.001
    wait_after_2dmot_off :
    0
    wait_time_between_images :
    0.22
    x_offset :
    0
    x_offset_img :
    0
    y_offset :
    0
    y_offset_img :
    0
    z_offset :
    0.189
    z_offset_img :
    0.189
    final_amp :
    [3.00e-05 5.50e-05 8.00e-05 1.05e-04 1.30e-04 1.55e-04 1.80e-04 2.05e-04\n", " 2.30e-04 2.55e-04 2.80e-04 3.00e-05 5.50e-05 8.00e-05 1.05e-04 1.30e-04\n", " 1.55e-04 1.80e-04 2.05e-04 2.30e-04 2.55e-04 2.80e-04 3.00e-05 5.50e-05\n", " 8.00e-05 1.05e-04 1.30e-04 1.55e-04 1.80e-04 2.05e-04 2.30e-04 2.55e-04\n", " 2.80e-04]
    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 :
    ['final_amp', 'runs']
    scanAxisLength :
    [33. 33.]
  • " + " 2. 2. 2. 2. 2. 2. 2. 2. 2.]
    scanAxis :
    ['final_amp' 'runs']
    scanAxisLength :
    [33. 33.]
    " ], "text/plain": [ "\n", @@ -1377,11 +1377,11 @@ " z_offset_img: 0.189\n", " final_amp: [3.00e-05 5.50e-05 8.00e-05 1.05e-04 1...\n", " runs: [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 1...\n", - " scanAxis: ['final_amp', 'runs']\n", + " scanAxis: ['final_amp' 'runs']\n", " scanAxisLength: [33. 33.]" ] }, - "execution_count": 5, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -1417,7 +1417,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "metadata": {}, "outputs": [ { @@ -1461,7 +1461,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ @@ -1473,16 +1473,16 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 8, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" }, @@ -1511,537 +1511,6 @@ "### Get the result of the fit" ] }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
    \n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
    <xarray.Dataset>\n",
    -       "Dimensions:      (final_amp: 11, runs: 3)\n",
    -       "Coordinates:\n",
    -       "  * final_amp    (final_amp) float64 3e-05 5.5e-05 8e-05 ... 0.000255 0.00028\n",
    -       "  * runs         (runs) float64 0.0 1.0 2.0\n",
    -       "Data variables:\n",
    -       "    A_amplitude  (final_amp, runs) float64 7.389 0.6514 2.918 ... -2.518 3.549\n",
    -       "    A_centerx    (final_amp, runs) float64 5.522 95.78 43.32 ... 41.19 70.74\n",
    -       "    A_centery    (final_amp, runs) float64 36.45 63.99 43.59 ... 31.02 22.72\n",
    -       "    A_sigmax     (final_amp, runs) float64 2.715 2.318 8.417 ... 1.901 6.007\n",
    -       "    A_sigmay     (final_amp, runs) float64 18.7 0.4659 0.2433 ... 5.352 4.693\n",
    -       "    B_amplitude  (final_amp, runs) float64 -1.332e+03 -5.867 ... 186.6 -94.97\n",
    -       "    B_centerx    (final_amp, runs) float64 -62.62 85.42 87.56 ... -80.55 -52.57\n",
    -       "    B_centery    (final_amp, runs) float64 145.8 79.83 18.89 ... 101.4 74.86\n",
    -       "    B_sigmax     (final_amp, runs) float64 120.4 30.64 91.5 ... 26.64 116.1\n",
    -       "    B_sigmay     (final_amp, runs) float64 119.6 2.057 11.05 ... 99.89 49.72\n",
    -       "    delta        (final_amp, runs) float64 -117.7 -28.32 ... -24.74 -110.1
    " - ], - "text/plain": [ - "\n", - "Dimensions: (final_amp: 11, runs: 3)\n", - "Coordinates:\n", - " * final_amp (final_amp) float64 3e-05 5.5e-05 8e-05 ... 0.000255 0.00028\n", - " * runs (runs) float64 0.0 1.0 2.0\n", - "Data variables:\n", - " A_amplitude (final_amp, runs) float64 7.389 0.6514 2.918 ... -2.518 3.549\n", - " A_centerx (final_amp, runs) float64 5.522 95.78 43.32 ... 41.19 70.74\n", - " A_centery (final_amp, runs) float64 36.45 63.99 43.59 ... 31.02 22.72\n", - " A_sigmax (final_amp, runs) float64 2.715 2.318 8.417 ... 1.901 6.007\n", - " A_sigmay (final_amp, runs) float64 18.7 0.4659 0.2433 ... 5.352 4.693\n", - " B_amplitude (final_amp, runs) float64 -1.332e+03 -5.867 ... 186.6 -94.97\n", - " B_centerx (final_amp, runs) float64 -62.62 85.42 87.56 ... -80.55 -52.57\n", - " B_centery (final_amp, runs) float64 145.8 79.83 18.89 ... 101.4 74.86\n", - " B_sigmax (final_amp, runs) float64 120.4 30.64 91.5 ... 26.64 116.1\n", - " B_sigmay (final_amp, runs) float64 119.6 2.057 11.05 ... 99.89 49.72\n", - " delta (final_amp, runs) float64 -117.7 -28.32 ... -24.74 -110.1" - ] - }, - "execution_count": 9, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "fitAnalyser.get_fit_value(fitResult)" - ] - }, { "cell_type": "code", "execution_count": 10, @@ -2419,6 +1888,537 @@ " * final_amp (final_amp) float64 3e-05 5.5e-05 8e-05 ... 0.000255 0.00028\n", " * runs (runs) float64 0.0 1.0 2.0\n", "Data variables:\n", + " A_amplitude (final_amp, runs) float64 7.389 0.6514 2.918 ... -2.518 3.549\n", + " A_centerx (final_amp, runs) float64 5.522 95.78 43.32 ... 41.19 70.74\n", + " A_centery (final_amp, runs) float64 36.45 63.99 43.59 ... 31.02 22.72\n", + " A_sigmax (final_amp, runs) float64 2.715 2.318 8.417 ... 1.901 6.007\n", + " A_sigmay (final_amp, runs) float64 18.7 0.4659 0.2433 ... 5.352 4.693\n", + " B_amplitude (final_amp, runs) float64 -1.332e+03 -5.867 ... 186.6 -94.97\n", + " B_centerx (final_amp, runs) float64 -62.62 85.42 87.56 ... -80.55 -52.57\n", + " B_centery (final_amp, runs) float64 145.8 79.83 18.89 ... 101.4 74.86\n", + " B_sigmax (final_amp, runs) float64 120.4 30.64 91.5 ... 26.64 116.1\n", + " B_sigmay (final_amp, runs) float64 119.6 2.057 11.05 ... 99.89 49.72\n", + " delta (final_amp, runs) float64 -117.7 -28.32 ... -24.74 -110.1" + ], + "text/plain": [ + "\n", + "Dimensions: (final_amp: 11, runs: 3)\n", + "Coordinates:\n", + " * final_amp (final_amp) float64 3e-05 5.5e-05 8e-05 ... 0.000255 0.00028\n", + " * runs (runs) float64 0.0 1.0 2.0\n", + "Data variables:\n", + " A_amplitude (final_amp, runs) float64 7.389 0.6514 2.918 ... -2.518 3.549\n", + " A_centerx (final_amp, runs) float64 5.522 95.78 43.32 ... 41.19 70.74\n", + " A_centery (final_amp, runs) float64 36.45 63.99 43.59 ... 31.02 22.72\n", + " A_sigmax (final_amp, runs) float64 2.715 2.318 8.417 ... 1.901 6.007\n", + " A_sigmay (final_amp, runs) float64 18.7 0.4659 0.2433 ... 5.352 4.693\n", + " B_amplitude (final_amp, runs) float64 -1.332e+03 -5.867 ... 186.6 -94.97\n", + " B_centerx (final_amp, runs) float64 -62.62 85.42 87.56 ... -80.55 -52.57\n", + " B_centery (final_amp, runs) float64 145.8 79.83 18.89 ... 101.4 74.86\n", + " B_sigmax (final_amp, runs) float64 120.4 30.64 91.5 ... 26.64 116.1\n", + " B_sigmay (final_amp, runs) float64 119.6 2.057 11.05 ... 99.89 49.72\n", + " delta (final_amp, runs) float64 -117.7 -28.32 ... -24.74 -110.1" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "fitAnalyser.get_fit_value(fitResult)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
    <xarray.Dataset>\n",
    +       "Dimensions:      (final_amp: 11, runs: 3)\n",
    +       "Coordinates:\n",
    +       "  * final_amp    (final_amp) float64 3e-05 5.5e-05 8e-05 ... 0.000255 0.00028\n",
    +       "  * runs         (runs) float64 0.0 1.0 2.0\n",
    +       "Data variables:\n",
            "    A_amplitude  (final_amp, runs) float64 3.417 0.3964 3.144e+05 ... 0.99 1.785\n",
            "    A_centerx    (final_amp, runs) float64 0.8112 1.075 3.288 ... 0.7478 2.814\n",
            "    A_centery    (final_amp, runs) float64 6.057 0.4854 ... 2.086 2.182\n",
    @@ -2429,8 +2429,8 @@
            "    B_centery    (final_amp, runs) float64 342.8 0.9901 ... 3.967e+04 76.89\n",
            "    B_sigmax     (final_amp, runs) float64 255.8 30.52 285.1 ... 1.969e+04 956.2\n",
            "    B_sigmay     (final_amp, runs) float64 221.4 0.9901 ... 3.959e+04 86.02\n",
    -       "    delta        (final_amp, runs) float64 255.5 30.55 285.1 ... 1.969e+04 956.2
  • " ], "text/plain": [ "\n", @@ -2564,7 +2564,7 @@ " delta (final_amp, runs) float64 255.5 30.55 285.1 ... 1.969e+04 956.2" ] }, - "execution_count": 10, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -2575,7 +2575,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 12, "metadata": {}, "outputs": [ { @@ -2968,8 +2968,8 @@ " B_centery (final_amp, runs) object (1.5+/-3.4)e+02 ... (7+/-8)e+01\n", " B_sigmax (final_amp, runs) object (1.2+/-2.6)e+02 ... (0.1+/-1.0)e+03\n", " B_sigmay (final_amp, runs) object (1.2+/-2.2)e+02 ... (5+/-9)e+01\n", - " delta (final_amp, runs) object (-1.2+/-2.6)e+02 ... (-0.1+/-1.0)e+03
  • " ], "text/plain": [ "\n", @@ -3330,7 +3330,7 @@ " delta (final_amp, runs) object (-1.2+/-2.6)e+02 ... (-0.1+/-1.0)e+03" ] }, - "execution_count": 11, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -3357,7 +3357,7 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 13, "metadata": {}, "outputs": [ { @@ -3391,7 +3391,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 14, "metadata": {}, "outputs": [ { @@ -3426,7 +3426,7 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 15, "metadata": {}, "outputs": [ { @@ -3460,7 +3460,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 16, "metadata": {}, "outputs": [ { @@ -3838,15 +3838,15 @@ " nan, nan, nan]])\n", "Coordinates:\n", " * final_amp (final_amp) float64 3e-05 5.5e-05 8e-05 ... 0.000255 0.00028\n", - "Dimensions without coordinates: plot
  • " ], "text/plain": [ "\n", @@ -3861,7 +3861,7 @@ "Dimensions without coordinates: plot" ] }, - "execution_count": 39, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -3880,7 +3880,7 @@ ], "metadata": { "kernelspec": { - "display_name": "env", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -3896,12 +3896,7 @@ "pygments_lexer": "ipython3", "version": "3.9.13" }, - "orig_nbformat": 4, - "vscode": { - "interpreter": { - "hash": "c05913ad4f24fdc6b2418069394dc5835b1981849b107c9ba6df693aafd66650" - } - } + "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2