diff --git a/notebooks/AGIPD/Chracterize_AGIPD_Gain_PC_NBC.ipynb b/notebooks/AGIPD/Chracterize_AGIPD_Gain_PC_NBC.ipynb index c6dc6f9076bd9737aa82366d09e8c02e98090ccf..a0096568611e77ae11a8822a2b58121d81bc9086 100644 --- a/notebooks/AGIPD/Chracterize_AGIPD_Gain_PC_NBC.ipynb +++ b/notebooks/AGIPD/Chracterize_AGIPD_Gain_PC_NBC.ipynb @@ -194,7 +194,7 @@ " mem_cells = cells # avoid setting twice\n", " print(\"Memory cells set from file: {}\".format(cells))\n", " \n", - " f = h5py.File(fname, 'r', driver='core')\n", + " f = h5py.File(fname, 'r')\n", " if rawversion == 2:\n", " count = np.squeeze(f[\"/INDEX/{}/DET/{}CH0:xtdf/image/count\".format(karabo_id, channel)]) \n", " bursts_per_file.append(np.count_nonzero(count))\n", diff --git a/notebooks/AGIPD/playground/AGIPD-Gain_Distributions.ipynb b/notebooks/AGIPD/playground/AGIPD-Gain_Distributions.ipynb index b32c92dc87267a769589430899a411a583a54b09..c01346307f46760ca8b2032951ebec6e5480e86a 100644 --- a/notebooks/AGIPD/playground/AGIPD-Gain_Distributions.ipynb +++ b/notebooks/AGIPD/playground/AGIPD-Gain_Distributions.ipynb @@ -151,7 +151,7 @@ " module, file = mf\n", " infile = None\n", " try:\n", - " infile = h5py.File(file, \"r\", driver=\"core\")\n", + " infile = h5py.File(file, \"r\")\n", " gains = infile[\"/INSTRUMENT/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/gain\".format(module)][()]\n", " images = infile[\"/INSTRUMENT/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/data\".format(module)][()]\n", " cells = infile[\"/INSTRUMENT/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/cellId\".format(module)][()]\n", diff --git a/notebooks/AGIPD/playground/AGIPD_SingleM_test_Dark.ipynb b/notebooks/AGIPD/playground/AGIPD_SingleM_test_Dark.ipynb index 533d0f36e367668b26e86611cc63d272c5d75d5e..1e10696d04d144b8ef84f75c2e2d51763f4a232f 100644 --- a/notebooks/AGIPD/playground/AGIPD_SingleM_test_Dark.ipynb +++ b/notebooks/AGIPD/playground/AGIPD_SingleM_test_Dark.ipynb @@ -263,7 +263,7 @@ " thresholds_offset_hard = thresholds_offset[gg]\n", " thresholds_noise_hard = thresholds_noise[gg]\n", " \n", - " infile = h5py.File(filename, \"r\", driver=\"core\")\n", + " infile = h5py.File(filename, \"r\")\n", " count = np.squeeze(infile[f\"/INDEX/{loc}/DET/{channel}CH0:xtdf/image/count\"])\n", " first = np.squeeze(infile[f\"/INDEX/{loc}/DET/{channel}CH0:xtdf/image/first\"])\n", "\n", diff --git a/notebooks/AGIPD/playground/Characterize_AGIPD_CI.ipynb b/notebooks/AGIPD/playground/Characterize_AGIPD_CI.ipynb index e52e43388cd5982a4ca36d337d29a2062a0b1777..2809e3bc2f6df52a01f0ede96c5aa982ad6af1d2 100644 --- a/notebooks/AGIPD/playground/Characterize_AGIPD_CI.ipynb +++ b/notebooks/AGIPD/playground/Characterize_AGIPD_CI.ipynb @@ -152,7 +152,7 @@ " fname = path_tmpl.format(path, mod, temp_p, mod, asic)\n", " f = None\n", " try:\n", - " f = h5py.File(fname, \"r\", driver=\"core\")\n", + " f = h5py.File(fname, \"r\")\n", " offset = f[\"/offset/mean\"]\n", " offset = np.moveaxis(offset, 0, 3)\n", " offsets.append(offset)\n", diff --git a/notebooks/AGIPD/playground/Characterize_AGIPD_Dark-batch.ipynb b/notebooks/AGIPD/playground/Characterize_AGIPD_Dark-batch.ipynb index 0f9d8caa2a81365df09791572e7667543d0d03b5..d5db5d1cc653f059d2e20c8f066135cd66cbe5a1 100644 --- a/notebooks/AGIPD/playground/Characterize_AGIPD_Dark-batch.ipynb +++ b/notebooks/AGIPD/playground/Characterize_AGIPD_Dark-batch.ipynb @@ -244,7 +244,7 @@ " \n", " filename, filename_out, channel = inp\n", "\n", - " infile = h5py.File(filename, \"r\", driver=\"core\")\n", + " infile = h5py.File(filename, \"r\")\n", " im = np.array(infile[\"/INSTRUMENT/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/data\".format(channel)])\n", " infile.close()\n", "\n", @@ -802,7 +802,7 @@ " fname = path_tmpl.format(path, mod, temp_p, mod, asic)\n", " f = None\n", " try:\n", - " f = h5py.File(fname, \"r\", driver=\"core\")\n", + " f = h5py.File(fname, \"r\")\n", " offset = f[\"/offset/mean\"]\n", " offset = np.moveaxis(offset, 0, 3)\n", " offsets.append(offset)\n", diff --git a/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_CompareXGM.ipynb b/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_CompareXGM.ipynb index 630e0ad154c57185789c1eacbe9fae09a88d165e..99cf1769ff8a2a11a3f879a638a1c10f865dcc9d 100644 --- a/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_CompareXGM.ipynb +++ b/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_CompareXGM.ipynb @@ -322,7 +322,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", " count = np.squeeze(infile[\"/INDEX/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/count\".format(channel)])\n", " first = np.squeeze(infile[\"/INDEX/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/first\".format(channel)])\n", " last_index = int(first[count != 0][-1]+count[count != 0][-1])\n", diff --git a/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_Darks.ipynb b/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_Darks.ipynb index 2b194138c118f893a4976e423883162bfa7e5bf4..c727917ffad3c39e14b10db1131663428bbe4e05 100644 --- a/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_Darks.ipynb +++ b/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_Darks.ipynb @@ -218,7 +218,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", " count = np.squeeze(infile[\"/INDEX/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/count\".format(channel)])\n", " first = np.squeeze(infile[\"/INDEX/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/first\".format(channel)])\n", " last_index = int(first[count != 0][-1]+count[count != 0][-1])\n", diff --git a/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_FlatFields.ipynb b/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_FlatFields.ipynb index 6c30947e3eedd228552af5bdb4b6eb63c22d5a8f..6f85912b2ad964897d7d1140820f924c57f8819a 100644 --- a/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_FlatFields.ipynb +++ b/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_FlatFields.ipynb @@ -268,7 +268,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", " count = np.squeeze(infile[\"/INDEX/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/count\".format(channel)])\n", " first = np.squeeze(infile[\"/INDEX/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/first\".format(channel)])\n", " last_index = int(first[count != 0][-1]+count[count != 0][-1])\n", @@ -442,7 +442,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", " count = np.squeeze(infile[\"/INDEX/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/count\".format(channel)])\n", " first = np.squeeze(infile[\"/INDEX/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/first\".format(channel)])\n", " last_index = int(first[count != 0][-1]+count[count != 0][-1])\n", @@ -951,7 +951,7 @@ " block_size = [64, 64]\n", " def read_fun(filename, channel):\n", " \n", - " infile = h5py.File(filename, \"r\", driver=\"core\")\n", + " infile = h5py.File(filename, \"r\")\n", " count = np.squeeze(infile[\"/INDEX/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/count\".format(channel)])\n", " first = np.squeeze(infile[\"/INDEX/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/first\".format(channel)])\n", " last_index = int(first[count != 0][-1]+count[count != 0][-1])\n", diff --git a/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_FlatFields_Coupling.ipynb b/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_FlatFields_Coupling.ipynb index 738892f6aa07ed9bce39b9cbecd01fbad504e009..5fb26460950230dbfa381d9aff838e50b8f3fc70 100644 --- a/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_FlatFields_Coupling.ipynb +++ b/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_FlatFields_Coupling.ipynb @@ -166,7 +166,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", " status = np.squeeze(infile[\"/INDEX/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/status\".format(channel)])\n", " last = np.squeeze(infile[\"/INDEX/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/last\".format(channel)])\n", " last_index = int(last[status != 0][-1])\n", diff --git a/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_FlatFields_NBC.ipynb b/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_FlatFields_NBC.ipynb index 49c2e334f2632847528d2b53fe2991a56c69e5cc..eb1807e2a01a34635b15f6a2fe70201ece96dd60 100644 --- a/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_FlatFields_NBC.ipynb +++ b/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_FlatFields_NBC.ipynb @@ -452,7 +452,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", " if rawversion == 2:\n", " count = np.squeeze(infile[\"/INDEX/{}_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/count\".format(instrument, channel)])\n", " first = np.squeeze(infile[\"/INDEX/{}_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/first\".format(instrument, channel)])\n", @@ -697,7 +697,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", " if rawversion == 2:\n", " count = np.squeeze(infile[\"/INDEX/{}_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/count\".format(instrument, channel)])\n", " first = np.squeeze(infile[\"/INDEX/{}_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/first\".format(instrument, channel)])\n", @@ -1293,7 +1293,7 @@ " \n", " def read_fun(filename, channel):\n", " \n", - " infile = h5py.File(filename, \"r\", driver=\"core\")\n", + " infile = h5py.File(filename, \"r\")\n", " if rawversion == 2:\n", " count = np.squeeze(infile[\"/INDEX/{}_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/count\".format(instrument, channel)])\n", " first = np.squeeze(infile[\"/INDEX/{}_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/first\".format(instrument, channel)])\n", diff --git a/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_Transition.ipynb b/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_Transition.ipynb index 846c32ee6f4d22aa8130280ec5bbe336d2d35e12..6629bd819f6bfbdcbbacf2e37be7fdd1051554c3 100644 --- a/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_Transition.ipynb +++ b/notebooks/AGIPD/playground/Characterize_AGIPD_Gain_Transition.ipynb @@ -169,7 +169,7 @@ " \"\"\" A reader function used by pyDetLib\n", " \"\"\"\n", " \n", - " infile = h5py.File(filename, \"r\", driver=\"core\")\n", + " infile = h5py.File(filename, \"r\")\n", " \n", " imarr = infile[\"/INSTRUMENT/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/data\".format(channel)]\n", " im = np.array(imarr)\n", @@ -257,7 +257,7 @@ " \"\"\" A reader function used by pyDetLib\n", " \"\"\"\n", " \n", - " infile = h5py.File(filename, \"r\", driver=\"core\")\n", + " infile = h5py.File(filename, \"r\")\n", " \n", " imarr = infile[\"/INSTRUMENT/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/data\".format(channel)]\n", " im = np.array(imarr)\n", diff --git a/notebooks/AGIPD/playground/Characterize_AGIPD_Pulse_Cell.ipynb b/notebooks/AGIPD/playground/Characterize_AGIPD_Pulse_Cell.ipynb index 12e85c75eb7bd0f960cdb3b8fb347c9cb59d9ff7..88604b13e8ec75f58c92d133da06c1c5d1c6465a 100644 --- a/notebooks/AGIPD/playground/Characterize_AGIPD_Pulse_Cell.ipynb +++ b/notebooks/AGIPD/playground/Characterize_AGIPD_Pulse_Cell.ipynb @@ -128,7 +128,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", " im = np.array(infile[\"/INSTRUMENT/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/data\".format(channel)][trains[0]*memory_cells:trains[1]*memory_cells,...]) \n", " carr = infile[\"/INSTRUMENT/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/cellId\".format(channel)][trains[0]*memory_cells:trains[1]*memory_cells]\n", " cells = np.squeeze(np.array(carr))\n", @@ -296,7 +296,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", " status = np.squeeze(infile[\"/INDEX/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/status\".format(channel)])\n", " last = np.squeeze(infile[\"/INDEX/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/last\".format(channel)])\n", " last_index = int(last[status != 0][-1])\n", @@ -563,7 +563,7 @@ " block_size = [64, 64]\n", " def read_fun(filename, channel):\n", " \n", - " infile = h5py.File(filename, \"r\", driver=\"core\")\n", + " infile = h5py.File(filename, \"r\")\n", " status = np.squeeze(infile[\"/INDEX/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/status\".format(channel)])\n", " last = np.squeeze(infile[\"/INDEX/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/last\".format(channel)])\n", " last_index = int(last[status != 0][-1])\n", diff --git a/notebooks/AGIPD/playground/Chracterize_AGIPD_Gain_PC.ipynb b/notebooks/AGIPD/playground/Chracterize_AGIPD_Gain_PC.ipynb index 9ab4817384bb4524de591afd24f15c15dd839371..f26d156ecbce5bc98347c79964f0cab4e3dd706a 100644 --- a/notebooks/AGIPD/playground/Chracterize_AGIPD_Gain_PC.ipynb +++ b/notebooks/AGIPD/playground/Chracterize_AGIPD_Gain_PC.ipynb @@ -129,7 +129,7 @@ " fname = os.path.join(path_temp.format(run),\n", " image_name_temp.format(run, channel, seq))\n", " print('Reading ',fname)\n", - " f = h5py.File(fname, 'r', driver='core')\n", + " f = h5py.File(fname, 'r')\n", " \n", " count = np.squeeze(f[\"/INDEX/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/count\".format(channel)])\n", " f.close()\n", @@ -204,7 +204,7 @@ " cfac = 2 if il_mode else 1\n", " def read_raw_data_file(fname, channel, cells = cells, cells_tot = cells, bursts = 250,\n", " skip_first_burst = True, first_burst_length = cells):\n", - " f = h5py.File(fname, 'r', driver='core')\n", + " f = h5py.File(fname, 'r')\n", " #print('Reading ',fname)\n", " image_path_temp = 'INSTRUMENT/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/data'\n", " cellID_path_temp = 'INSTRUMENT/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/cellId'\n", diff --git a/notebooks/AGIPD/playground/Chracterize_AGIPD_Gain_PC_KMeans.ipynb b/notebooks/AGIPD/playground/Chracterize_AGIPD_Gain_PC_KMeans.ipynb index cae7976f71953846dcfaefe98218693ce3ace0d7..d84131d761b07ed0155b24eba9ea0f53258ff590 100644 --- a/notebooks/AGIPD/playground/Chracterize_AGIPD_Gain_PC_KMeans.ipynb +++ b/notebooks/AGIPD/playground/Chracterize_AGIPD_Gain_PC_KMeans.ipynb @@ -159,7 +159,7 @@ " \n", " def read_raw_data_file(fname, channel, cells = 64, cells_tot = 64, bursts = 250,\n", " skip_first_burst = True, first_burst_length = 64):\n", - " f = h5py.File(fname, 'r', driver='core')\n", + " f = h5py.File(fname, 'r')\n", " print('Reading ',fname)\n", " image_path_temp = 'INSTRUMENT/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/data'\n", " cellID_path_temp = 'INSTRUMENT/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/cellId'\n", diff --git a/notebooks/AGIPD/playground/Chracterize_AGIPD_Gain_PC_mlearn.ipynb b/notebooks/AGIPD/playground/Chracterize_AGIPD_Gain_PC_mlearn.ipynb index 831dc4bd2145a533418e4e32a2bb358baba09dfd..22e9fb728eb75775b49bbaa21917a96ce8d46826 100644 --- a/notebooks/AGIPD/playground/Chracterize_AGIPD_Gain_PC_mlearn.ipynb +++ b/notebooks/AGIPD/playground/Chracterize_AGIPD_Gain_PC_mlearn.ipynb @@ -162,7 +162,7 @@ " fname = os.path.join(path_temp.format(run),\n", " image_name_temp.format(run, channel, seq))\n", " print('Reading ',fname)\n", - " f = h5py.File(fname, 'r', driver='core')\n", + " f = h5py.File(fname, 'r')\n", " if rawversion == 2:\n", " count = np.squeeze(f[\"/INDEX/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/count\".format(channel)]) \n", " bursts_per_file.append(np.count_nonzero(count))\n", @@ -196,7 +196,7 @@ " \n", " def read_raw_data_file(fname, channel, cells = cells, cells_tot = cells, bursts = 250,\n", " skip_first_burst = True, first_burst_length = cells):\n", - " f = h5py.File(fname, 'r', driver='core')\n", + " f = h5py.File(fname, 'r')\n", " \n", " #print('Reading ',fname)\n", " image_path_temp = 'INSTRUMENT/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/data'\n", diff --git a/notebooks/AGIPD/playground/Correct_AGIPD-Verify.ipynb b/notebooks/AGIPD/playground/Correct_AGIPD-Verify.ipynb index 1869958ccd923f3534e498679e281ac436de7b57..08c8d08250479e5d75bd73a03becec76e185bade 100644 --- a/notebooks/AGIPD/playground/Correct_AGIPD-Verify.ipynb +++ b/notebooks/AGIPD/playground/Correct_AGIPD-Verify.ipynb @@ -314,7 +314,7 @@ " \n", " filename, filename_out, channel, offset, base_offset, rel_gain, threshold, mask, mgh = inp\n", "\n", - " infile = h5py.File(filename, \"r\", driver=\"core\")\n", + " infile = h5py.File(filename, \"r\")\n", " count = np.squeeze(infile[\"/INDEX/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/count\".format(channel)])\n", " first = np.squeeze(infile[\"/INDEX/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/first\".format(channel)])\n", " last_index = int(first[count != 0][-1]+count[count != 0][-1])\n", @@ -333,7 +333,7 @@ " dont_copy = [\"INSTRUMENT/SPB_DET_AGIPD1M-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/AGIPD/playground/Correct_AGIPD-batch.ipynb b/notebooks/AGIPD/playground/Correct_AGIPD-batch.ipynb index 92daf90ca16df42d1f3acbccbc999ddde18990cf..2a9afd114288fc22316741265c6197327a6ec024 100644 --- a/notebooks/AGIPD/playground/Correct_AGIPD-batch.ipynb +++ b/notebooks/AGIPD/playground/Correct_AGIPD-batch.ipynb @@ -193,7 +193,7 @@ " \n", " filename, filename_out, channel, offset, base_offset, rel_gain, threshold, mask = inp\n", "\n", - " infile = h5py.File(filename, \"r\", driver=\"core\")\n", + " infile = h5py.File(filename, \"r\")\n", " im = np.array(infile[\"/INSTRUMENT/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/data\".format(channel)])\n", "\n", " cellid = np.array(infile[\"/INSTRUMENT/SPB_DET_AGIPD1M-1/DET/{}CH0:xtdf/image/cellId\".format(channel)])\n", @@ -206,7 +206,7 @@ " dont_copy = [\"INSTRUMENT/SPB_DET_AGIPD1M-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/DSSC/DSSC_Correct_and_Verify.ipynb b/notebooks/DSSC/DSSC_Correct_and_Verify.ipynb index cb01d46d12410767e8a9a90e900d0e52689d2445..b29f2e2d93e5ac08ed6b83afff63b2272f3ea237 100644 --- a/notebooks/DSSC/DSSC_Correct_and_Verify.ipynb +++ b/notebooks/DSSC/DSSC_Correct_and_Verify.ipynb @@ -292,7 +292,7 @@ " \n", " detinst = getattr(Detectors, dinstance)\n", " device = getattr(detinst, qm)\n", - " with h5py.File(filename, \"r\", driver=\"core\") as infile:\n", + " with h5py.File(filename, \"r\") as infile:\n", " y = infile[f\"{h5path}/data\"].shape[2]\n", " x = infile[f\"{h5path}/data\"].shape[3]\n", " offset, when = get_constant_from_db_and_time(karabo_id, karabo_da,\n", @@ -328,7 +328,7 @@ " infile.visititems(visitor)\n", "\n", " try:\n", - " with h5py.File(filename, \"r\", driver=\"core\") as infile:\n", + " with h5py.File(filename, \"r\") as infile:\n", " with h5py.File(filename_out, \"w\") as outfile:\n", " copy_and_sanitize_non_cal_data(infile, outfile)\n", " # get indices of last images in each train\n", diff --git a/notebooks/FastCCD/CorrectionNotebook_NewDAQ_FastCCD_NBC.ipynb b/notebooks/FastCCD/CorrectionNotebook_NewDAQ_FastCCD_NBC.ipynb index 4e08d0f39fddc4c2841445f9c5059621f2ca8159..6be6f7d1776bba412998ff0fa9824f7a113f14aa 100644 --- a/notebooks/FastCCD/CorrectionNotebook_NewDAQ_FastCCD_NBC.ipynb +++ b/notebooks/FastCCD/CorrectionNotebook_NewDAQ_FastCCD_NBC.ipynb @@ -759,7 +759,7 @@ " relGain = np.squeeze(relGain)\n", "\n", "for k, f in enumerate(file_list):\n", - " with h5py.File(f, 'r', driver='core') as infile:\n", + " with h5py.File(f, 'r') as infile:\n", " out_fileb = \"{}/{}\".format(out_folder, f.split(\"/\")[-1])\n", " out_file = out_fileb.replace(\"RAW\", \"CORR\")\n", " #out_filed = out_fileb.replace(\"RAW\", \"CORR-SC\")\n", 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 e52ca2afaefe83ddadd28dfd177a3111c82b071e..0cdc02eb4d01c4375a0156c4ca168c9d9a390cdd 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 4c99b082e764389c8e7206da8ff742a625d09843..c34b835b67d1306830450d733fa7156faa9998b3 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 33522e672c31ec05bb170c2e27b21e4f7514140f..4075ffbfa82b19f18b8fe8b928064952a879343e 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 523b9f9d11d92ec57046cdff45d24d91730cbd32..1e04f5f3785ce96d766cda73155b8bd63e113538 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 73b4eb0fd0775636315f07d3ac7957703cfbd780..919fa13cb1fa7a7b8b44c729957d46fd937d8a2f 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 1782700e69188649923c9fe29c53dfefb9a715cf..7d83accb6ca859a344fb533b3b93dd815705b1d8 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 732ce8cd96001aa22317c3c4071bd01383302256..6689f001f82bc9bd377cde1d3321b97b86e1e6dc 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", diff --git a/notebooks/pnCCD/Characterize_pnCCD_Gain.ipynb b/notebooks/pnCCD/Characterize_pnCCD_Gain.ipynb index 1c300edaf15236abf7d7579d0eef23c4038e3ee1..9c8b3f53ad60aa38089ec9f687e86ffd62228d72 100644 --- a/notebooks/pnCCD/Characterize_pnCCD_Gain.ipynb +++ b/notebooks/pnCCD/Characterize_pnCCD_Gain.ipynb @@ -483,7 +483,7 @@ "tpats = 0\n", "\n", "for k, f in enumerate(file_list):\n", - " with h5py.File(f, 'r', driver='core') as infile:\n", + " with h5py.File(f, 'r') as infile:\n", " data = infile[h5path+\"/pixels_classified\"][()]\n", " patterns = infile[h5path+\"/patterns\"][()]\n", " bpix = infile[h5path+\"/mask\"][()]\n", diff --git a/notebooks/pnCCD/Correct_pnCCD_NBC.ipynb b/notebooks/pnCCD/Correct_pnCCD_NBC.ipynb index 9bbaf925b071be253560c81f4ebae5ebce3b87cb..db8da2b619ff4062322f6782a48894ef4d124f4c 100644 --- a/notebooks/pnCCD/Correct_pnCCD_NBC.ipynb +++ b/notebooks/pnCCD/Correct_pnCCD_NBC.ipynb @@ -694,7 +694,7 @@ " relGain = constants[\"RelativeGain\"]\n", "\n", "for k, f in enumerate(file_list):\n", - " with h5py.File(f, 'r', driver='core') as infile:\n", + " with h5py.File(f, 'r') as infile:\n", " out_fileb = \"{}/{}\".format(out_folder, f.split(\"/\")[-1])\n", " out_file = out_fileb.replace(\"RAW\", \"CORR\")\n", "\n", @@ -1283,9 +1283,7 @@ " triples = []\n", " quads = []\n", "\n", - " with h5py.File(\"{}/CORR-R{:04d}-PNCCD01-S{:05d}.h5\".format(out_folder, run, sequences[seq_num]), 'r', \n", - " driver='core') as infile:\n", - "\n", + " with h5py.File(\"{}/CORR-R{:04d}-PNCCD01-S{:05d}.h5\".format(out_folder, run, sequences[seq_num]), 'r') as infile:\n", " data = infile[h5path+\"/pixels_classified\"][()].astype(np.float32) # classifications\n", " patterns = infile[h5path+\"/patterns\"][()].astype(np.float32) # event patterns\n", " \n",