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
ea84bf7e
Commit
ea84bf7e
authored
7 years ago
by
Mads M. Pedersen
Browse files
Options
Downloads
Patches
Plain Diff
filter warnings in spectra
parent
b08286ad
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wetb/wind/turbulence/spectra.py
+4
-2
4 additions, 2 deletions
wetb/wind/turbulence/spectra.py
with
4 additions
and
2 deletions
wetb/wind/turbulence/spectra.py
+
4
−
2
View file @
ea84bf7e
...
...
@@ -6,6 +6,7 @@ Created on 27/11/2015
import
numpy
as
np
import
warnings
def
spectrum
(
x
,
y
=
None
,
k
=
1
):
"""
PSD or Cross spectrum (only positive half)
...
...
@@ -37,8 +38,9 @@ def spectrum(x, y=None, k=1):
# if len(fftx.shape) == 2:
# fftx = np.mean(fftx, 1)
return
np
.
real
(
fftx
*
len
(
x
)
/
(
2
*
k
))[
1
:]
with
warnings
.
catch_warnings
():
warnings
.
simplefilter
(
"
ignore
"
)
return
np
.
real
(
fftx
*
len
(
x
)
/
(
2
*
k
))[
1
:]
def
spectra
(
spatial_resolution
,
u
,
v
=
None
,
w
=
None
,
detrend
=
True
):
"""
Return the wave number, the uu, vv, ww autospectra and the uw cross spectra
...
...
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