diff --git a/saqc/funcs/proc_functions.py b/saqc/funcs/proc_functions.py index 8f004ff4e3726e87517ab18d2b313742fd370ecc..61b8871fdbdfe978feb035391a1560adeee69573 100644 --- a/saqc/funcs/proc_functions.py +++ b/saqc/funcs/proc_functions.py @@ -7,6 +7,7 @@ from saqc.funcs.register import register from saqc.lib.ts_operators import interpolateNANs, validationTrafo from saqc.lib.tools import composeFunction + @register() def proc_interpolateMissing(data, field, flagger, method, inter_order=2, inter_limit=2, interpol_flag='UNFLAGGED', downgrade_interpolation=False, return_chunk_bounds=False, **kwargs): @@ -20,6 +21,7 @@ def proc_interpolateMissing(data, field, flagger, method, inter_order=2, inter_l flag=getattr(flagger, interpol_flag), **kwargs) return inter_data, flagger + @register() def proc_resample(data, field, flagger, freq, func="mean", max_invalid_total=None, max_invalid_consec=None, flag_agg_func='max', **kwargs): @@ -61,4 +63,11 @@ def proc_resample(data, field, flagger, freq, func="mean", max_invalid_total=Non all_flags[field] = datflags flagger = flagger.initFlags(flags=all_flags) + return data, flagger + + +@register() +def proc_transform(data, field, flagger, func, **kwargs): + func = composeFunction(func) + data[field] = data[field].transform(func) return data, flagger \ No newline at end of file