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
a5595e8b
Commit
a5595e8b
authored
Aug 30, 2015
by
Médéric Boquien
Browse files
It should not be the job of the save procedure to sort the column names. Better do that before.
parent
155786e0
Changes
2
Show whitespace changes
Inline
Side-by-side
pcigale/analysis_modules/pdf_analysis/__init__.py
View file @
a5595e8b
...
...
@@ -159,8 +159,9 @@ class PdfAnalysis(AnalysisModule):
# Retrieve an arbitrary SED to obtain the list of output parameters
warehouse
=
SedWarehouse
()
sed
=
warehouse
.
get_sed
(
creation_modules
,
params
.
from_index
(
0
))
info
=
sed
.
info
n_info
=
len
(
sed
.
info
)
info
=
list
(
sed
.
info
.
keys
())
info
.
sort
()
n_info
=
len
(
info
)
del
warehouse
,
sed
print
(
"Computing the models fluxes..."
)
...
...
@@ -231,7 +232,7 @@ class PdfAnalysis(AnalysisModule):
analysed_std
)
save_table_best
(
'best_models.txt'
,
obs_table
[
'id'
],
best_chi2
,
best_chi2_red
,
best_parameters
,
best_fluxes
,
filters
,
info
.
keys
()
)
info
)
if
mock_flag
is
True
:
...
...
@@ -295,7 +296,7 @@ class PdfAnalysis(AnalysisModule):
analysed_std
)
save_table_best
(
'best_mock_models.txt'
,
mock_table
[
'id'
],
best_chi2
,
best_chi2_red
,
best_parameters
,
best_fluxes
,
filters
,
info
.
keys
()
)
best_fluxes
,
filters
,
info
)
print
(
"Run completed!"
)
...
...
pcigale/analysis_modules/pdf_analysis/utils.py
View file @
a5595e8b
...
...
@@ -170,8 +170,6 @@ def save_table_best(filename, obsid, chi2, chi2_red, variables, fluxes,
best_model_table
.
add_column
(
Column
(
np_chi2
,
name
=
"chi_square"
))
best_model_table
.
add_column
(
Column
(
np_chi2_red
,
name
=
"reduced_chi_square"
))
info_keys
=
list
(
info_keys
)
info_keys
.
sort
()
for
index
,
name
in
enumerate
(
info_keys
):
column
=
Column
(
np_variables
[:,
index
],
name
=
name
)
best_model_table
.
add_column
(
column
)
...
...
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