Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -294,7 +294,6 @@ class Data(object):
|
||||
:raise OverwriteError: raises an OverwriteError if the picks list is
|
||||
not empty. The GUI will then ask for a decision.
|
||||
"""
|
||||
|
||||
#firstonset = find_firstonset(picks)
|
||||
# check for automatic picks
|
||||
print("Writing phases to ObsPy-quakeml file")
|
||||
|
||||
@@ -217,4 +217,4 @@ def create_resourceID(timetohash, restype, authority_id=None, hrstr=None):
|
||||
resID = ope.ResourceIdentifier(restype + '/' + hrstr)
|
||||
if authority_id is not None:
|
||||
resID.convertIDToQuakeMLURI(authority_id=authority_id)
|
||||
return resID
|
||||
return resID
|
||||
|
||||
@@ -194,6 +194,7 @@ def picksdict_from_picks(evt):
|
||||
for pick in evt.picks:
|
||||
phase = {}
|
||||
station = pick.waveform_id.station_code
|
||||
channel = pick.waveform_id.channel_code
|
||||
try:
|
||||
onsets = picks[station]
|
||||
except KeyError as e:
|
||||
@@ -213,6 +214,7 @@ def picksdict_from_picks(evt):
|
||||
phase['epp'] = epp
|
||||
phase['lpp'] = lpp
|
||||
phase['spe'] = spe
|
||||
phase['channel'] = channel
|
||||
try:
|
||||
picker = str(pick.method_id)
|
||||
if picker.startswith('smi:local/'):
|
||||
@@ -232,8 +234,11 @@ def picks_from_picksdict(picks, creation_info=None):
|
||||
if not isinstance(phase, dict):
|
||||
continue
|
||||
onset = phase['mpp']
|
||||
ccode = phase['channel']
|
||||
ncode = phase['network']
|
||||
try:
|
||||
ccode = phase['channel']
|
||||
ncode = phase['network']
|
||||
except:
|
||||
continue
|
||||
pick = ope.Pick()
|
||||
if creation_info:
|
||||
pick.creation_info = creation_info
|
||||
@@ -830,8 +835,9 @@ def merge_picks(event, picks):
|
||||
err = pick.time_errors
|
||||
phase = pick.phase_hint
|
||||
station = pick.waveform_id.station_code
|
||||
method = pick.method_id
|
||||
for p in event.picks:
|
||||
if p.waveform_id.station_code == station and p.phase_hint == phase:
|
||||
p.time, p.time_errors = time, err
|
||||
del time, err, phase, station
|
||||
p.time, p.time_errors, p.method_id = time, err, method
|
||||
del time, err, phase, station, method
|
||||
return event
|
||||
|
||||
@@ -446,6 +446,7 @@ class WaveformWidget(FigureCanvas):
|
||||
stime = trace.stats.starttime - wfstart
|
||||
time_ax = prepTimeAxis(stime, trace)
|
||||
if not scaleddata:
|
||||
trace.detrend('constant')
|
||||
trace.normalize(np.max(np.abs(trace.data)) * 2)
|
||||
self.getAxes().plot(time_ax, trace.data + n, 'k')
|
||||
if noiselevel is not None:
|
||||
|
||||
Reference in New Issue
Block a user