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
0db37226
Commit
0db37226
authored
Mar 05, 2018
by
Médéric Boquien
Browse files
Improve the computation of the histogram bin width in the presence of invalid models.
parent
4766aa5f
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
0db37226
...
...
@@ -7,6 +7,7 @@
### Changed
### Fixed
-
The histogram bin width was not computed optimally when some models were invalid. (David Corre & Médéric Boquien)
### Optimised
-
The estimation of the physical properties is made a bit faster when all the models are valid. (Médéric Boquien)
...
...
pcigale_plots/__init__.py
View file @
0db37226
...
...
@@ -91,10 +91,13 @@ def _pdf_worker(obj_name, var_name):
model_variable
.
append
(
data
[
1
,
:])
likelihood
=
np
.
concatenate
(
likelihood
)
model_variable
=
np
.
concatenate
(
model_variable
)
w
=
np
.
where
(
np
.
isfinite
(
likelihood
)
&
np
.
isfinite
(
model_variable
))
likelihood
=
likelihood
[
w
]
model_variable
=
model_variable
[
w
]
Npdf
=
100
min_hist
=
np
.
nan
min
(
model_variable
)
max_hist
=
np
.
nan
max
(
model_variable
)
min_hist
=
np
.
min
(
model_variable
)
max_hist
=
np
.
max
(
model_variable
)
Nhist
=
min
(
Npdf
,
len
(
np
.
unique
(
model_variable
)))
if
min_hist
==
max_hist
:
...
...
Write
Preview
Supports
Markdown
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