Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
WindEnergyToolbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
toolbox
WindEnergyToolbox
Commits
256b6c19
Commit
256b6c19
authored
8 years ago
by
Mads M. Pedersen
Browse files
Options
Downloads
Patches
Plain Diff
added method parameter in first_order_filters
parent
72c52558
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
wetb/signal_tools/filters/cy_filters.py
+1
-1
1 addition, 1 deletion
wetb/signal_tools/filters/cy_filters.py
wetb/signal_tools/filters/first_order.py
+2
-2
2 additions, 2 deletions
wetb/signal_tools/filters/first_order.py
with
3 additions
and
3 deletions
wetb/signal_tools/filters/cy_filters.py
+
1
−
1
View file @
256b6c19
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
wetb/signal_tools/filters/first_order.py
+
2
−
2
View file @
256b6c19
...
...
@@ -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
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment