Commit 9b551026 authored by Theo Steininger's avatar Theo Steininger

Cleaned up the logging.

parent eed2ed62
......@@ -64,6 +64,8 @@ class EnsembleLikelihood(Likelihood):
else:
rho = np.min([1, numerator/denominator])
self.logger.debug("rho: %f = %f / %f" % (rho, numerator, denominator))
# rescale U half/half
u_val *= np.sqrt(1-rho)
U = observable.copy_empty()
......@@ -120,8 +122,8 @@ class EnsembleLikelihood(Likelihood):
result_1 = -c.vdot(first_summand)
result_2 = -c.vdot(second_summand)
result = result_1 + result_2
self.logger.debug("Calculated (%s): %f + %f = %f" %
(self.observable_name, result_1, result_2, result))
self.logger.info("Calculated (%s): %f + %f = %f" %
(self.observable_name, result_1, result_2, result))
# result_array[i] = result
# total_result = result_array.mean()
......
......@@ -117,14 +117,11 @@ class MixinBase(object):
dtype=np.float64)]
for i, component in enumerate(component_names):
self.logger.debug('Broadcasting part %i of %s-ensemble-mean.' %
(i, obs_name))
comm.Bcast([mean_list[i], MPI.DOUBLE], root=size-1)
obs_field = observable_dict[component]
# at the moment the code is hardwired to np.float64
assert(obs_field.dtype == np.float64)
self.logger.debug("Setting up mean-d2o.")
# put the array into a d2o
mean_obj = distributed_data_object(global_data=mean_list[i],
dtype=np.float64,
......@@ -132,5 +129,4 @@ class MixinBase(object):
comm=comm,
copy=False,
)
self.logger.debug("Storing up mean-d2o.")
obs_field._ensemble_mean = mean_obj
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