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
6ca3c8be
Commit
6ca3c8be
authored
Feb 21, 2018
by
Hector Salas
Browse files
pep8 modifications
parent
0967f500
Changes
4
Hide whitespace changes
Inline
Side-by-side
pcigale/analysis_modules/pdf_analysis/__init__.py
View file @
6ca3c8be
...
...
@@ -95,7 +95,6 @@ class PdfAnalysis(AnalysisModule):
))
])
def
_compute_models
(
self
,
conf
,
obs
,
params
,
iblock
):
models
=
ModelsManager
(
conf
,
obs
,
params
,
iblock
)
...
...
pcigale/analysis_modules/pdf_analysis/utils.py
View file @
6ca3c8be
...
...
@@ -15,6 +15,7 @@ from scipy.special import erf
log
.
setLevel
(
'ERROR'
)
def
save_chi2
(
obs
,
variable
,
models
,
chi2
,
values
):
"""Save the chi² and the associated physocal properties
...
...
pcigale/analysis_modules/pdf_analysis/workers.py
View file @
6ca3c8be
...
...
@@ -46,6 +46,7 @@ def init_sed(models, t0, ncomputed):
gbl_t0
=
t0
gbl_ncomputed
=
ncomputed
def
init_analysis
(
models
,
results
,
t0
,
ncomputed
):
"""Initializer of the pool of processes to share variables between workers.
...
...
@@ -103,6 +104,7 @@ def init_bestfit(conf, params, observations, results, t0, ncomputed):
gbl_t0
=
t0
gbl_ncomputed
=
ncomputed
def
sed
(
idx
,
midx
):
"""Worker process to retrieve a SED and affect the relevant data to an
instance of ModelsManager.
...
...
@@ -148,6 +150,7 @@ def sed(idx, midx):
format
(
ncomputed
,
nmodels
,
dt
,
ncomputed
/
dt
),
end
=
"
\n
"
if
ncomputed
==
nmodels
else
"
\r
"
)
def
analysis
(
idx
,
obs
):
"""Worker process to analyse the PDF and estimate parameters values and
store them in an instance of ResultsManager.
...
...
@@ -222,6 +225,7 @@ def analysis(idx, obs):
format
(
ncomputed
,
len
(
gbl_models
.
obs
),
dt
,
ncomputed
/
dt
),
end
=
"
\n
"
if
ncomputed
==
len
(
gbl_models
.
obs
)
else
"
\r
"
)
def
bestfit
(
oidx
,
obs
):
"""Worker process to compute and save the best fit.
...
...
pcigale/managers/results.py
View file @
6ca3c8be
...
...
@@ -31,7 +31,7 @@ class BayesResultsManager(object):
self
.
nobs
=
len
(
models
.
obs
)
self
.
propertiesnames
=
models
.
propertiesnames
self
.
massproportional
=
models
.
massproportional
.
\
intersection
(
models
.
propertiesnames
)
intersection
(
models
.
propertiesnames
)
self
.
nproperties
=
len
(
models
.
propertiesnames
)
# Arrays where we store the data related to the models. For memory
...
...
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