From 52f4379bdb06071f2eaa5772b0adbe6879c70353 Mon Sep 17 00:00:00 2001
From: Laurent Mercadier <laurent.mercadier@xfel.eu>
Date: Thu, 26 Jan 2023 12:45:31 +0100
Subject: [PATCH] Add link to notebook in Howto's and update changelog

---
 ...Analysis_of_Viking_spectrometer_data.ipynb | 59 +++++++++++--------
 doc/changelog.rst                             |  1 +
 doc/howtos.rst                                |  4 ++
 3 files changed, 38 insertions(+), 26 deletions(-)

diff --git a/doc/Analysis_of_Viking_spectrometer_data.ipynb b/doc/Analysis_of_Viking_spectrometer_data.ipynb
index 90ea5b0..e27e461 100644
--- a/doc/Analysis_of_Viking_spectrometer_data.ipynb
+++ b/doc/Analysis_of_Viking_spectrometer_data.ipynb
@@ -7,7 +7,7 @@
    "source": [
     "# Analysis of Viking spectrometer data\n",
     "\n",
-    "The Viking spectrometer is typically used with an Andor Newton CCD to record the transmissted FEL spectrum. The `Viking` class of the SCS ToolBox contains all the details about the experiment, but no data. It allows the calculation of an absorption spectrum based on averaged spectra with and without sample (reference).\n",
+    "The Viking spectrometer is typically used with an Andor Newton CCD to record the transmitted FEL spectrum. The `Viking` class of the SCS ToolBox contains all the details about the experiment, but no data. It allows the calculation of an absorption spectrum based on averaged spectra with and without sample (reference).\n",
     "\n",
     "All the parameters need to be carefully calibrated whenever the spectrometer is moved, usually at the beginning of a beamtime."
    ]
@@ -34,8 +34,16 @@
     "import xarray as xr\n",
     "import matplotlib.pyplot as plt\n",
     "plt.rcParams['figure.constrained_layout.use'] = True\n",
