Commit 6791ba73 authored by Sebastian Heimann's avatar Sebastian Heimann

fixed some bugs

parent 40bd715d
......@@ -66,7 +66,7 @@ def str_duration2(t):
return '%.1f s' % t
elif 10.0 <= t < 3600.:
return '%.0f s' % t
elif 10.0 <= t < 3600.:
elif 10.0 <= t:
return '%.1f h' % (t / 3600.)
......@@ -612,7 +612,7 @@ def draw_solution_figure(
else:
axes.annotate(
'N/A',
position=(1.+xpos, ypos),
xy=(1.+xpos, ypos),
ha='center',
va='center',
color='black',
......@@ -713,7 +713,7 @@ def draw_contributions_figure(model, plt):
poly_x, rel_poly_y,
alpha=0.5,
color=colors[ii % len(colors)],
label='%s (%.2g)' % (target.string_id, num.mean(rel_ms[-1])))
label='%s (%.2g)' % (target.string_id(), num.mean(rel_ms[-1])))
poly_y = num.concatenate(
[ms_smooth_sum[::-1], ms_smooth_sum + ms_smooth])
......@@ -859,6 +859,12 @@ def draw_fits_figures(ds, model, plt):
target_to_result = {}
all_syn_trs = []
ms, ns, results = problem.evaluate(xbest, return_traces=True)
for result in results:
if result is not None:
result.filtered_obs = result.filtered_obs.copy()
result.filtered_syn = result.filtered_syn.copy()
result.processed_obs = result.processed_obs.copy()
result.processed_syn = result.processed_syn.copy()
dtraces = []
for target, result in zip(problem.targets, results):
......
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