Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pygwinc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
gwinc
pygwinc
Commits
1e64e074
Commit
1e64e074
authored
4 years ago
by
Jameson Rollins
Browse files
Options
Downloads
Patches
Plain Diff
cli: tweak error strings
parent
b57acef8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gwinc/__main__.py
+8
-8
8 additions, 8 deletions
gwinc/__main__.py
with
8 additions
and
8 deletions
gwinc/__main__.py
+
8
−
8
View file @
1e64e074
...
@@ -120,9 +120,9 @@ def main():
...
@@ -120,9 +120,9 @@ def main():
if
os
.
path
.
splitext
(
os
.
path
.
basename
(
args
.
IFO
))[
1
]
in
io
.
DATA_SAVE_FORMATS
:
if
os
.
path
.
splitext
(
os
.
path
.
basename
(
args
.
IFO
))[
1
]
in
io
.
DATA_SAVE_FORMATS
:
if
args
.
freq
:
if
args
.
freq
:
parser
.
exit
(
2
,
"
Frequency specification not allowed when loading traces from file.
\n
"
)
parser
.
exit
(
2
,
"
Error:
Frequency specification not allowed when loading traces from file.
\n
"
)
if
args
.
ifo
:
if
args
.
ifo
:
parser
.
exit
(
2
,
"
IFO parameter specification not allowed when loading traces from file.
\n
"
)
parser
.
exit
(
2
,
"
Error:
IFO parameter specification not allowed when loading traces from file.
\n
"
)
from
.io
import
load_hdf5
from
.io
import
load_hdf5
budget
=
None
budget
=
None
name
=
args
.
IFO
name
=
args
.
IFO
...
@@ -139,7 +139,7 @@ def main():
...
@@ -139,7 +139,7 @@ def main():
try
:
try
:
budget
=
load_budget
(
args
.
IFO
,
freq
=
freq
)
budget
=
load_budget
(
args
.
IFO
,
freq
=
freq
)
except
RuntimeError
as
e
:
except
RuntimeError
as
e
:
parser
.
exit
(
2
,
str
(
e
)
+
'
\n
'
)
parser
.
exit
(
2
,
f
"
Error:
{
e
}
\n
"
)
name
=
budget
.
name
name
=
budget
.
name
ifo
=
budget
.
ifo
ifo
=
budget
.
ifo
plot_style
=
getattr
(
budget
,
'
plot_style
'
,
{})
plot_style
=
getattr
(
budget
,
'
plot_style
'
,
{})
...
@@ -154,17 +154,17 @@ def main():
...
@@ -154,17 +154,17 @@ def main():
if
args
.
yaml
:
if
args
.
yaml
:
if
not
ifo
:
if
not
ifo
:
parser
.
exit
(
2
,
"
IFO structure not provided.
\n
"
)
parser
.
exit
(
2
,
"
Error:
IFO structure not provided.
\n
"
)
print
(
ifo
.
to_yaml
(),
end
=
''
)
print
(
ifo
.
to_yaml
(),
end
=
''
)
return
return
if
args
.
text
:
if
args
.
text
:
if
not
ifo
:
if
not
ifo
:
parser
.
exit
(
2
,
"
IFO structure not provided.
\n
"
)
parser
.
exit
(
2
,
"
Error:
IFO structure not provided.
\n
"
)
print
(
ifo
.
to_txt
(),
end
=
''
)
print
(
ifo
.
to_txt
(),
end
=
''
)
return
return
if
args
.
diff
:
if
args
.
diff
:
if
not
ifo
:
if
not
ifo
:
parser
.
exit
(
2
,
"
IFO structure not provided.
\n
"
)
parser
.
exit
(
2
,
"
Error:
IFO structure not provided.
\n
"
)
dbudget
=
load_budget
(
args
.
diff
)
dbudget
=
load_budget
(
args
.
diff
)
diffs
=
ifo
.
diff
(
dbudget
.
ifo
)
diffs
=
ifo
.
diff
(
dbudget
.
ifo
)
if
diffs
:
if
diffs
:
...
@@ -205,7 +205,7 @@ def main():
...
@@ -205,7 +205,7 @@ def main():
except
ImportError
as
e
:
except
ImportError
as
e
:
parser
.
exit
(
5
,
f
"
ImportError:
{
e
}
\n
"
)
parser
.
exit
(
5
,
f
"
ImportError:
{
e
}
\n
"
)
except
RuntimeError
:
except
RuntimeError
:
parser
.
exit
(
10
,
"
Could not open display for plotting.
\n
"
)
parser
.
exit
(
10
,
"
Error:
Could not open display for plotting.
\n
"
)
if
args
.
range
:
if
args
.
range
:
try
:
try
:
...
@@ -259,7 +259,7 @@ def main():
...
@@ -259,7 +259,7 @@ def main():
m2
=
H
.
params
[
'
m2
'
],
m2
=
H
.
params
[
'
m2
'
],
fom
=
metrics
[
range_func
][
0
],
fom
=
metrics
[
range_func
][
0
],
unit
=
metrics
[
range_func
][
1
]
or
''
,
unit
=
metrics
[
range_func
][
1
]
or
''
,
)
)
else
:
else
:
subtitle
=
None
subtitle
=
None
...
...
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