-    "# %matplotlib notebook\n",
-    "import toolbox_scs as tb\n"
+    "#%matplotlib notebook\n",
+    "import toolbox_scs as tb"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "16ef4834",
+   "metadata": {},
+   "source": [
+    "## Setting the stage"
    ]
   },
   {
@@ -59,7 +67,6 @@
    "outputs": [],
    "source": [
     "v = tb.Viking(proposal)\n",
-    "v.BL_POLY_DEG = 1\n",
     "v.FIELDS += ['XTD10_SA3']  # add the pulse energy measured by XGM in the XTD10 tunnel\n",
     "v.X_RANGE = slice(0, 1500) # define the dispersive axis range of interest (in pixels)\n",
     "v.Y_RANGE = slice(29, 82) # define the non-dispersive axis range of interest (in pixels)\n",
@@ -462,19 +469,19 @@
        "    high_capacity:             0\n",
        "    exposure_s:                0.0004\n",
        "    gain:                      2\n",
-       "    photoelectrons_per_count:  2.05</pre><div class='xr-wrap' hidden><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-f7fc0e9f-3202-4908-b6a9-a27093961611' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-f7fc0e9f-3202-4908-b6a9-a27093961611' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>newt_x</span>: 1500</li><li><span>newt_y</span>: 53</li><li><span>pulse_slot</span>: 2700</li><li><span class='xr-has-index'>sa3_pId</span>: 43</li><li><span class='xr-has-index'>trainId</span>: 661</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-cf541fb2-cb03-4f40-a9e0-32861ee4b0f1' class='xr-section-summary-in' type='checkbox'  checked><label for='section-cf541fb2-cb03-4f40-a9e0-32861ee4b0f1' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>trainId</span></div><div class='xr-var-dims'>(trainId)</div><div class='xr-var-dtype'>uint64</div><div class='xr-var-preview xr-preview'>1473952798 ... 1473954118</div><input id='attrs-46c6128d-0f4a-4fbe-a649-67731bbe70ff' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-46c6128d-0f4a-4fbe-a649-67731bbe70ff' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0cc0f7ee-6c26-4920-a912-9c28f2d87baf' class='xr-var-data-in' type='checkbox'><label for='data-0cc0f7ee-6c26-4920-a912-9c28f2d87baf' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([1473952798, 1473952800, 1473952802, ..., 1473954114, 1473954116,\n",
-       "       1473954118], dtype=uint64)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>sa3_pId</span></div><div class='xr-var-dims'>(sa3_pId)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>1056 1088 1120 ... 2336 2368 2400</div><input id='attrs-67401b61-5c59-49ff-bb9b-ac8b88f8cdd3' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-67401b61-5c59-49ff-bb9b-ac8b88f8cdd3' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-680c3658-3ba6-4551-b7f2-3ea3a8a7a116' class='xr-var-data-in' type='checkbox'><label for='data-680c3658-3ba6-4551-b7f2-3ea3a8a7a116' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([1056, 1088, 1120, 1152, 1184, 1216, 1248, 1280, 1312, 1344, 1376, 1408,\n",
+       "    photoelectrons_per_count:  2.05</pre><div class='xr-wrap' hidden><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-8346f161-6b2c-4965-bfd4-ec05589ee6ef' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-8346f161-6b2c-4965-bfd4-ec05589ee6ef' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>newt_x</span>: 1500</li><li><span>newt_y</span>: 53</li><li><span>pulse_slot</span>: 2700</li><li><span class='xr-has-index'>sa3_pId</span>: 43</li><li><span class='xr-has-index'>trainId</span>: 661</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-1568792c-5dfb-4a01-b3b3-57d4ccdd9a94' class='xr-section-summary-in' type='checkbox'  checked><label for='section-1568792c-5dfb-4a01-b3b3-57d4ccdd9a94' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>trainId</span></div><div class='xr-var-dims'>(trainId)</div><div class='xr-var-dtype'>uint64</div><div class='xr-var-preview xr-preview'>1473952798 ... 1473954118</div><input id='attrs-bb142691-19f5-4c46-bd7f-26bc0f2e58f4' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-bb142691-19f5-4c46-bd7f-26bc0f2e58f4' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1eebc218-0678-4693-88fa-d53260bce03f' class='xr-var-data-in' type='checkbox'><label for='data-1eebc218-0678-4693-88fa-d53260bce03f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([1473952798, 1473952800, 1473952802, ..., 1473954114, 1473954116,\n",
+       "       1473954118], dtype=uint64)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>sa3_pId</span></div><div class='xr-var-dims'>(sa3_pId)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>1056 1088 1120 ... 2336 2368 2400</div><input id='attrs-4ed80506-51f5-4e1a-85a7-49e8da3d332d' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-4ed80506-51f5-4e1a-85a7-49e8da3d332d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6c31d8c4-bffa-46ec-aec7-03ddc4d7ea07' class='xr-var-data-in' type='checkbox'><label for='data-6c31d8c4-bffa-46ec-aec7-03ddc4d7ea07' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([1056, 1088, 1120, 1152, 1184, 1216, 1248, 1280, 1312, 1344, 1376, 1408,\n",
        "       1440, 1472, 1504, 1536, 1568, 1600, 1632, 1664, 1696, 1728, 1760, 1792,\n",
        "       1824, 1856, 1888, 1920, 1952, 1984, 2016, 2048, 2080, 2112, 2144, 2176,\n",
-       "       2208, 2240, 2272, 2304, 2336, 2368, 2400])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>newt_x</span></div><div class='xr-var-dims'>(newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>515.9 515.9 515.9 ... 553.7 553.8</div><input id='attrs-750bcbf2-997b-46b3-90e6-3bd705eab169' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-750bcbf2-997b-46b3-90e6-3bd705eab169' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-61b7d534-6317-495b-afcf-2f0a6ffa803a' class='xr-var-data-in' type='checkbox'><label for='data-61b7d534-6317-495b-afcf-2f0a6ffa803a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([515.884589, 515.907651, 515.930715, ..., 553.717729, 553.745216,\n",
-       "       553.772706])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-8c18ac7b-82d8-49eb-9855-1a62e57014ad' class='xr-section-summary-in' type='checkbox'  checked><label for='section-8c18ac7b-82d8-49eb-9855-1a62e57014ad' class='xr-section-summary' >Data variables: <span>(5)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>bunchPatternTable</span></div><div class='xr-var-dims'>(trainId, pulse_slot)</div><div class='xr-var-dtype'>uint32</div><div class='xr-var-preview xr-preview'>2146089 2048 ... 16777216 16777216</div><input id='attrs-3f97a188-b1c8-4ff4-b2ef-09a0af6683b2' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-3f97a188-b1c8-4ff4-b2ef-09a0af6683b2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-512cdd0d-e028-4939-a5be-0d1cb99c4082' class='xr-var-data-in' type='checkbox'><label for='data-512cdd0d-e028-4939-a5be-0d1cb99c4082' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 2146089,     2048,  2099241, ..., 16777216, 16777216, 16777216],\n",
+       "       2208, 2240, 2272, 2304, 2336, 2368, 2400])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>newt_x</span></div><div class='xr-var-dims'>(newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>515.9 515.9 515.9 ... 553.7 553.8</div><input id='attrs-68a6a294-759f-4faa-987b-a22117e21f94' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-68a6a294-759f-4faa-987b-a22117e21f94' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-93351841-3bd3-4a3d-ad59-18c2b7445ba7' class='xr-var-data-in' type='checkbox'><label for='data-93351841-3bd3-4a3d-ad59-18c2b7445ba7' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([515.884589, 515.907651, 515.930715, ..., 553.717729, 553.745216,\n",
+       "       553.772706])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-20abee79-7a9e-4d63-82c0-f115e1c8ad00' class='xr-section-summary-in' type='checkbox'  checked><label for='section-20abee79-7a9e-4d63-82c0-f115e1c8ad00' class='xr-section-summary' >Data variables: <span>(5)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>bunchPatternTable</span></div><div class='xr-var-dims'>(trainId, pulse_slot)</div><div class='xr-var-dtype'>uint32</div><div class='xr-var-preview xr-preview'>2146089 2048 ... 16777216 16777216</div><input id='attrs-bb5e5280-e7ef-476d-91ef-88b6bfa957c6' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-bb5e5280-e7ef-476d-91ef-88b6bfa957c6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-54f3c35b-773e-4554-80be-5bfc5c807b65' class='xr-var-data-in' type='checkbox'><label for='data-54f3c35b-773e-4554-80be-5bfc5c807b65' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 2146089,     2048,  2099241, ..., 16777216, 16777216, 16777216],\n",
        "       [ 2146089,     2048,  2099241, ..., 16777216, 16777216, 16777216],\n",
        "       [ 2211625,     2048,  2099241, ..., 16777216, 16777216, 16777216],\n",
        "       ...,\n",
        "       [ 2146089,     2048,  2099241, ..., 16777216, 16777216, 16777216],\n",
        "       [ 2146089,     2048,  2099241, ..., 16777216, 16777216, 16777216],\n",
        "       [ 2146089,     2048,  2099241, ..., 16777216, 16777216, 16777216]],\n",
-       "      dtype=uint32)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>newton</span></div><div class='xr-var-dims'>(trainId, newt_y, newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>943.0 800.0 697.0 ... 805.0 758.0</div><input id='attrs-92a641b8-20af-4bac-b682-f3df016f0ed7' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-92a641b8-20af-4bac-b682-f3df016f0ed7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-06199b13-e831-431d-8e0b-2304ccd26709' class='xr-var-data-in' type='checkbox'><label for='data-06199b13-e831-431d-8e0b-2304ccd26709' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[ 943.,  800.,  697., ...,  985., 1057., 1038.],\n",
+       "      dtype=uint32)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>newton</span></div><div class='xr-var-dims'>(trainId, newt_y, newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>943.0 800.0 697.0 ... 805.0 758.0</div><input id='attrs-7d02cdd4-4262-4896-95b1-1c0253eee85a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7d02cdd4-4262-4896-95b1-1c0253eee85a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c4b697ef-b4fc-4e43-aff1-93339dc6402c' class='xr-var-data-in' type='checkbox'><label for='data-c4b697ef-b4fc-4e43-aff1-93339dc6402c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[ 943.,  800.,  697., ...,  985., 1057., 1038.],\n",
        "        [ 842.,  921.,  957., ..., 1037., 1041.,  978.],\n",
        "        [ 744.,  587.,  558., ..., 1094.,  925., 1030.],\n",
        "        ...,\n",
@@ -514,7 +521,7 @@
        "        ...,\n",
        "        [ 799.,  717.,  918., ...,  898.,  951., 1050.],\n",
        "        [ 870.,  949.,  918., ...,  911., 1283., 1080.],\n",
-       "        [ 894.,  627.,  652., ..., 1032.,  805.,  758.]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>XTD10_SA3</span></div><div class='xr-var-dims'>(trainId, sa3_pId)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.674e+03 1.781e+03 ... 1.465e+03</div><input id='attrs-610316e0-8677-4a19-97d9-5e8edaea8fbf' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-610316e0-8677-4a19-97d9-5e8edaea8fbf' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-fbbfc8a1-6b8c-4ed8-b956-1e2635ca4c50' class='xr-var-data-in' type='checkbox'><label for='data-fbbfc8a1-6b8c-4ed8-b956-1e2635ca4c50' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[1673.97485352, 1780.60498047, 1452.16772461, ..., 1836.07592773,\n",
+       "        [ 894.,  627.,  652., ..., 1032.,  805.,  758.]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>XTD10_SA3</span></div><div class='xr-var-dims'>(trainId, sa3_pId)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.674e+03 1.781e+03 ... 1.465e+03</div><input id='attrs-6796aff9-b98b-417a-b39c-7320b3500abf' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6796aff9-b98b-417a-b39c-7320b3500abf' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-01d1dac9-2015-417e-833b-4c4621b616c3' class='xr-var-data-in' type='checkbox'><label for='data-01d1dac9-2015-417e-833b-4c4621b616c3' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[1673.97485352, 1780.60498047, 1452.16772461, ..., 1836.07592773,\n",
        "        1695.68798828, 1458.07446289],\n",
        "       [2012.43261719, 1767.71337891, 1716.76318359, ..., 1651.42553711,\n",
        "        1813.9777832 , 1431.35644531],\n",
@@ -526,7 +533,7 @@
        "       [2101.60083008, 1569.24121094, 1855.71728516, ..., 1483.96960449,\n",
        "        1664.98217773, 1348.71264648],\n",
        "       [1564.17675781, 1731.5670166 , 1535.64672852, ..., 1721.94335938,\n",
-       "        1681.0324707 , 1465.49145508]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>spectrum</span></div><div class='xr-var-dims'>(trainId, newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>941.8 960.7 ... 1.302e+03 1.319e+03</div><input id='attrs-8c035164-92e3-4db0-acc8-56ab5e973804' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-8c035164-92e3-4db0-acc8-56ab5e973804' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7867ff0c-acc0-4949-925e-cd93c0083453' class='xr-var-data-in' type='checkbox'><label for='data-7867ff0c-acc0-4949-925e-cd93c0083453' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 941.7582056 ,  960.74608693,  985.17661157, ..., 1429.04862315,\n",
+       "        1681.0324707 , 1465.49145508]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>spectrum</span></div><div class='xr-var-dims'>(trainId, newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>941.8 960.7 ... 1.302e+03 1.319e+03</div><input id='attrs-a1420ab3-ffad-4e51-b223-c989757518e4' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-a1420ab3-ffad-4e51-b223-c989757518e4' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-68359592-9de0-46b7-aca6-bb6ebaf38090' class='xr-var-data-in' type='checkbox'><label for='data-68359592-9de0-46b7-aca6-bb6ebaf38090' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 941.7582056 ,  960.74608693,  985.17661157, ..., 1429.04862315,\n",
        "        1345.94592645, 1329.10501995],\n",
        "       [1078.21858296, 1053.6536341 , 1074.17755497, ..., 1328.01843447,\n",
        "        1424.27139815, 1363.56822749],\n",
@@ -538,7 +545,7 @@
        "       [1083.24688484, 1097.98004919, 1044.16246063, ..., 1231.70711372,\n",
        "        1391.47139815, 1360.74464259],\n",
        "       [1022.09499805, 1066.14703033, 1049.92566818, ..., 1362.59767976,\n",
-       "        1302.00630381, 1319.00973693]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>spectrum_nobl</span></div><div class='xr-var-dims'>(trainId, newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-25.84 -7.063 17.16 ... -41.9 -25.1</div><input id='attrs-532be090-d59b-4f00-b291-057411039b3f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-532be090-d59b-4f00-b291-057411039b3f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-aa04d020-6682-47fb-8c9e-09d023794e25' class='xr-var-data-in' type='checkbox'><label for='data-aa04d020-6682-47fb-8c9e-09d023794e25' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ -25.83894992,   -7.0628976 ,   17.15577088, ...,  113.9392577 ,\n",
+       "        1302.00630381, 1319.00973693]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>spectrum_nobl</span></div><div class='xr-var-dims'>(trainId, newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-25.84 -7.063 17.16 ... -41.9 -25.1</div><input id='attrs-ed11d1a2-cba0-4046-9a6b-6889cd3e5c24' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ed11d1a2-cba0-4046-9a6b-6889cd3e5c24' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6cb8430d-2ff4-4468-b8e1-123fdffa6ca5' class='xr-var-data-in' type='checkbox'><label for='data-6cb8430d-2ff4-4468-b8e1-123fdffa6ca5' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ -25.83894992,   -7.0628976 ,   17.15577088, ...,  113.9392577 ,\n",
        "          30.58408468,   13.49067472],\n",
        "       [ 132.95041047,  108.12852617,  128.39547866, ...,  -38.76048694,\n",
        "          57.18623863,   -3.82320306],\n",
@@ -550,7 +557,7 @@
        "       [  80.40434786,   94.90808737,   40.86104455, ..., -147.51415939,\n",
        "          11.97667647,  -19.02355706],\n",
        "       [ -34.85541266,    9.02183124,   -7.3743417 , ...,   18.90138573,\n",
-       "         -41.89831828,  -25.10323562]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-ad33363e-83bd-4ffb-bcc8-8471fcffce38' class='xr-section-summary-in' type='checkbox'  ><label for='section-ad33363e-83bd-4ffb-bcc8-8471fcffce38' class='xr-section-summary' >Attributes: <span>(12)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>runFolder :</span></dt><dd>/gpfs/exfel/exp/SCS/202202/p002953/raw/r0322</dd><dt><span>vbin: :</span></dt><dd>4</dd><dt><span>hbin :</span></dt><dd>1</dd><dt><span>startX :</span></dt><dd>1</dd><dt><span>endX :</span></dt><dd>2048</dd><dt><span>startY :</span></dt><dd>1</dd><dt><span>endY :</span></dt><dd>512</dd><dt><span>temperature :</span></dt><dd>-50.04199981689453</dd><dt><span>high_capacity :</span></dt><dd>0</dd><dt><span>exposure_s :</span></dt><dd>0.0004</dd><dt><span>gain :</span></dt><dd>2</dd><dt><span>photoelectrons_per_count :</span></dt><dd>2.05</dd></dl></div></li></ul></div></div>"
+       "         -41.89831828,  -25.10323562]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-95124dad-353a-48eb-8f49-7c93aa8446e1' class='xr-section-summary-in' type='checkbox'  ><label for='section-95124dad-353a-48eb-8f49-7c93aa8446e1' class='xr-section-summary' >Attributes: <span>(12)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>runFolder :</span></dt><dd>/gpfs/exfel/exp/SCS/202202/p002953/raw/r0322</dd><dt><span>vbin: :</span></dt><dd>4</dd><dt><span>hbin :</span></dt><dd>1</dd><dt><span>startX :</span></dt><dd>1</dd><dt><span>endX :</span></dt><dd>2048</dd><dt><span>startY :</span></dt><dd>1</dd><dt><span>endY :</span></dt><dd>512</dd><dt><span>temperature :</span></dt><dd>-50.04199981689453</dd><dt><span>high_capacity :</span></dt><dd>0</dd><dt><span>exposure_s :</span></dt><dd>0.0004</dd><dt><span>gain :</span></dt><dd>2</dd><dt><span>photoelectrons_per_count :</span></dt><dd>2.05</dd></dl></div></li></ul></div></div>"
       ],
       "text/plain": [
        "<xarray.Dataset>\n",
@@ -1014,17 +1021,17 @@
        "    absorptionCoef_stderr  (newt_x) float64 0.5753 0.7357 2.077 ... 79.73 0.6494\n",
        "Attributes:\n",
        "    n_It:     618\n",
-       "    n_I0:     661</pre><div class='xr-wrap' hidden><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-ef098fd9-a7de-4f2b-8e8b-092b5ee1ad8f' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-ef098fd9-a7de-4f2b-8e8b-092b5ee1ad8f' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>newt_x</span>: 1500</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-99cba09a-47e0-40c9-b3fa-ccacea7f6862' class='xr-section-summary-in' type='checkbox'  checked><label for='section-99cba09a-47e0-40c9-b3fa-ccacea7f6862' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>newt_x</span></div><div class='xr-var-dims'>(newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>515.9 515.9 515.9 ... 553.7 553.8</div><input id='attrs-5fdbece8-ad46-490f-9081-1e2f07b49262' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5fdbece8-ad46-490f-9081-1e2f07b49262' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a9493f1f-6816-4758-b5cc-cfad7a87e745' class='xr-var-data-in' type='checkbox'><label for='data-a9493f1f-6816-4758-b5cc-cfad7a87e745' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([515.884589, 515.907651, 515.930715, ..., 553.717729, 553.745216,\n",
-       "       553.772706])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-8c708732-489a-4653-b058-5894ab625d2f' class='xr-section-summary-in' type='checkbox'  checked><label for='section-8c708732-489a-4653-b058-5894ab625d2f' class='xr-section-summary' >Data variables: <span>(9)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>It</span></div><div class='xr-var-dims'>(newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>3.919 -2.476 ... 0.01703 -2.786</div><input id='attrs-a1b89e3a-d09d-4a4d-94b3-e63f044d31a7' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-a1b89e3a-d09d-4a4d-94b3-e63f044d31a7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a48a6fb3-55a8-4229-ab4c-f2c48ceee33c' class='xr-var-data-in' type='checkbox'><label for='data-a48a6fb3-55a8-4229-ab4c-f2c48ceee33c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 3.91925258, -2.47627339,  0.86810958, ...,  2.20337353,\n",
-       "        0.01703439, -2.78575572])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>It_std</span></div><div class='xr-var-dims'>(newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>46.04 43.49 44.08 ... 33.76 35.61</div><input id='attrs-f1a7c49a-6d46-4480-9695-3c7fe12fbcc3' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f1a7c49a-6d46-4480-9695-3c7fe12fbcc3' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-792b8c3a-ea9a-42c7-a75c-7b84d837b73c' class='xr-var-data-in' type='checkbox'><label for='data-792b8c3a-ea9a-42c7-a75c-7b84d837b73c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([46.04029465, 43.49329739, 44.08335856, ..., 34.90163389,\n",
-       "       33.7584539 , 35.61211943])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>It_stderr</span></div><div class='xr-var-dims'>(newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.852 1.75 1.773 ... 1.358 1.433</div><input id='attrs-610d9cff-f4c6-447e-a849-54b07f54e7a7' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-610d9cff-f4c6-447e-a849-54b07f54e7a7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-acce4c76-751d-45c6-b1ca-2a83055bb35d' class='xr-var-data-in' type='checkbox'><label for='data-acce4c76-751d-45c6-b1ca-2a83055bb35d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([1.85201226, 1.749557  , 1.77329274, ..., 1.40394961, 1.35796417,\n",
-       "       1.43252953])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>I0</span></div><div class='xr-var-dims'>(newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>8.241 -13.35 ... 1.327 -4.828</div><input id='attrs-3865f01e-b433-49f7-a071-22305487d633' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-3865f01e-b433-49f7-a071-22305487d633' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9972c5cc-dce2-4fe9-9721-bfd913e0dfcf' class='xr-var-data-in' type='checkbox'><label for='data-9972c5cc-dce2-4fe9-9721-bfd913e0dfcf' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  8.24135673, -13.35154356,  -7.25066757, ...,   2.16029973,\n",
-       "         1.32716927,  -4.8278338 ])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>I0_std</span></div><div class='xr-var-dims'>(newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>46.04 43.49 44.08 ... 33.76 35.61</div><input id='attrs-e710d0c9-c747-4f48-a7f8-38d857ff9a0a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e710d0c9-c747-4f48-a7f8-38d857ff9a0a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-384c6474-ef65-4229-bf20-b8ffbb7e6af5' class='xr-var-data-in' type='checkbox'><label for='data-384c6474-ef65-4229-bf20-b8ffbb7e6af5' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([46.04029465, 43.49329739, 44.08335856, ..., 34.90163389,\n",
-       "       33.7584539 , 35.61211943])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>I0_stderr</span></div><div class='xr-var-dims'>(newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.852 1.75 1.773 ... 1.358 1.433</div><input id='attrs-c1bb24f3-73d5-4514-96c7-01ae757bf286' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-c1bb24f3-73d5-4514-96c7-01ae757bf286' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9f2484f0-9e4e-4894-b1be-785a8a48b7d1' class='xr-var-data-in' type='checkbox'><label for='data-9f2484f0-9e4e-4894-b1be-785a8a48b7d1' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([1.85201226, 1.749557  , 1.77329274, ..., 1.40394961, 1.35796417,\n",
-       "       1.43252953])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>absorptionCoef</span></div><div class='xr-var-dims'>(newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.7433 1.685 nan ... 4.356 0.5499</div><input id='attrs-ff1b7c90-ae8a-4ea5-a070-cbe06cc8ff34' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ff1b7c90-ae8a-4ea5-a070-cbe06cc8ff34' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9efb602a-921f-43ad-afa2-447dd597c401' class='xr-var-data-in' type='checkbox'><label for='data-9efb602a-921f-43ad-afa2-447dd597c401' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0.74326401,  1.68487723,         nan, ..., -0.01974263,\n",
-       "        4.35556914,  0.54987869])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>absorptionCoef_std</span></div><div class='xr-var-dims'>(newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>14.46 18.34 ... 1.982e+03 16.35</div><input id='attrs-03de1ecf-904b-4bc0-b9a8-3ae9671b3043' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-03de1ecf-904b-4bc0-b9a8-3ae9671b3043' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8005ff8a-447a-4034-8f36-a82281456b44' class='xr-var-data-in' type='checkbox'><label for='data-8005ff8a-447a-4034-8f36-a82281456b44' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  14.46147913,   18.33875578,   51.70064703, ...,   28.2276812 ,\n",
-       "       1982.11422807,   16.35167582])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>absorptionCoef_stderr</span></div><div class='xr-var-dims'>(newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.5753 0.7357 ... 79.73 0.6494</div><input id='attrs-5aaf1f40-d216-47d8-8785-ea78f696bd01' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5aaf1f40-d216-47d8-8785-ea78f696bd01' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e5f045b6-8b88-4cc9-8422-ffaf764debb2' class='xr-var-data-in' type='checkbox'><label for='data-e5f045b6-8b88-4cc9-8422-ffaf764debb2' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0.57525382,  0.73570573,  2.07731818, ...,  1.10989227,\n",
-       "       79.73145801,  0.64938941])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-5b8ba1d9-4fc2-4492-81c2-9b8ff996525f' class='xr-section-summary-in' type='checkbox'  checked><label for='section-5b8ba1d9-4fc2-4492-81c2-9b8ff996525f' class='xr-section-summary' >Attributes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>n_It :</span></dt><dd>618</dd><dt><span>n_I0 :</span></dt><dd>661</dd></dl></div></li></ul></div></div>"
+       "    n_I0:     661</pre><div class='xr-wrap' hidden><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-0e04ddae-5aeb-4aa1-b7ec-cc06f1a95dae' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-0e04ddae-5aeb-4aa1-b7ec-cc06f1a95dae' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>newt_x</span>: 1500</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-dc05ddc3-c27f-4af7-a494-7215db5757d2' class='xr-section-summary-in' type='checkbox'  checked><label for='section-dc05ddc3-c27f-4af7-a494-7215db5757d2' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>newt_x</span></div><div class='xr-var-dims'>(newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>515.9 515.9 515.9 ... 553.7 553.8</div><input id='attrs-9c0236e8-924b-40c0-8d42-d16cd5818d6d' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-9c0236e8-924b-40c0-8d42-d16cd5818d6d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9b5a5435-f3d6-4655-ae39-eeb04a189d28' class='xr-var-data-in' type='checkbox'><label for='data-9b5a5435-f3d6-4655-ae39-eeb04a189d28' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([515.884589, 515.907651, 515.930715, ..., 553.717729, 553.745216,\n",
+       "       553.772706])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-a0a226f7-e7a9-4c06-b464-e1c8e55eba49' class='xr-section-summary-in' type='checkbox'  checked><label for='section-a0a226f7-e7a9-4c06-b464-e1c8e55eba49' class='xr-section-summary' >Data variables: <span>(9)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>It</span></div><div class='xr-var-dims'>(newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>3.919 -2.476 ... 0.01703 -2.786</div><input id='attrs-570dd366-3deb-45f1-865d-95bbcc58888b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-570dd366-3deb-45f1-865d-95bbcc58888b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-031feb4d-f9d7-490e-9d8a-44301a97b89b' class='xr-var-data-in' type='checkbox'><label for='data-031feb4d-f9d7-490e-9d8a-44301a97b89b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 3.91925258, -2.47627339,  0.86810958, ...,  2.20337353,\n",
+       "        0.01703439, -2.78575572])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>It_std</span></div><div class='xr-var-dims'>(newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>46.04 43.49 44.08 ... 33.76 35.61</div><input id='attrs-5125a0be-6c07-4c4c-9fe3-658770eaddc6' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5125a0be-6c07-4c4c-9fe3-658770eaddc6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1a5ad676-c5ec-4ddd-b5bd-55148dbb17b7' class='xr-var-data-in' type='checkbox'><label for='data-1a5ad676-c5ec-4ddd-b5bd-55148dbb17b7' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([46.04029465, 43.49329739, 44.08335856, ..., 34.90163389,\n",
+       "       33.7584539 , 35.61211943])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>It_stderr</span></div><div class='xr-var-dims'>(newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.852 1.75 1.773 ... 1.358 1.433</div><input id='attrs-75851dab-2faa-4981-91cb-bd8c087d0dbc' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-75851dab-2faa-4981-91cb-bd8c087d0dbc' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2936991d-e76b-43a2-b322-d597082ad54d' class='xr-var-data-in' type='checkbox'><label for='data-2936991d-e76b-43a2-b322-d597082ad54d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([1.85201226, 1.749557  , 1.77329274, ..., 1.40394961, 1.35796417,\n",
+       "       1.43252953])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>I0</span></div><div class='xr-var-dims'>(newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>8.241 -13.35 ... 1.327 -4.828</div><input id='attrs-750df60c-05f5-4f64-8ede-a86765c6358b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-750df60c-05f5-4f64-8ede-a86765c6358b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ae220cff-1378-44df-b7c9-aeeac3f4737b' class='xr-var-data-in' type='checkbox'><label for='data-ae220cff-1378-44df-b7c9-aeeac3f4737b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  8.24135673, -13.35154356,  -7.25066757, ...,   2.16029973,\n",
+       "         1.32716927,  -4.8278338 ])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>I0_std</span></div><div class='xr-var-dims'>(newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>46.04 43.49 44.08 ... 33.76 35.61</div><input id='attrs-fb41db74-e5d9-45c1-8e8c-60a12475e548' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-fb41db74-e5d9-45c1-8e8c-60a12475e548' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-72470b6c-5426-4ef3-9219-ebde3381a750' class='xr-var-data-in' type='checkbox'><label for='data-72470b6c-5426-4ef3-9219-ebde3381a750' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([46.04029465, 43.49329739, 44.08335856, ..., 34.90163389,\n",
+       "       33.7584539 , 35.61211943])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>I0_stderr</span></div><div class='xr-var-dims'>(newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.852 1.75 1.773 ... 1.358 1.433</div><input id='attrs-58b8f779-8f11-4883-aedd-246a970980f5' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-58b8f779-8f11-4883-aedd-246a970980f5' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-edb99945-4fae-41e7-a00a-b483bb0c4608' class='xr-var-data-in' type='checkbox'><label for='data-edb99945-4fae-41e7-a00a-b483bb0c4608' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([1.85201226, 1.749557  , 1.77329274, ..., 1.40394961, 1.35796417,\n",
+       "       1.43252953])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>absorptionCoef</span></div><div class='xr-var-dims'>(newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.7433 1.685 nan ... 4.356 0.5499</div><input id='attrs-b11ba64b-d2f6-4c4b-a921-b3d433d03fb4' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b11ba64b-d2f6-4c4b-a921-b3d433d03fb4' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-15d984b8-deff-4bbb-a859-2b71c6ecc1b0' class='xr-var-data-in' type='checkbox'><label for='data-15d984b8-deff-4bbb-a859-2b71c6ecc1b0' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0.74326401,  1.68487723,         nan, ..., -0.01974263,\n",
+       "        4.35556914,  0.54987869])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>absorptionCoef_std</span></div><div class='xr-var-dims'>(newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>14.46 18.34 ... 1.982e+03 16.35</div><input id='attrs-9b94b363-55a2-43b0-9fa9-9b3733f3b85e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-9b94b363-55a2-43b0-9fa9-9b3733f3b85e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-adb05be8-cbfe-48dd-a600-b7b28bb207ce' class='xr-var-data-in' type='checkbox'><label for='data-adb05be8-cbfe-48dd-a600-b7b28bb207ce' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  14.46147913,   18.33875578,   51.70064703, ...,   28.2276812 ,\n",
+       "       1982.11422807,   16.35167582])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>absorptionCoef_stderr</span></div><div class='xr-var-dims'>(newt_x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.5753 0.7357 ... 79.73 0.6494</div><input id='attrs-d9446770-565b-4714-998f-c30f41466fca' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-d9446770-565b-4714-998f-c30f41466fca' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-94143c17-fba3-4efa-a236-1c0189cdc060' class='xr-var-data-in' type='checkbox'><label for='data-94143c17-fba3-4efa-a236-1c0189cdc060' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0.57525382,  0.73570573,  2.07731818, ...,  1.10989227,\n",
+       "       79.73145801,  0.64938941])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-06300cbf-4dd4-4c91-b053-0c4871e00b4d' class='xr-section-summary-in' type='checkbox'  checked><label for='section-06300cbf-4dd4-4c91-b053-0c4871e00b4d' class='xr-section-summary' >Attributes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>n_It :</span></dt><dd>618</dd><dt><span>n_I0 :</span></dt><dd>661</dd></dl></div></li></ul></div></div>"
       ],
       "text/plain": [
        "<xarray.Dataset>\n",
@@ -1115,7 +1122,7 @@
     {
      "data": {
       "text/plain": [
-       "<matplotlib.collections.QuadMesh at 0x2b8e62faea20>"
+       "<matplotlib.collections.QuadMesh at 0x2aeb0cbfb828>"
       ]
      },
      "execution_count": 9,
@@ -1199,7 +1206,7 @@
    ],
    "source": [
     "roi1 = [30, 430]\n",
-    "roi2 = [960,1540]\n",
+    "roi2 = [960, 1540]\n",
     "ds['sum1'] = ds['newton'].isel(newt_x=slice(*roi1)).sum(dim=['newt_x', 'newt_y'])\n",
     "ds['sum2'] = ds['newton'].isel(newt_x=slice(*roi2)).sum(dim=['newt_x', 'newt_y'])\n",
     "tb.knife_edge(ds, axisKey='chem_X', signalKey='sum1', plot=True) # color 1\n",
diff --git a/doc/changelog.rst b/doc/changelog.rst
index 3551efb..0281edd 100644
--- a/doc/changelog.rst
+++ b/doc/changelog.rst
@@ -26,6 +26,7 @@ unreleased
     -  Add reflectivity routine :mr:`218`
     -  Possibility to extract run values of mnemonics :mr:`220`
     -  Add get_undulator_config function :mr:`225`
+    -  Add Viking spectrometer analysis class :mr:`240`
 
 1.6.0
 -----
diff --git a/doc/howtos.rst b/doc/howtos.rst
index e285ab9..9fd2581 100644
--- a/doc/howtos.rst
+++ b/doc/howtos.rst
@@ -169,5 +169,9 @@ Point detectors
 ---------------
 Detectors that produce one point per pulse, or 0D detectors, are all handled in a similar way. Such detectors are, for instance, the X-ray Gas Monitor (XGM), the Transmitted Intensity Monitor (TIM), the electron Bunch Arrival Monitor (BAM) or the photo diodes monitoring the PP laser.
 
+Viking spectrometer
+-------------------
+
+* :doc:`Analysis of Viking spectrometer data <Analysis_of_Viking_spectrometer_data>`.
 
 .. _pyFAI: https://pyfai.readthedocs.io
-- 
GitLab