Commit 6e4f9931 authored by Sebastian Heimann's avatar Sebastian Heimann
Browse files

Merge branch 'solver_plot' of gitext:heimann/grond into solver_plot

parents f0e305e3 78ff366a
......@@ -86,6 +86,15 @@ def eigh_sorted(mat):
return evals[iorder], evecs[:, iorder]
def make_norm_trace(a, b, exponent):
tmin = max(a.tmin, b.tmin)
tmax = min(a.tmax, b.tmax)
c = a.chop(tmin, tmax, inplace=False)
bc = b.chop(tmin, tmax, inplace=False)
c.set_ydata(num.abs(c.get_ydata() - bc.get_ydata())**exponent)
return c
class GrondModel(object):
def __init__(self, **kwargs):
self.listeners = []
......@@ -1001,14 +1010,12 @@ def draw_fits_figures(ds, model, plt):
spec.ydata *= w
if result.tshift is not None and result.tshift != 0.0:
dtrace = result.processed_syn.copy()
(result.processed_syn.get_ydata() -
dtrace = make_norm_trace(
result.processed_syn, result.processed_obs,
target_to_result[target] = result
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