From 4926afd454db2dc58091dbeaf763e0da549b9df2 Mon Sep 17 00:00:00 2001 From: David Hammer <dhammer@mailbox.org> Date: Thu, 11 Mar 2021 13:43:29 +0100 Subject: [PATCH] Dropping driver="core" when opening h5py file The relevant data is copied into memory in pretty large chunks, so the core driver is not expected to do much for us here. In some brief testing, using the default driver instead resulted in approximately the same (or slightly better) runtime and significantly lower peak memory consumption. --- notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb b/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb index b1298821c..db3fee539 100644 --- a/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb +++ b/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb @@ -311,7 +311,7 @@ " h5path_f = h5path.format(channel)\n", " h5path_idx_f = h5path_idx.format(channel)\n", "\n", - " with h5py.File(fast_data_filename, \"r\", driver=\"core\") as infile:\n", + " with h5py.File(fast_data_filename, \"r\") as infile:\n", " if rawversion == 2:\n", " count = np.squeeze(infile[f\"{h5path_idx_f}/count\"])\n", " first = np.squeeze(infile[f\"{h5path_idx_f}/first\"])\n", -- GitLab