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
8b879c16
Commit
8b879c16
authored
8 years ago
by
David Verelst
Browse files
Options
Downloads
Patches
Plain Diff
prepost.windIO.LoadResults: add option to load/save unique channel name list
parent
862291b3
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
+11
-0
11 additions, 0 deletions
wetb/prepost/windIO.py
with
11 additions
and
0 deletions
wetb/prepost/windIO.py
+
11
−
0
View file @
8b879c16
...
...
@@ -863,6 +863,17 @@ class LoadResults(ReadHawc2):
return
np
.
array
(
zvals
),
np
.
array
(
yvals
)
def
save_chan_names
(
self
,
fname
):
"""
Save unique channel names to text file.
"""
channels
=
self
.
ch_df
.
ch_name
.
values
channels
.
sort
()
np
.
savetxt
(
fname
,
channels
,
fmt
=
'
%-100s
'
)
def
load_chan_names
(
self
,
fname
):
dtype
=
np
.
dtype
(
'
U100
'
)
return
np
.
genfromtxt
(
fname
,
dtype
=
dtype
,
delimiter
=
'
;
'
).
tolist
()
def
save_csv
(
self
,
fname
,
fmt
=
'
%.18e
'
,
delimiter
=
'
,
'
):
"""
Save to csv and use the unified channel names as columns
...
...
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