Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cigale
CIGALE
Commits
24e81d3e
Commit
24e81d3e
authored
Mar 06, 2017
by
Médéric Boquien
Browse files
Simplify the computation of the speed by using string formats rather than rounding.
parent
0d544a08
Changes
2
Hide whitespace changes
Inline
Side-by-side
pcigale/analysis_modules/pdf_analysis/workers.py
View file @
24e81d3e
...
...
@@ -178,10 +178,9 @@ def sed(idx):
n_computed
=
gbl_n_computed
.
value
if
n_computed
%
250
==
0
or
n_computed
==
gbl_params
.
size
:
t_elapsed
=
time
.
time
()
-
gbl_t_begin
print
(
"{}/{} models computed in {} seconds ({} models/s)"
.
format
(
n_computed
,
gbl_params
.
size
,
np
.
around
(
t_elapsed
,
decimals
=
1
),
np
.
around
(
n_computed
/
t_elapsed
,
decimals
=
1
)),
print
(
"{}/{} models computed in {:.1f} seconds ({:.1f} models/s)"
.
format
(
n_computed
,
gbl_params
.
size
,
t_elapsed
,
n_computed
/
t_elapsed
),
end
=
"
\n
"
if
n_computed
==
gbl_params
.
size
else
"
\r
"
)
...
...
@@ -326,7 +325,6 @@ def analysis(idx, obs):
gbl_n_computed
.
value
+=
1
n_computed
=
gbl_n_computed
.
value
t_elapsed
=
time
.
time
()
-
gbl_t_begin
print
(
"{}/{} objects analysed in {} seconds ({} objects/s)"
.
format
(
n_computed
,
gbl_n_obs
,
np
.
around
(
t_elapsed
,
decimals
=
1
),
np
.
around
(
n_computed
/
t_elapsed
,
decimals
=
2
)),
print
(
"{}/{} objects analysed in {:.1f} seconds ({:.2f} objects/s)"
.
format
(
n_computed
,
gbl_n_obs
,
t_elapsed
,
n_computed
/
t_elapsed
),
end
=
"
\n
"
if
n_computed
==
gbl_n_obs
else
"
\r
"
)
pcigale/analysis_modules/savefluxes/workers.py
View file @
24e81d3e
...
...
@@ -104,8 +104,7 @@ def fluxes(idx):
n_computed
=
gbl_n_computed
.
value
if
n_computed
%
250
==
0
or
n_computed
==
gbl_params
.
size
:
t_elapsed
=
time
.
time
()
-
gbl_t_begin
print
(
"{}/{} models computed in {} seconds ({} models/s)"
.
format
(
n_computed
,
gbl_params
.
size
,
np
.
around
(
t_elapsed
,
decimals
=
1
),
np
.
around
(
n_computed
/
t_elapsed
,
decimals
=
1
)),
print
(
"{}/{} models computed in {:.1f} seconds ({:.1f} models/s)"
.
format
(
n_computed
,
gbl_params
.
size
,
t_elapsed
,
n_computed
/
t_elapsed
),
end
=
"
\n
"
if
n_computed
==
gbl_params
.
size
else
"
\r
"
)
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