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
811d3a63
Commit
811d3a63
authored
9 years ago
by
tlbl
Browse files
Options
Downloads
Patches
Plain Diff
some fixes to pass tests :)
parent
09934feb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!4
Integration of HAWCio into Windio and further fatigue tools marging
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
wetb/hawc2/Hawc2io.py
+2
-2
2 additions, 2 deletions
wetb/hawc2/Hawc2io.py
wetb/prepost/windIO.py
+14
-1
14 additions, 1 deletion
wetb/prepost/windIO.py
with
16 additions
and
3 deletions
wetb/hawc2/Hawc2io.py
+
2
−
2
View file @
811d3a63
...
...
@@ -90,8 +90,8 @@ class ReadHawc2(object):
Name
=
[];
Unit
=
[];
Description
=
[];
for
i
in
range
(
0
,
self
.
NrCh
):
temp
=
str
(
Lines
[
i
+
12
][
12
:
43
]);
Name
.
append
(
temp
.
strip
())
temp
=
str
(
Lines
[
i
+
12
][
43
:
4
8
]);
Unit
.
append
(
temp
.
strip
())
temp
=
str
(
Lines
[
i
+
12
][
49
:
]);
Description
.
append
(
temp
.
strip
())
temp
=
str
(
Lines
[
i
+
12
][
43
:
5
4
]);
Unit
.
append
(
temp
.
strip
())
temp
=
str
(
Lines
[
i
+
12
][
54
:
-
1
]);
Description
.
append
(
temp
.
strip
())
self
.
ChInfo
=
[
Name
,
Unit
,
Description
]
# if binary file format, scaling factors are read
if
Format
.
lower
()
==
'
binary
'
:
...
...
This diff is collapsed.
Click to expand it.
wetb/prepost/windIO.py
+
14
−
1
View file @
811d3a63
...
...
@@ -129,13 +129,26 @@ class LoadResults(ReadHawc2):
ReadOnly
=
0
if
readdata
else
1
super
(
LoadResults
,
self
).
__init__
(
FileName
,
ReadOnly
=
ReadOnly
)
self
.
FileType
=
self
.
FileFormat
[
6
:]
self
.
N
=
int
(
self
.
NrSc
)
self
.
Nch
=
int
(
self
.
NrCh
)
self
.
ch_details
=
np
.
ndarray
(
shape
=
(
self
.
Nch
,
3
),
dtype
=
'
<U100
'
)
for
ic
in
range
(
self
.
Nch
):
self
.
ch_details
[
ic
,
0
]
=
self
.
ChInfo
[
0
][
ic
]
self
.
ch_details
[
ic
,
1
]
=
self
.
ChInfo
[
1
][
ic
]
self
.
ch_details
[
ic
,
2
]
=
self
.
ChInfo
[
2
][
ic
]
ChVec
=
[]
if
usecols
is
None
else
usecols
self
.
sig
=
super
(
LoadResults
,
self
).
__call__
(
ChVec
=
ChVec
)
self
.
_unified_channel_names
()
if
readdata
:
self
.
sig
=
super
(
LoadResults
,
self
).
__call__
(
ChVec
=
ChVec
)
if
self
.
debug
:
stop
=
time
()
-
start
print
(
'
time to load HAWC2 file:
'
,
stop
,
'
s
'
)
def
reformat_sig_details
(
self
):
"""
Change HAWC2 output description of the channels short descriptive
strings, usable in plots
...
...
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