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
8d3ffd7e
Commit
8d3ffd7e
authored
Apr 05, 2018
by
Médéric Boquien
Browse files
Adapt the computation of the mock catalog to the new data structures.
parent
d80c77e4
Changes
1
Show whitespace changes
Inline
Side-by-side
pcigale/managers/observations.py
View file @
8d3ffd7e
...
...
@@ -229,21 +229,22 @@ class ObservationsManagerPassbands(object):
Best fit fluxes of a previous run.
"""
for
idx
,
band
in
enumerate
(
self
.
bands
)
:
for
band
in
self
.
bands
:
err
=
band
+
'_err'
self
.
table
[
band
]
=
np
.
random
.
normal
(
fits
.
best
.
flux
es
[:,
idx
],
self
.
table
[
band
]
=
np
.
random
.
normal
(
fits
.
best
.
flux
[
band
],
np
.
fabs
(
self
.
table
[
err
]))
for
idx
,
prop
in
enumerate
(
self
.
intprops
)
:
for
prop
in
self
.
intprops
:
err
=
prop
+
'_err'
index
=
fits
.
best
.
propertiesnames
.
index
(
prop
)
self
.
table
[
prop
]
=
np
.
random
.
normal
(
fits
.
best
.
properties
[:,
index
],
self
.
table
[
name
]
=
np
.
random
.
normal
(
fits
.
best
.
intprop
[
prop
],
np
.
fabs
(
self
.
table
[
err
]))
for
idx
,
prop
in
enumerate
(
self
.
extprops
)
:
for
prop
in
self
.
extprops
:
err
=
prop
+
'_err'
index
=
fits
.
best
.
propertiesnames
.
index
(
prop
)
self
.
table
[
prop
]
=
np
.
random
.
normal
(
fits
.
best
.
properties
[:,
index
],
self
.
table
[
prop
]
=
np
.
random
.
normal
(
fits
.
best
.
extprop
[
prop
],
np
.
fabs
(
self
.
table
[
err
]))
self
.
observations
=
list
([
Observation
(
row
,
self
)
for
row
in
self
.
table
])
def
save
(
self
,
filename
):
"""Saves the observations as seen internally by the code so it is easy
to see what fluxes are actually used in the fit. Files are saved in
...
...
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