[refs #229] use last item in t instead of len(t)

This commit is contained in:
Marcel Paffrath 2017-08-15 15:47:59 +02:00
parent f6774cb592
commit 15e76e4932

View File

@ -476,7 +476,7 @@ def getsignalwin(t, t1, tsignal):
''' '''
# get signal window # get signal window
isignal, = np.where((t <= min([t1 + tsignal, len(t)])) \ isignal, = np.where((t <= min([t1 + tsignal, t[-1]])) \
& (t >= t1)) & (t >= t1))
if np.size(isignal) < 1: if np.size(isignal) < 1:
print("getsignalwin: Empty array isignal, check signal window!") print("getsignalwin: Empty array isignal, check signal window!")