[bugfix] catch empty index array during slope determination

This commit is contained in:
Darius Arnold 2017-08-21 13:17:33 +02:00 committed by Marcel
parent 19566715a7
commit 8ce9e40d49

View File

@ -244,7 +244,11 @@ class AICPicker(AutoPicker):
& (self.Tcf >= self.Pick)) # TODO: put this in a seperate function like getsignalwin & (self.Tcf >= self.Pick)) # TODO: put this in a seperate function like getsignalwin
# find maximum within slope determination window # find maximum within slope determination window
# 'cause slope should be calculated up to first local minimum only! # 'cause slope should be calculated up to first local minimum only!
dataslope = self.Data[0].data[islope[0][0]:islope[0][len(islope[0]) - 1]] try:
dataslope = self.Data[0].data[islope[0][0:-1]]
except IndexError:
print("Slope Calculation: empty array islope, check signal window")
return
if len(dataslope) < 1: if len(dataslope) < 1:
print('No data in slope window found!') print('No data in slope window found!')
return return