Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
cigale
CIGALE
Commits
7439507e
Commit
7439507e
authored
Apr 06, 2018
by
Médéric Boquien
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the computation of the plot of the PDF for physical properties in log.
parent
8d3ffd7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
CHANGELOG.md
CHANGELOG.md
+1
-0
pcigale_plots/__init__.py
pcigale_plots/__init__.py
+10
-2
No files found.
CHANGELOG.md
View file @
7439507e
...
...
@@ -12,6 +12,7 @@
### Fixed
-
The histogram bin width was not computed optimally when some models were invalid. (David Corre & Médéric Boquien)
-
Missing import in the
`m2005`
module. (Médéric Boquien, reported by Dominika Wylezalek)
-
The plot of the PDF could not be generated for physical properties estimated in log (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 @
7439507e
...
...
@@ -79,8 +79,14 @@ def _pdf_worker(obj_name, var_name):
Name of the analysed variable..
"""
fnames
=
glob
.
glob
(
"out/{}_{}_chi2-block-*.npy"
.
format
(
obj_name
,
var_name
))
if
var_name
.
endswith
(
'_log'
):
fnames
=
glob
.
glob
(
"out/{}_{}_chi2-block-*.npy"
.
format
(
obj_name
,
var_name
[:
-
4
]))
log
=
True
else
:
fnames
=
glob
.
glob
(
"out/{}_{}_chi2-block-*.npy"
.
format
(
obj_name
,
var_name
))
log
=
False
likelihood
=
[]
model_variable
=
[]
for
fname
in
fnames
:
...
...
@@ -91,6 +97,8 @@ def _pdf_worker(obj_name, var_name):
model_variable
.
append
(
data
[
1
,
:])
likelihood
=
np
.
concatenate
(
likelihood
)
model_variable
=
np
.
concatenate
(
model_variable
)
if
log
is
True
:
model_variable
=
np
.
log10
(
model_variable
)
w
=
np
.
where
(
np
.
isfinite
(
likelihood
)
&
np
.
isfinite
(
model_variable
))
likelihood
=
likelihood
[
w
]
model_variable
=
model_variable
[
w
]
...
...
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