From 256b6c19342fca5fc370c6f2c7febb584bb59009 Mon Sep 17 00:00:00 2001
From: "Mads M. Pedersen" <mmpe@dtu.dk>
Date: Tue, 14 Mar 2017 07:58:50 +0100
Subject: [PATCH] added method parameter in first_order_filters

---
 wetb/signal_tools/filters/cy_filters.py  | 2 +-
 wetb/signal_tools/filters/first_order.py | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/wetb/signal_tools/filters/cy_filters.py b/wetb/signal_tools/filters/cy_filters.py
index 4df4a89e..35fe75db 100644
--- a/wetb/signal_tools/filters/cy_filters.py
+++ b/wetb/signal_tools/filters/cy_filters.py
@@ -23,7 +23,7 @@ def cy_low_pass_filter(inp, delta_t, tau):  #cpdef cy_low_pass_filter(np.ndarray
 
     return output
 
-def cy_dynamic_low_pass_filter(inp, delta_t, tau, method):  #cpdef cy_dynamic_low_pass_filter(np.ndarray[double,ndim=1] inp, double delta_t, np.ndarray[double,ndim=1] tau, int method):
+def cy_dynamic_low_pass_filter(inp, delta_t, tau, method=1):  #cpdef cy_dynamic_low_pass_filter(np.ndarray[double,ndim=1] inp, double delta_t, np.ndarray[double,ndim=1] tau, int method=1):
     #cdef np.ndarray[double,ndim=1] output, alpha
     #cdef int i
 
diff --git a/wetb/signal_tools/filters/first_order.py b/wetb/signal_tools/filters/first_order.py
index e4192763..6bcfd046 100644
--- a/wetb/signal_tools/filters/first_order.py
+++ b/wetb/signal_tools/filters/first_order.py
@@ -6,11 +6,11 @@ Created on 10/01/2015
 import numpy as np
 from wetb.signal_tools.filters import cy_filters
 
-def low_pass(input, delta_t, tau):
+def low_pass(input, delta_t, tau, method=1):
     if isinstance(tau, (int, float)):
         return cy_filters.cy_low_pass_filter(input.astype(np.float64), delta_t, tau)
     else:
-        return cy_filters.cy_dynamic_low_pass_filter(input.astype(np.float64), delta_t, tau)
+        return cy_filters.cy_dynamic_low_pass_filter(input.astype(np.float64), delta_t, tau, method)
 
 def high_pass(input, delta_t, tau):
     return cy_filters.cy_high_pass_filter(input.astype(np.float64), delta_t, tau)
-- 
GitLab