Commit e26191bd authored by Sebastian Heimann's avatar Sebastian Heimann
Browse files

fix incorrect determination of total number of supergroups

parent e8000b38
......@@ -231,7 +231,6 @@ class CMTProblem(core.Problem):
def inter_group_weights2(self, ns):
group, ngroups = self.get_group_mask()
ws = num.zeros(ns.shape)
for igroup in xrange(ngroups):
mask = group == igroup
......@@ -268,7 +267,6 @@ class CMTProblem(core.Problem):
def global_misfits(self, misfits):
ws = self.get_target_weights()[num.newaxis, :] * \
self.inter_group_weights2(misfits[:, :, 1])
gms = num.sqrt(num.nansum((ws*misfits[:, :, 0])**2, axis=1) /
num.nansum((ws*misfits[:, :, 1])**2, axis=1))
return gms
......
......@@ -225,7 +225,6 @@ class Problem(Object):
groups[itarget] = ngroups - 1
ngroups += 1
return groups, ngroups
def get_group_mask(self):
......@@ -1132,7 +1131,6 @@ def analyse(problem, niter=1000, show_progress=False):
weights = 1.0 / mean_ms
for igroup in xrange(ngroups):
print weights[groups == igroup]
weights[groups == igroup] /= (
num.nansum(weights[groups == igroup]) /
num.nansum(num.isfinite(weights[groups == igroup])))
......@@ -1565,7 +1563,6 @@ def check(config, event_names=None):
results_list = []
for i in xrange(10):
x = problem.random_uniform(xbounds)
print x
ms, ns, results = problem.evaluate(x, result_mode='full')
results_list.append(results)
......
Supports Markdown
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