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
mimc
WindEnergyToolbox
Commits
ac2bc330
Commit
ac2bc330
authored
6 years ago
by
mimc
Browse files
Options
Downloads
Patches
Plain Diff
Some minor bug fixes
parent
29328629
No related branches found
No related tags found
No related merge requests found
Pipeline
#6106
failed
6 years ago
Stage: test
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
wetb/hawc2/hawc2_simulation.py
+2
-0
2 additions, 0 deletions
wetb/hawc2/hawc2_simulation.py
wetb/hawc2/st_file.py
+4
-0
4 additions, 0 deletions
wetb/hawc2/st_file.py
with
6 additions
and
0 deletions
wetb/hawc2/hawc2_simulation.py
+
2
−
0
View file @
ac2bc330
...
...
@@ -153,6 +153,8 @@ class Hawc2_Simulation(object):
old_home
=
os
.
getcwd
()
# Change to the htc directory
if
not
os
.
path
.
isdir
(
self
.
write_directory
):
os
.
mkdir
(
self
.
write_directory
)
os
.
chdir
(
self
.
write_directory
)
# scale sensors for writing
...
...
This diff is collapsed.
Click to expand it.
wetb/hawc2/st_file.py
+
4
−
0
View file @
ac2bc330
...
...
@@ -176,6 +176,7 @@ class StBaseData(object):
else
:
raise
IndexError
(
'
The keys cannot have more than 3 terms
'
)
if
len
(
sub_set_data
)
!=
len
(
val
):
print
(
'
The size of the data is %d and the size of the value is %d
'
%
(
len
(
sub_set_data
),
len
(
val
)))
raise
IndexError
(
'
The value is not the same size as the data
'
)
if
data_id
in
key_str
:
col_id
=
key_str
.
index
(
data_id
)
...
...
@@ -277,6 +278,9 @@ class StBaseData(object):
if
not
is_int
(
header_words
[
0
]):
raise
Exception
(
'
First term in the header of an ST file must be the number of main sets
'
)
no_maindata_sets
=
int
(
header_words
[
0
])
if
no_maindata_sets
!=
txt
.
count
(
"
#
"
):
print
(
'
About to throw an error because the file
"
%s
"
does not have the correct number of # characters
'
%
(
filename
))
print
(
'
The number of sets in the header is %d and the number of sets in the file is %d
'
%
(
no_maindata_sets
,
txt
.
count
(
"
#
"
)))
assert
no_maindata_sets
==
txt
.
count
(
"
#
"
)
self
.
main_data_sets
=
{}
for
mset
in
main_sets
[
1
:]:
...
...
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