diff --git a/pylot/core/pick/autopick.py b/pylot/core/pick/autopick.py index 396e4232..a1f9fd28 100755 --- a/pylot/core/pick/autopick.py +++ b/pylot/core/pick/autopick.py @@ -144,6 +144,7 @@ def autopickstation(wfstream, pickparam, verbose=False): Sflag = 0 Pmarker = [] Ao = None # Wood-Anderson peak-to-peak amplitude + picker = 'autoPyLoT' # name of the picking programm # split components zdat = wfstream.select(component="Z") @@ -796,21 +797,14 @@ def autopickstation(wfstream, pickparam, verbose=False): # create dictionary # for P phase - phase = 'P' - phasepick = {'lpp': lpickP, 'epp': epickP, 'mpp': mpickP, 'spe': Perror, - 'snr': SNRP, 'snrdb': SNRPdB, 'weight': Pweight, 'fm': FM, - 'w0': None, 'fc': None, 'Mo': None, 'Mw': None} - picks = {phase: phasepick} - # add P marker - picks[phase]['marked'] = Pmarker + ppick = dict(lpp=lpickP, epp=epickP, mpp=mpickP, spe=Perror, snr=SNRP, + snrdb=SNRPdB, weight=Pweight, fm=FM, w0=None, fc=None, Mo=None, + Mw=None, picker=picker, marked=Pmarker) # add S phase - phase = 'S' - phasepick = {'lpp': lpickS, 'epp': epickS, 'mpp': mpickS, 'spe': Serror, - 'snr': SNRS, 'snrdb': SNRSdB, 'weight': Sweight, 'fm': None} - picks[phase] = phasepick - # add Wood-Anderson amplitude - picks[phase]['Ao'] = Ao - + spick = dict(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 + picks = dict(P=ppick, S=spick) return picks diff --git a/pylot/core/read/data.py b/pylot/core/read/data.py index f48edf0d..fcbc3565 100644 --- a/pylot/core/read/data.py +++ b/pylot/core/read/data.py @@ -421,12 +421,14 @@ class Data(object): epp = phase['epp'] lpp = phase['lpp'] error = phase['spe'] + picker = phase['picker'] pick = Pick() pick.time = onset pick.time_errors.lower_uncertainty = onset - epp pick.time_errors.upper_uncertainty = lpp - onset pick.time_errors.uncertainty = error pick.phase_hint = label + pick.method_id = ResourceIdentifier(id=picker) pick.waveform_id = WaveformStreamID(station_code=station) self.getEvtData().picks.append(pick) try: