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
Compare revisions
master to 3869441257172899c5324c4dbd82bba23af6edec
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
wtlib/WindEnergyToolbox
Select target project
No results found
3869441257172899c5324c4dbd82bba23af6edec
Select Git revision
Branches
67-binary-results-reader-in-hawc2-12-6-does-not-find-number-of-blades
FW_H2_Wrapper
ae_file_update
f/FastIO
f/ae_file
f/pc_file
master
Tags
v0.0.1
v0.0.2
v0.0.5
v0.0.6
v0.0.7
v0.0.8
v0.0.9
14 results
Swap
Target
toolbox/WindEnergyToolbox
Select target project
toolbox/WindEnergyToolbox
tlbl/WindEnergyToolbox
cpav/WindEnergyToolbox
frza/WindEnergyToolbox
borg/WindEnergyToolbox
mmpe/WindEnergyToolbox
ozgo/WindEnergyToolbox
dave/WindEnergyToolbox
mmir/WindEnergyToolbox
wluo/WindEnergyToolbox
welad/WindEnergyToolbox
chpav/WindEnergyToolbox
rink/WindEnergyToolbox
shfe/WindEnergyToolbox
shfe1/WindEnergyToolbox
acdi/WindEnergyToolbox
angl/WindEnergyToolbox
wliang/WindEnergyToolbox
mimc/WindEnergyToolbox
wtlib/WindEnergyToolbox
cmos/WindEnergyToolbox
fabpi/WindEnergyToolbox
22 results
master
Select Git revision
Branches
105-hawc2io-readascii-is-unable-to-read-incomplete-result-files
106-htcfile-save-method-changes-back-slash-to-forward-slash
106-save-backslash-forwardslash
67-binary-results-reader-in-hawc2-12-6-does-not-find-number-of-blades
AbhinavANand
FW_H2_Wrapper
ModifyHawc2
add_future
add_set_Name_to_hawc2_input_writer
add_wake_sensor
bhawc_converter
data_manager
dlb
f/add_test_file
fail_bearing
fix_pip_install
hawc2flow
iodocs
licoreim
master
nicgo_dlb_offshore
ozgo
removed_build_on_install
rsod-coverage_example
rsod-crypto
rsod-dlchighlevel
rsod-main_body_analysis
rsod-offshore
rsod-pages
simple_setup
test_doc
test_docs
test_pypi
windIO_ozgo
Tags
v0.0.1
v0.0.10
v0.0.11
v0.0.12
v0.0.13
v0.0.14
v0.0.15
v0.0.16
v0.0.17
v0.0.18
v0.0.19
v0.0.2
v0.0.20
v0.0.21
v0.0.3
v0.0.4
v0.0.5
v0.0.6
v0.0.7
v0.0.8
v0.0.9
v0.1.0
v0.1.1
v0.1.10
v0.1.11
v0.1.12
v0.1.13
v0.1.14
v0.1.15
v0.1.16
v0.1.17
v0.1.18
v0.1.19
v0.1.2
v0.1.20
v0.1.21
v0.1.22
v0.1.23
v0.1.24
v0.1.25
v0.1.26
v0.1.27
v0.1.28
v0.1.29
v0.1.3
v0.1.30
v0.1.31
v0.1.4
v0.1.5
v0.1.6
v0.1.7
v0.1.8
v0.1.9
87 results
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (1)
Some fast out files have a different number of header lines
· 38694412
Emmanuel Branlard
authored
6 years ago
38694412
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wetb/fast/fast_io.py
+32
-11
32 additions, 11 deletions
wetb/fast/fast_io.py
with
32 additions
and
11 deletions
wetb/fast/fast_io.py
View file @
38694412
...
...
@@ -49,17 +49,38 @@ def load_ascii_output(filename):
with
open
(
filename
)
as
f
:
info
=
{}
info
[
'
name
'
]
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
filename
))[
0
]
try
:
header
=
[
f
.
readline
()
for
_
in
range
(
8
)]
info
[
'
description
'
]
=
header
[
4
].
strip
()
info
[
'
attribute_names
'
]
=
header
[
6
].
split
()
info
[
'
attribute_units
'
]
=
[
unit
[
1
:
-
1
]
for
unit
in
header
[
7
].
split
()]
#removing "()"
data
=
np
.
array
([
line
.
split
()
for
line
in
f
.
readlines
()]).
astype
(
np
.
float
)
return
data
,
info
except
(
ValueError
,
AssertionError
):
raise
# Header is whatever is before the keyword `time`
in_header
=
True
header
=
[]
while
in_header
:
l
=
f
.
readline
()
if
not
l
:
raise
Exception
(
'
Error finding the end of FAST out file header. Keyword Time missing.
'
)
in_header
=
(
l
+
'
dummy
'
).
lower
().
split
()[
0
]
!=
'
time
'
if
in_header
:
header
.
append
(
l
)
else
:
info
[
'
description
'
]
=
header
info
[
'
attribute_names
'
]
=
l
.
split
()
info
[
'
attribute_units
'
]
=
[
unit
[
1
:
-
1
]
for
unit
in
f
.
readline
().
split
()]
# Data, up to end of file or empty line (potential comment line at the end)
split_lines
=
[]
while
True
:
l
=
f
.
readline
().
strip
()
if
not
l
or
len
(
l
)
==
0
:
break
split_lines
.
append
(
l
.
split
())
data
=
np
.
array
(
split_lines
).
astype
(
np
.
float
)
# Harcoded 8 line header and
#header = [f.readline() for _ in range(8)]
#info['description'] = header[4].strip()
#info['attribute_names'] = header[6].split()
#info['attribute_units'] = [unit[1:-1] for unit in header[7].split()] #removing "()"
#data = np.array([line.split() for line in f.readlines() if len(line)]).astype(np.float)
return
data
,
info
def
load_binary_output
(
filename
):
...
...
This diff is collapsed.
Click to expand it.