From 0e5f7dba55d1d7d773c2e8000c8ac80dd1af8cce Mon Sep 17 00:00:00 2001 From: rasmusvt Date: Mon, 22 Aug 2022 17:03:17 +0200 Subject: [PATCH] Add unit_tables to xanes-module --- nafuma/xanes/unit_tables.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 nafuma/xanes/unit_tables.py diff --git a/nafuma/xanes/unit_tables.py b/nafuma/xanes/unit_tables.py new file mode 100644 index 0000000..52ca61c --- /dev/null +++ b/nafuma/xanes/unit_tables.py @@ -0,0 +1,11 @@ +import pandas as pd + +def time(): + # Define matrix for unit conversion for time + time = {'h': [1, 60, 3600, 3600000], 'min': [1/60, 1, 60, 60000], 's': [1/3600, 1/60, 1, 1000], 'ms': [1/3600000, 1/60000, 1/1000, 1]} + time = pd.DataFrame(time) + time.index = ['h', 'min', 's', 'ms'] + + return time + +