diff --git a/pylot/core/pick/autopick.py b/pylot/core/pick/autopick.py index 6c4da6e3..168cf5d8 100644 --- a/pylot/core/pick/autopick.py +++ b/pylot/core/pick/autopick.py @@ -583,7 +583,7 @@ def autopickstation(wfstream, pickparam, verbose=False, aictsmoothS, fig=fig) ############################################################### # go on with processing if AIC onset passes quality control - slope = aicpick.getSlope() + slope = aicarhpick.getSlope() if not slope: slope = 0 if (slope >= minAICSslope and @@ -829,7 +829,14 @@ def autopickstation(wfstream, pickparam, verbose=False, ax1.set_ylim([-1.5, 1.5]) ax1.set_ylabel('Normalized Counts') # fig.suptitle(tr_filt.stats.starttime) - + try: + len(edat[0]) + except: + edat = ndat + try: + len(ndat[0]) + except: + ndat = edat if len(edat[0]) > 1 and len(ndat[0]) > 1 and Sflag == 1: # plot horizontal traces ax2 = fig.add_subplot(3, 1, 2, sharex=ax1) @@ -956,9 +963,14 @@ def autopickstation(wfstream, pickparam, verbose=False, else: # dummy values (start of seismic trace) in order to derive # theoretical onset times for iteratve picking - lpickS = edat[0].stats.starttime + timeerrorsS[3] - epickS = edat[0].stats.starttime - timeerrorsS[3] - mpickS = edat[0].stats.starttime + try: + lpickS = edat[0].stats.starttime + timeerrorsS[3] + epickS = edat[0].stats.starttime - timeerrorsS[3] + mpickS = edat[0].stats.starttime + except: + lpickS = ndat[0].stats.starttime + timeerrorsS[3] + epickS = ndat[0].stats.starttime - timeerrorsS[3] + mpickS = ndat[0].stats.starttime # create dictionary # for P phase @@ -968,8 +980,12 @@ def autopickstation(wfstream, pickparam, verbose=False, snrdb=SNRPdB, weight=Pweight, fm=FM, w0=None, fc=None, Mo=None, Mw=None, picker=picker, marked=Pmarker) # add S phase - ccode = edat[0].stats.channel - ncode = edat[0].stats.network + try: + ccode = edat[0].stats.channel + ncode = edat[0].stats.network + except: + ccode = ndat[0].stats.channel + ncode = ndat[0].stats.network spick = dict(channel=ccode, network=ncode, lpp=lpickS, epp=epickS, mpp=mpickS, spe=Serror, snr=SNRS, snrdb=SNRSdB, weight=Sweight, fm=None, picker=picker, Ao=Ao) # merge picks into returning dictionary