pass params

master
François Boulogne 3 weeks ago
parent 115eb8cd8e
commit 25c5f7dd9d

@ -1 +1 @@
__version__ = '0.1.6.6'
__version__ = '0.1.6.7'

@ -42,7 +42,7 @@ def load_data_RH_logger(filepath, every=1):
return df.iloc[::every]
def process_data_RH_logger(filepath, every):
def process_data_RH_logger(filepath, every, diff_period=1_000, SG_window=10_000):
df = load_data_RH_logger(filepath, every=1)
# Variation
@ -55,11 +55,11 @@ def process_data_RH_logger(filepath, every):
# Derivative
delta = np.mean(df['time'].diff())
df['dMdt_SG'] = savgol_filter(df['m_mf'], window_length=10000, polyorder=1, deriv=1, delta=delta)
df['dMdt_diff'] = df['m_mf'].diff(periods=1000) / df['time'].diff(periods=1000)
df['dMdt_SG'] = savgol_filter(df['m_mf'], window_length=SG_window, polyorder=1, deriv=1, delta=delta)
df['dMdt_diff'] = df['m_mf'].diff(periods=diff_period) / df['time'].diff(periods=diff_period)
df['dweightdt_SG'] = savgol_filter(df['weight'], window_length=10000, polyorder=1, deriv=1, delta=delta)
df['dweightdt_diff'] = df['weight'].diff(periods=1000) / df['time'].diff(periods=1000)
df['dweightdt_SG'] = savgol_filter(df['weight'], window_length=SG_window, polyorder=1, deriv=1, delta=delta)
df['dweightdt_diff'] = df['weight'].diff(periods=diff_period) / df['time'].diff(periods=diff_period)
h5path = os.path.splitext(filepath)[0]
h5path += '-processed.h5'

Loading…
Cancel
Save