From 136f5dacf77fee34162a529e82ee9d8621512613 Mon Sep 17 00:00:00 2001 From: Cyril Danilevski <cydanil@gmail.com> Date: Thu, 12 Aug 2021 21:33:28 +0200 Subject: [PATCH] Remove driver=core from LPD notebooks --- notebooks/LPD/Characterize_LPD_GAIN_CI_per_pixel_NBC.ipynb | 4 ++-- notebooks/LPD/LPD_Correct_and_Verify.ipynb | 2 +- notebooks/LPD/LPD_FlatField_Radial_per_pixel_CI_NBC.ipynb | 2 +- notebooks/LPD/playground/Characterize_LPD_GAIN_CI.ipynb | 4 ++-- notebooks/LPD/playground/LPDChar_Darks.ipynb | 2 +- notebooks/LPD/playground/LPD_Batch_Cal.ipynb | 4 ++-- notebooks/LPD/playground/LPD_FlatField_Radial.ipynb | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/notebooks/LPD/Characterize_LPD_GAIN_CI_per_pixel_NBC.ipynb b/notebooks/LPD/Characterize_LPD_GAIN_CI_per_pixel_NBC.ipynb index e52ca2afa..0cdc02eb4 100644 --- a/notebooks/LPD/Characterize_LPD_GAIN_CI_per_pixel_NBC.ipynb +++ b/notebooks/LPD/Characterize_LPD_GAIN_CI_per_pixel_NBC.ipynb @@ -342,7 +342,7 @@ " def read_fun(filename, channel):\n", " \"\"\" A reader function used by pyDetLib\n", " \"\"\"\n", - " infile = h5py.File(filename, \"r\", driver=\"core\")\n", + " infile = h5py.File(filename, \"r\")\n", " imarr = infile[\"/data\".format(channel)]\n", " im = np.array(imarr)\n", " infile.close()\n", @@ -1515,7 +1515,7 @@ " def read_fun(filename, channel):\n", " \"\"\" A reader function used by pyDetLib\n", " \"\"\"\n", - " infile = h5py.File(filename, \"r\", driver=\"core\")\n", + " infile = h5py.File(filename, \"r\")\n", " imarr = infile[\"/data\".format(channel)]\n", " im = np.array(imarr)\n", " infile.close()\n", diff --git a/notebooks/LPD/LPD_Correct_and_Verify.ipynb b/notebooks/LPD/LPD_Correct_and_Verify.ipynb index 4c2fafc52..c4ec0d78d 100644 --- a/notebooks/LPD/LPD_Correct_and_Verify.ipynb +++ b/notebooks/LPD/LPD_Correct_and_Verify.ipynb @@ -269,7 +269,7 @@ " reason = \"\"\n", " filename, filename_out, channel, karabo_da, qm = inp\n", "\n", - " infile = h5py.File(filename, \"r\", driver=\"core\")\n", + " infile = h5py.File(filename, \"r\")\n", " outfile = h5py.File(filename_out, \"w\")\n", " \n", " # LPD correction requires path without the leading \"/\"\"\n", diff --git a/notebooks/LPD/LPD_FlatField_Radial_per_pixel_CI_NBC.ipynb b/notebooks/LPD/LPD_FlatField_Radial_per_pixel_CI_NBC.ipynb index 33522e672..4075ffbfa 100644 --- a/notebooks/LPD/LPD_FlatField_Radial_per_pixel_CI_NBC.ipynb +++ b/notebooks/LPD/LPD_FlatField_Radial_per_pixel_CI_NBC.ipynb @@ -244,7 +244,7 @@ " \n", " if rf is not None:\n", " \n", - " infile = h5py.File(rf, \"r\", driver=\"core\")\n", + " infile = h5py.File(rf, \"r\")\n", " raw.append(np.array(infile[\"/INSTRUMENT/FXE_DET_LPD1M-1/DET/{}CH0:xtdf/image/data\".format(i)][:max_images,0,...]))\n", " infile.close()\n", "\n", diff --git a/notebooks/LPD/playground/Characterize_LPD_GAIN_CI.ipynb b/notebooks/LPD/playground/Characterize_LPD_GAIN_CI.ipynb index 523b9f9d1..1e04f5f37 100644 --- a/notebooks/LPD/playground/Characterize_LPD_GAIN_CI.ipynb +++ b/notebooks/LPD/playground/Characterize_LPD_GAIN_CI.ipynb @@ -340,7 +340,7 @@ " def read_fun(filename, channel):\n", " \"\"\" A reader function used by pyDetLib\n", " \"\"\"\n", - " infile = h5py.File(filename, \"r\", driver=\"core\")\n", + " infile = h5py.File(filename, \"r\")\n", " imarr = infile[\"/data\".format(channel)]\n", " im = np.array(imarr)\n", " infile.close()\n", @@ -1049,7 +1049,7 @@ " def read_fun(filename, channel):\n", " \"\"\" A reader function used by pyDetLib\n", " \"\"\"\n", - " infile = h5py.File(filename, \"r\", driver=\"core\")\n", + " infile = h5py.File(filename, \"r\")\n", " imarr = infile[\"/data\".format(channel)]\n", " im = np.array(imarr)\n", " infile.close()\n", diff --git a/notebooks/LPD/playground/LPDChar_Darks.ipynb b/notebooks/LPD/playground/LPDChar_Darks.ipynb index 73b4eb0fd..919fa13cb 100644 --- a/notebooks/LPD/playground/LPDChar_Darks.ipynb +++ b/notebooks/LPD/playground/LPDChar_Darks.ipynb @@ -331,7 +331,7 @@ " filename, filename_out, channel = inp\n", " thresholds_offset_hard, thresholds_offset_sigma, thresholds_noise_hard, thresholds_noise_sigma = bp_thresh \n", "\n", - " infile = h5py.File(filename, \"r\", driver=\"core\")\n", + " infile = h5py.File(filename, \"r\")\n", " im = np.array(infile[\"/INSTRUMENT/FXE_DET_LPD1M-1/DET/{}CH0:xtdf/image/data\".format(channel)][skip_first_ntrains*cells:,...])\n", " cellid = np.squeeze(np.array(infile[\"/INSTRUMENT/FXE_DET_LPD1M-1/DET/{}CH0:xtdf/image/cellId\".format(channel)][skip_first_ntrains*cells:,...]))\n", " infile.close()\n", diff --git a/notebooks/LPD/playground/LPD_Batch_Cal.ipynb b/notebooks/LPD/playground/LPD_Batch_Cal.ipynb index 1782700e6..7d83accb6 100644 --- a/notebooks/LPD/playground/LPD_Batch_Cal.ipynb +++ b/notebooks/LPD/playground/LPD_Batch_Cal.ipynb @@ -245,7 +245,7 @@ " \n", " filename, filename_out, channel, offset, rel_gain, mask, flatfield = inp\n", "\n", - " infile = h5py.File(filename, \"r\", driver=\"core\")\n", + " infile = h5py.File(filename, \"r\")\n", " im = np.array(infile[\"/INSTRUMENT/FXE_DET_LPD1M-1/DET/{}CH0:xtdf/image/data\".format(channel)][:10*cells, ...])\n", " cells = np.squeeze(np.array(infile[\"/INSTRUMENT/FXE_DET_LPD1M-1/DET/{}CH0:xtdf/image/cellId\".format(channel)][:10*cells, ...]))\n", "\n", @@ -253,7 +253,7 @@ " dont_copy = [\"INSTRUMENT/FXE_DET_LPD1M-1/DET/{}CH0:xtdf/image/{}\".format(channel, do)\n", " for do in dont_copy]\n", "\n", - " outfile = h5py.File(filename_out, \"w\", driver=\"core\")\n", + " outfile = h5py.File(filename_out, \"w\")\n", " def visitor(k, item):\n", " if k not in dont_copy:\n", " if isinstance(item, h5py.Group):\n", diff --git a/notebooks/LPD/playground/LPD_FlatField_Radial.ipynb b/notebooks/LPD/playground/LPD_FlatField_Radial.ipynb index 732ce8cd9..6689f001f 100644 --- a/notebooks/LPD/playground/LPD_FlatField_Radial.ipynb +++ b/notebooks/LPD/playground/LPD_FlatField_Radial.ipynb @@ -299,7 +299,7 @@ " \n", " filename, filename_out, channel, offset, rel_gain, mask = inp\n", "\n", - " infile = h5py.File(filename, \"r\", driver=\"core\")\n", + " infile = h5py.File(filename, \"r\")\n", " count = np.squeeze(infile[\"/INDEX/FXE_DET_LPD1M-1/DET/{}CH0:xtdf/image/count\".format(channel)])\n", " first = np.squeeze(infile[\"/INDEX/FXE_DET_LPD1M-1/DET/{}CH0:xtdf/image/first\".format(channel)])\n", " last_index = int(first[count != 0][-1]+count[count != 0][-1])\n", @@ -313,7 +313,7 @@ " dont_copy = [\"INSTRUMENT/FXE_DET_LPD1M-1/DET/{}CH0:xtdf/image/{}\".format(channel, do)\n", " for do in dont_copy]\n", "\n", - " outfile = h5py.File(filename_out, \"w\", driver=\"core\")\n", + " outfile = h5py.File(filename_out, \"w\")\n", " def visitor(k, item):\n", " if k not in dont_copy:\n", " if isinstance(item, h5py.Group):\n", -- GitLab