Commit 6ca3c8be authored by  Hector Salas's avatar Hector Salas

pep8 modifications

parent 0967f500
...@@ -95,7 +95,6 @@ class PdfAnalysis(AnalysisModule): ...@@ -95,7 +95,6 @@ class PdfAnalysis(AnalysisModule):
)) ))
]) ])
def _compute_models(self, conf, obs, params, iblock): def _compute_models(self, conf, obs, params, iblock):
models = ModelsManager(conf, obs, params, iblock) models = ModelsManager(conf, obs, params, iblock)
......
...@@ -15,6 +15,7 @@ from scipy.special import erf ...@@ -15,6 +15,7 @@ from scipy.special import erf
log.setLevel('ERROR') log.setLevel('ERROR')
def save_chi2(obs, variable, models, chi2, values): def save_chi2(obs, variable, models, chi2, values):
"""Save the chi² and the associated physocal properties """Save the chi² and the associated physocal properties
......
...@@ -46,6 +46,7 @@ def init_sed(models, t0, ncomputed): ...@@ -46,6 +46,7 @@ def init_sed(models, t0, ncomputed):
gbl_t0 = t0 gbl_t0 = t0
gbl_ncomputed = ncomputed gbl_ncomputed = ncomputed
def init_analysis(models, results, t0, ncomputed): def init_analysis(models, results, t0, ncomputed):
"""Initializer of the pool of processes to share variables between workers. """Initializer of the pool of processes to share variables between workers.
...@@ -103,6 +104,7 @@ def init_bestfit(conf, params, observations, results, t0, ncomputed): ...@@ -103,6 +104,7 @@ def init_bestfit(conf, params, observations, results, t0, ncomputed):
gbl_t0 = t0 gbl_t0 = t0
gbl_ncomputed = ncomputed gbl_ncomputed = ncomputed
def sed(idx, midx): def sed(idx, midx):
"""Worker process to retrieve a SED and affect the relevant data to an """Worker process to retrieve a SED and affect the relevant data to an
instance of ModelsManager. instance of ModelsManager.
...@@ -148,6 +150,7 @@ def sed(idx, midx): ...@@ -148,6 +150,7 @@ def sed(idx, midx):
format(ncomputed, nmodels, dt, ncomputed/dt), format(ncomputed, nmodels, dt, ncomputed/dt),
end="\n" if ncomputed == nmodels else "\r") end="\n" if ncomputed == nmodels else "\r")
def analysis(idx, obs): def analysis(idx, obs):
"""Worker process to analyse the PDF and estimate parameters values and """Worker process to analyse the PDF and estimate parameters values and
store them in an instance of ResultsManager. store them in an instance of ResultsManager.
...@@ -222,6 +225,7 @@ def analysis(idx, obs): ...@@ -222,6 +225,7 @@ def analysis(idx, obs):
format(ncomputed, len(gbl_models.obs), dt, ncomputed/dt), format(ncomputed, len(gbl_models.obs), dt, ncomputed/dt),
end="\n" if ncomputed == len(gbl_models.obs) else "\r") end="\n" if ncomputed == len(gbl_models.obs) else "\r")
def bestfit(oidx, obs): def bestfit(oidx, obs):
"""Worker process to compute and save the best fit. """Worker process to compute and save the best fit.
......
...@@ -31,7 +31,7 @@ class BayesResultsManager(object): ...@@ -31,7 +31,7 @@ class BayesResultsManager(object):
self.nobs = len(models.obs) self.nobs = len(models.obs)
self.propertiesnames = models.propertiesnames self.propertiesnames = models.propertiesnames
self.massproportional = models.massproportional.\ self.massproportional = models.massproportional.\
intersection(models.propertiesnames) intersection(models.propertiesnames)
self.nproperties = len(models.propertiesnames) self.nproperties = len(models.propertiesnames)
# Arrays where we store the data related to the models. For memory # Arrays where we store the data related to the models. For memory
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment