Commit eea4337c authored by Christian Rohlfing's avatar Christian Rohlfing
Browse files

- bugfix in GDET3 Faltung GUI

parent f81453d4
......@@ -7,11 +7,11 @@
import ipywidgets as widgets
from ipywidgets import interact, interactive, fixed, Layout
from IPython.display import clear_output, display, HTML
from scipy import signal # convolution
from scipy.signal import find_peaks # peak finder
from ient_nb.ient_plots import *
from ient_nb.ient_signals import *
......@@ -79,12 +79,12 @@
global s, h, gt, intervals_g # reused in second interactive plot
s = lambda tau: signal_types[s_type]((tau-s_t0)/s_T); # signal on time axis (shifted by t0 and stretched by T)
h = lambda tau: signal_types[h_type]((tau-h_t0)/h_T);
#intervals_s = np.array(signal_intervals[w_s_type.value])*s_T + s_t0; # get signal intervals and map to time axis (shifted by t0 and stretched by T)
#intervals_h = np.array(signal_intervals[w_h_type.value])*h_T + h_t0;
intervals_s,_,_ = find_intervals(s(tau), 0.49*np.max(np.abs(s(tau)))/deltat, deltat)
intervals_h,_,_ = find_intervals(h(tau), 0.49*np.max(np.abs(h(tau)))/deltat, deltat)
intervals_s,_,_ = find_intervals(s(tau), tau, 0.49*np.max(np.abs(s(tau)))/deltat, deltat)
intervals_h,_,_ = find_intervals(h(tau), tau, 0.49*np.max(np.abs(h(tau)))/deltat, deltat)
# Get g(t) = s(t) \ast h(t)
gt = convolution(s, h) # numerical convolution
intervals_g = np.unique(np.tile(intervals_h, len(intervals_s)) + np.repeat(intervals_s, len(intervals_h))) # intervals of g(t)
if intervals_g.size == 0: #
Subproject commit 19979d2c4e29f9c03b19773ec85991ec747654fb
Subproject commit 6f373bba36deda66f226325e6d5b621c7261e01e
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