From cd71d0c222eeb81feba2e0ac43c0eb1706327cb9 Mon Sep 17 00:00:00 2001 From: Nuno Duarte <duarten@max-exfl015.desy.de> Date: Fri, 1 Apr 2022 18:25:49 +0200 Subject: [PATCH] final minor reviews --- notebooks/ePix100/Characterize_Darks_ePix100_NBC.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/notebooks/ePix100/Characterize_Darks_ePix100_NBC.ipynb b/notebooks/ePix100/Characterize_Darks_ePix100_NBC.ipynb index f9884a3fc..3c2a3f70e 100644 --- a/notebooks/ePix100/Characterize_Darks_ePix100_NBC.ipynb +++ b/notebooks/ePix100/Characterize_Darks_ePix100_NBC.ipynb @@ -136,8 +136,8 @@ "source": [ "# Read sensor size\n", "sensor_size = run_dir[instrument_src, 'data.image.dims'].as_single_value(reduce_by='first') # (x=768, y=708) expected\n", - "sensor_size = sensor_size[:2] # data.image.dims for old data is [768, 708, 1]\n", - "assert np.allclose(sensor_size, np.array([768, 708])), 'Unexpected sensor dimensions.' \n", + "sensor_size = sensor_size[sensor_size != 1] # data.image.dims for old data is [768, 708, 1]\n", + "assert np.array_equal(sensor_size, [768, 708]), 'Unexpected sensor dimensions.' \n", "\n", "# Path to pixels ADC values\n", "pixels_src = (instrument_src, \"data.image.pixels\")\n", @@ -167,7 +167,7 @@ " \n", "# Read temperature \n", "if fix_temperature == -1:\n", - " temperature = np.mean(run_dir.get_array(instrument_src,\"data.backTemp\").values)/100.\n", + " temperature = run_dir[instrument_src, 'data.backTemp'].ndarray().mean()/100.\n", " temperature_k = temperature + 273.15\n", " temp_str_add = ''\n", "else:\n", -- GitLab