Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
cosmotools
CAMEL
Commits
0d37948c
Commit
0d37948c
authored
May 04, 2016
by
Plaszczynski Stephane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add error message to bestbestfit.py when file does not have 2 lines
parent
8e632697
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
work/tools/python/bestbestfit.py
work/tools/python/bestbestfit.py
+4
-0
No files found.
work/tools/python/bestbestfit.py
View file @
0d37948c
...
...
@@ -13,6 +13,10 @@ for dir in sys.argv[1:]:
chi2min
=
sys
.
float_info
.
max
data
=
np
.
zeros
(
1
)
for
bf
in
bestfits
:
nlines
=
len
(
open
(
bf
).
readlines
())
if
nlines
!=
2
:
print
(
"invalid bestfit file:{} (skipping)"
.
format
(
bf
))
continue
if
not
header
:
with
open
(
bf
,
'r'
)
as
f
:
line
=
f
.
readline
().
rstrip
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment