Skip to content
Snippets Groups Projects
Commit 256b6c19 authored by Mads M. Pedersen's avatar Mads M. Pedersen
Browse files

added method parameter in first_order_filters

parent 72c52558
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ def cy_low_pass_filter(inp, delta_t, tau): #cpdef cy_low_pass_filter(np.ndarray ...@@ -23,7 +23,7 @@ def cy_low_pass_filter(inp, delta_t, tau): #cpdef cy_low_pass_filter(np.ndarray
return output 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 np.ndarray[double,ndim=1] output, alpha
#cdef int i #cdef int i
......
...@@ -6,11 +6,11 @@ Created on 10/01/2015 ...@@ -6,11 +6,11 @@ Created on 10/01/2015
import numpy as np import numpy as np
from wetb.signal_tools.filters import cy_filters 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)): if isinstance(tau, (int, float)):
return cy_filters.cy_low_pass_filter(input.astype(np.float64), delta_t, tau) return cy_filters.cy_low_pass_filter(input.astype(np.float64), delta_t, tau)
else: 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): def high_pass(input, delta_t, tau):
return cy_filters.cy_high_pass_filter(input.astype(np.float64), delta_t, tau) return cy_filters.cy_high_pass_filter(input.astype(np.float64), delta_t, tau)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment