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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
wtlib
WindEnergyToolbox
Commits
0c6afe5b
Commit
0c6afe5b
authored
6 years ago
by
sgho
Committed by
David Verelst
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fixed some small issues, added one more aero sensor
parent
bdb89ed3
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/prepost/windIO.py
+17
-10
17 additions, 10 deletions
wetb/prepost/windIO.py
with
17 additions
and
10 deletions
wetb/prepost/windIO.py
+
17
−
10
View file @
0c6afe5b
...
...
@@ -1037,8 +1037,8 @@ class LoadResults(ReadHawc2):
# radius what you get
# radius = dscr_list[-1]
# radius what you asked for, identified as the last float in the string
s
=
self
.
ch_details
[
ch
,
0
]
radius
=
float
(
re
.
findall
(
r
"
[-+]?\d*\.\d+|\d+
"
,
s
)[
-
1
])
s
=
self
.
ch_details
[
ch
,
0
]
radius
=
float
(
re
.
findall
(
r
"
[-+]?\d*\.\d+|\d+
"
,
s
)[
-
1
])
# and tag it
tag
=
'
%s-%s-%s
'
%
(
sensortype
,
blade_nr
,
radius
)
...
...
@@ -1094,8 +1094,8 @@ class LoadResults(ReadHawc2):
# radius what you get
# radius = float(items[8].replace(',', ''))
# radius what you asked for, identified as the last float in the string
s
=
self
.
ch_details
[
ch
,
0
]
radius
=
float
(
re
.
findall
(
r
"
[-+]?\d*\.\d+|\d+
"
,
s
)[
-
1
])
s
=
self
.
ch_details
[
ch
,
0
]
radius
=
float
(
re
.
findall
(
r
"
[-+]?\d*\.\d+|\d+
"
,
s
)[
-
1
])
items
=
self
.
ch_details
[
ch
,
0
].
split
(
'
,
'
)
component
=
items
[
0
][
-
2
:]
...
...
@@ -1131,12 +1131,12 @@ class LoadResults(ReadHawc2):
blade_nr
=
re
.
search
(
r
'
\d+
'
,
self
.
ch_details
[
ch
,
2
]).
group
()
blade_nr
=
int
(
blade_nr
)
# radius what you get
#
tmp = self.ch_details[ch, 2].split('radius ')[1].strip()
#
tmp = tmp.split(',')
tmp
=
self
.
ch_details
[
ch
,
2
].
split
(
'
radius
'
)[
1
].
strip
()
tmp
=
tmp
.
split
(
'
,
'
)
# radius = float(tmp[0])
# radius what you asked for, identified as the last float in the string
s
=
self
.
ch_details
[
ch
,
0
]
radius
=
float
(
re
.
findall
(
r
"
[-+]?\d*\.\d+|\d+
"
,
s
)[
-
1
])
s
=
self
.
ch_details
[
ch
,
0
]
radius
=
float
(
re
.
findall
(
r
"
[-+]?\d*\.\d+|\d+
"
,
s
)[
-
1
])
if
len
(
tmp
)
>
1
:
coord
=
tmp
[
1
].
strip
()
...
...
@@ -1232,7 +1232,7 @@ class LoadResults(ReadHawc2):
# radius = radius.strip()
# radius what you asked for, identified as the last float in the string
s
=
self
.
ch_details
[
ch
,
0
]
radius
=
float
(
re
.
findall
(
r
"
[-+]?\d*\.\d+|\d+
"
,
s
)[
-
1
])
radius
=
float
(
re
.
findall
(
r
"
[-+]?\d*\.\d+|\d+
"
,
s
)[
-
1
])
# and tag it
rpl
=
(
direction
,
blade_nr
,
radius
,
coord
)
...
...
@@ -1254,7 +1254,7 @@ class LoadResults(ReadHawc2):
units
=
self
.
ch_details
[
ch
,
1
].
strip
()
# Blade number is identified as the first integer in the string
blade_nr
=
re
.
search
(
r
'
\d+
'
,
self
.
ch_details
[
ch
,
2
]).
group
()
blade_nr
=
blade_nr
blade_nr
=
int
(
blade_nr
)
flap_nr
=
self
.
ch_details
[
ch
,
2
].
split
(
'
'
)[
-
1
].
strip
()
# and tag it
...
...
@@ -1284,6 +1284,13 @@ class LoadResults(ReadHawc2):
tag_nr
=
int
(
tag
.
split
(
'
_
'
)[
-
1
])
+
1
tag
=
base
+
'
_%i
'
%
tag_nr
elif
self
.
ch_details
[
ch
,
0
][:
6
]
==
'
a_norm
'
:
channelinfo
=
{}
channelinfo
[
'
chi
'
]
=
ch
channelinfo
[
'
units
'
]
=
self
.
ch_details
[
ch
,
1
].
strip
()
channelinfo
[
'
sensortype
'
]
=
'
aero
'
tag
=
'
aero-induc_a_norm
'
# -----------------------------------------------------------------
# If all this fails, just combine channel name and description
else
:
...
...
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