From 5cc5d9425adb47fc210919e5140d91b880ab9b10 Mon Sep 17 00:00:00 2001 From: Steffen Hauf <steffen.hauf@xfel.eu> Date: Mon, 1 Jul 2019 10:07:21 +0200 Subject: [PATCH] Include feedback from review --- notebooks/DSSC/Characterize_DSSC_Darks_NBC.ipynb | 6 ++---- notebooks/DSSC/DSSC_Correct_and_Verify.ipynb | 12 +++++------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/notebooks/DSSC/Characterize_DSSC_Darks_NBC.ipynb b/notebooks/DSSC/Characterize_DSSC_Darks_NBC.ipynb index f6d083c2f..6e6da8c8c 100644 --- a/notebooks/DSSC/Characterize_DSSC_Darks_NBC.ipynb +++ b/notebooks/DSSC/Characterize_DSSC_Darks_NBC.ipynb @@ -215,8 +215,6 @@ "\n", " if cells == 0:\n", " cells = get_num_cells(filename, loc, channel)\n", - "\n", - " #print(\"Using {} memory cells\".format(cells))\n", " \n", " thresholds_offset_hard, thresholds_offset_sigma, thresholds_noise_hard, thresholds_noise_sigma = bp_thresh \n", "\n", @@ -245,7 +243,7 @@ " im = np.rollaxis(im, 2)\n", " im = np.rollaxis(im, 2, 1)\n", "\n", - " mcells = cells #max(cells, np.max(cellIds)+1)\n", + " mcells = cells\n", " offset = np.zeros((im.shape[0], im.shape[1], mcells))\n", " noise = np.zeros((im.shape[0], im.shape[1], mcells))\n", " \n", @@ -306,7 +304,7 @@ " (thresholds_offset_hard, thresholds_offset_sigma,\n", " thresholds_noise_hard, thresholds_noise_sigma), rawversion, loc)\n", " results = list(map(p, inp))\n", - " #results = view.map_sync(p, inp)\n", + " \n", " for ii, r in enumerate(results):\n", " i = modules[ii]\n", " offset, noise, bp, thiscell = r\n", diff --git a/notebooks/DSSC/DSSC_Correct_and_Verify.ipynb b/notebooks/DSSC/DSSC_Correct_and_Verify.ipynb index afa707fb4..d3782ce55 100644 --- a/notebooks/DSSC/DSSC_Correct_and_Verify.ipynb +++ b/notebooks/DSSC/DSSC_Correct_and_Verify.ipynb @@ -174,7 +174,7 @@ " for i in range(16):\n", " t1 = gf[\"Q{}M{}\"]\n", "\n", - " if True: #try:\n", + " try:\n", " if i < 8:\n", " dx = -512\n", " if i > 3:\n", @@ -208,9 +208,8 @@ " combined[:, my*128+dy:(my+1)*128+dy,\n", " mx*512-dx:(mx+1)*512-dx] = np.rollaxis(d[i],2,1)[:,::-1,:]\n", " dy += 30\n", - " #except:\n", - "\n", - " # continue\n", + " except:\n", + " continue\n", "\n", " \n", " return combined" @@ -614,7 +613,6 @@ " try:\n", "\n", " rf, cf = ff\n", - " #print(cf, i)\n", " if rf is None:\n", " \n", " raise Exception(\"File not present\")\n", @@ -647,7 +645,7 @@ "source": [ "def combine_stack(d, sdim):\n", " combined = np.zeros((sdim, 1300,1300), np.float32)\n", - " combined[...] = 0#np.nan\n", + " combined[...] = 0\n", " \n", " dy = 0\n", " quad_pos = [\n", @@ -664,7 +662,7 @@ " \n", " for i in range(16):\n", " mi = i\n", - " #if i // 4 == 0 or i // 4 == 1:\n", + " \n", " mi = 3-(i%4)\n", " mp = gf[\"Q{}/M{}/Position\".format(i//4+1, mi%4+1)][()]\n", " t1 = gf[\"Q{}/M{}/T01/Position\".format(i//4+1, i%4+1)][()]\n", -- GitLab