[edit] introducing picker tag
New tag introduced to distinguish between pickers (either person's or programs name)
This commit is contained in:
parent
438b2706b7
commit
31d56cb287
@ -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
|
||||
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user