From dcb75614aaeb43eb01261515056b622e19f21a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Boulogne?= Date: Mon, 25 Nov 2024 18:24:14 +0100 Subject: [PATCH] add process data --- labsw/__init__.py | 2 +- labsw/io.py | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/labsw/__init__.py b/labsw/__init__.py index f0edc35..472a2ee 100644 --- a/labsw/__init__.py +++ b/labsw/__init__.py @@ -1 +1 @@ -__version__ = '0.1.5.4' +__version__ = '0.1.5.5' diff --git a/labsw/io.py b/labsw/io.py index baedce4..77471b0 100644 --- a/labsw/io.py +++ b/labsw/io.py @@ -2,6 +2,8 @@ import pandas as pd import numpy as np import yaml +import os.path + from scipy.signal import savgol_filter @@ -30,6 +32,13 @@ def load_data_RH_logger(filepath, every=1): return df.iloc[::every] +def process_data_RH_logger(filepath): + df = load_data_RH_logger(filepath, every=1) + h5path = os.path.splitext(filepath)[0] + h5path += '-processed.h5' + df.to_hdf(h5path, key='data') + + def load_metadata(filepath): """