From 2ac3e42eb1f09986b52f1a8b3f5a811e2cd5c494 Mon Sep 17 00:00:00 2001
From: ahmedk <karim.ahmed@xfel.eu>
Date: Wed, 14 Dec 2022 12:18:00 +0100
Subject: [PATCH] remove cal_tools.tools changes

---
 src/cal_tools/tools.py | 35 -----------------------------------
 1 file changed, 35 deletions(-)

diff --git a/src/cal_tools/tools.py b/src/cal_tools/tools.py
index 88c533282..2d15866ac 100644
--- a/src/cal_tools/tools.py
+++ b/src/cal_tools/tools.py
@@ -880,41 +880,6 @@ def save_constant_metadata(
         const_mdata["creation-time"] = None
 
 
-def load_constants_dict(
-    retrieved_constants: dict,
-    empty_constants: Optional[dict] = None,
-    ) -> Tuple[dict, dict]:
-    """Load constant data from metadata in the
-    retrieved_constants dictionary.
-
-    :param retrieved_constants: A dict. with the constant filepaths and
-      dataset-name to read the constant data arrays.
-      {
-        'Constant Name': {
-            'file-path': '/gpfs/.../*.h5',
-            'dataset-name': '/module_name/...',
-            'creation-time': str(datetime),},
-        }
-    :param empty_constants: A dict of constant names keys and
-      the empty constant array to use in case of not non-retrieved constants.
-    :return constant_data: A dict of constant names keys and their data.
-    """
-    const_data = dict()
-    when = dict()
-
-    for cname, mdata in retrieved_constants.items():
-        const_data[cname] = dict()
-        when[cname] = mdata["creation-time"]
-        if when[cname]:
-            with h5py.File(mdata["path"], "r") as cf:
-                const_data[cname] = np.copy(
-                    cf[f"{mdata['dataset']}/data"])
-        else:
-            const_data[cname] = (
-                empty_constants[cname] if empty_constants else None)
-    return const_data, when
-
-
 def load_specified_constants(
     retrieved_constants: dict,
     empty_constants: Optional[dict] = None,
-- 
GitLab