gms = problem.combine_misfits(misfits) return num.mean(xs, axis=0), num.mean(gms)
gms = problem.combine_misfits(misfits) ibest = num.argmin(gms) return xs[ibest, :], gms[ibest]
if len(lats) == 0: return 0., 0., 1000. else: ns, es = od.latlon_to_ne_numpy(lats[0], lons[0], lats, lons) n, e = num.mean(ns), num.mean(es) dists = num.sqrt((ns-n)**2 + (es-e)**2) lat, lon = od.ne_to_latlon(lats[0], lons[0], n, e) return float(lat), float(lon), float(num.max(dists))
lats = num.array([s.lat for s in stations]) lons = num.array([s.lon for s in stations]) return mean_latlondist(lats, lons) |