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
e664cc55
Commit
e664cc55
authored
Mar 01, 2018
by
Médéric Boquien
Browse files
Correct typos to get closer to the PEP8.
parent
f452ec52
Changes
2
Hide whitespace changes
Inline
Side-by-side
pcigale/analysis_modules/pdf_analysis/utils.py
View file @
e664cc55
...
@@ -21,8 +21,8 @@ def save_chi2(obs, variable, models, chi2, values):
...
@@ -21,8 +21,8 @@ def save_chi2(obs, variable, models, chi2, values):
"""Save the chi² and the associated physocal properties
"""Save the chi² and the associated physocal properties
"""
"""
fname
=
'out/{}_{}_chi2-block-{}.npy'
.
format
(
obs
.
id
,
variable
.
replace
(
'/'
,
'\/'
),
fname
=
'out/{}_{}_chi2-block-{}.npy'
.
format
(
obs
.
id
,
variable
.
replace
(
'/'
,
models
.
iblock
)
'\/'
),
models
.
iblock
)
data
=
np
.
memmap
(
fname
,
dtype
=
np
.
float64
,
mode
=
'w+'
,
data
=
np
.
memmap
(
fname
,
dtype
=
np
.
float64
,
mode
=
'w+'
,
shape
=
(
2
,
chi2
.
size
))
shape
=
(
2
,
chi2
.
size
))
data
[
0
,
:]
=
chi2
data
[
0
,
:]
=
chi2
...
@@ -212,7 +212,7 @@ def compute_chi2(model_fluxes, model_props, model_propsmass, observation,
...
@@ -212,7 +212,7 @@ def compute_chi2(model_fluxes, model_props, model_propsmass, observation,
if
limits
==
True
:
if
limits
==
True
:
obs_values
=
np
.
concatenate
((
obs_fluxes
,
obs_propsmass
))
obs_values
=
np
.
concatenate
((
obs_fluxes
,
obs_propsmass
))
obs_values_err
=
np
.
concatenate
((
obs_fluxes_err
,
obs_propsmass_err
))
obs_values_err
=
np
.
concatenate
((
obs_fluxes_err
,
obs_propsmass_err
))
model_values
=
np
.
concatenate
((
model_fluxes
,
model_propsmass
))
model_values
=
np
.
concatenate
((
model_fluxes
,
model_propsmass
))
for
imod
in
range
(
scaling
.
size
):
for
imod
in
range
(
scaling
.
size
):
scaling
[
imod
]
=
optimize
.
root
(
dchi2_over_ds2
,
scaling
[
imod
],
scaling
[
imod
]
=
optimize
.
root
(
dchi2_over_ds2
,
scaling
[
imod
],
args
=
(
obs_values
,
obs_values_err
,
args
=
(
obs_values
,
obs_values_err
,
...
...
pcigale/analysis_modules/pdf_analysis/workers.py
View file @
e664cc55
...
@@ -264,7 +264,6 @@ def bestfit(oidx, obs):
...
@@ -264,7 +264,6 @@ def bestfit(oidx, obs):
extprops
[:,
None
],
obs
,
corr_dz
,
extprops
[:,
None
],
obs
,
corr_dz
,
gbl_conf
[
'analysis_params'
][
'lim_flag'
])
gbl_conf
[
'analysis_params'
][
'lim_flag'
])
gbl_results
.
best
.
properties
[
oidx
,
:]
=
[
sed
.
info
[
k
]
for
k
in
gbl_results
.
best
.
properties
[
oidx
,
:]
=
[
sed
.
info
[
k
]
for
k
in
gbl_results
.
best
.
propertiesnames
]
gbl_results
.
best
.
propertiesnames
]
iprop
=
[
i
for
i
,
k
in
enumerate
(
gbl_results
.
best
.
propertiesnames
)
iprop
=
[
i
for
i
,
k
in
enumerate
(
gbl_results
.
best
.
propertiesnames
)
...
...
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