Bugfix: Captured error, if earllatepicker returns None for lpickS1/2, epickS1/2, and Serror1/2.

This commit is contained in:
Ludger Küperkoch 2015-11-24 13:35:23 +01:00
parent ab8775c58d
commit 7f05568f65

View File

@ -500,6 +500,7 @@ def autopickstation(wfstream, pickparam):
[lpickS2, epickS2, Serror2] = earllatepicker(h_copy, nfacS,
tsnrh,
mpickS, iplot)
if epickS1 is not None and epickS2 is not None:
if algoS == 'ARH':
# get earliest pick of both earliest possible picks
epick = [epickS1, epickS2]
@ -531,6 +532,7 @@ def autopickstation(wfstream, pickparam):
elif epickS1 is not None and epickS2 is not None \
and epickS3 is not None:
ipick = np.argmin([epickS1, epickS2, epickS3])
epickS = epick[ipick]
lpickS = lpick[ipick]
Serror = pickerr[ipick]