Commit 71aeb2c3 authored by Sebastian Heimann's avatar Sebastian Heimann
Browse files

include time shift in plots when td_autoshift is active

parent dd7c1c52
......@@ -337,7 +337,7 @@ class MisfitResult(gf.Result):
taper = trace.Taper.T(optional=True)
tobs_shift = Float.T(optional=True)
tsyn_pick = Timestamp.T(optional=True)
cc_shift = Float.T(optional=True)
tshift = Float.T(optional=True)
cc = Trace.T(optional=True)
......@@ -555,7 +555,7 @@ tautoshift**2 / tautoshift_max**2``
tr_proc_obs, trspec_proc_obs = _process(tr_obs, tmin, tmax, taper, domain)
tr_proc_syn, trspec_proc_syn = _process(tr_syn, tmin, tmax, taper, domain)
cc_shift = None
tshift = None
ctr = None
deltat = tr_proc_obs.deltat
if domain in ('time_domain', 'envelope', 'absolute'):
......@@ -599,7 +599,7 @@ tautoshift**2 / tautoshift_max**2``
mode='same',
normalization='normal')
cc_shift, cc_max = ctr.max()
tshift, cc_max = ctr.max()
m = 0.5 - 0.5 * cc_max
n = 0.5
......@@ -621,7 +621,7 @@ tautoshift**2 / tautoshift_max**2``
spectrum_obs=trspec_proc_obs,
spectrum_syn=trspec_proc_syn,
taper=taper,
cc_shift=cc_shift,
tshift=tshift,
cc=ctr)
elif result_mode == 'sparse':
......
......@@ -970,7 +970,7 @@ def draw_fits_figures(ds, model, plt):
0.),
(result.filtered_syn,
result.processed_syn,
result.cc_shift)):
result.tshift)):
norm = num.sum(num.abs(tr_proc.ydata)) / tr_proc.data_len()
tr_filt.ydata /= norm
......@@ -1000,6 +1000,10 @@ def draw_fits_figures(ds, model, plt):
if spec is not None:
spec.ydata *= w
if result.tshift != 0.0:
result.filtered_syn.shift(result.tshift)
result.processed_syn.shift(result.tshift)
dtrace = result.processed_syn.copy()
dtrace.set_ydata(
(
......
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