diff --git a/labsw/__init__.py b/labsw/__init__.py index cc3d3a9..f0edc35 100644 --- a/labsw/__init__.py +++ b/labsw/__init__.py @@ -1 +1 @@ -__version__ = '0.1.5.3' +__version__ = '0.1.5.4' diff --git a/labsw/io.py b/labsw/io.py index 647b1af..baedce4 100644 --- a/labsw/io.py +++ b/labsw/io.py @@ -2,6 +2,8 @@ import pandas as pd import numpy as np import yaml +from scipy.signal import savgol_filter + def load_data_RH_logger(filepath, every=1): """ @@ -21,6 +23,10 @@ def load_data_RH_logger(filepath, every=1): # Crop data df = df.reset_index() del df['index'] + + # Derivative + df['dmdt'] = savgol_filter(df['weight'], window_length=10000, polyorder=1, deriv=1) + return df.iloc[::every]