Merge branch 'develop' of ariadne.geophysik.rub.de:/data/git/pylot into develop

This commit is contained in:
Ludger Küperkoch 2017-08-15 14:49:11 +02:00
commit 503f72d6b0
3 changed files with 21 additions and 19 deletions

View File

@ -411,7 +411,7 @@ def autoPyLoT(input_dict=None, parameter=None, inputfile=None, fnames=None, even
data.applyEVTData(evt, 'event') data.applyEVTData(evt, 'event')
data.applyEVTData(picks) data.applyEVTData(picks)
if savexml: if savexml:
if savepath == 'None': if savepath == 'None' or savepath == None:
savepath = eventpath savepath = eventpath
fnqml = '%s/PyLoT_%s' % (savepath, evID) fnqml = '%s/PyLoT_%s' % (savepath, evID)
data.exportEvent(fnqml, fnext='.xml', fcheck=['auto', 'magnitude', 'origin']) data.exportEvent(fnqml, fnext='.xml', fcheck=['auto', 'magnitude', 'origin'])

View File

@ -222,7 +222,7 @@ def picksdict_from_picks(evt):
lpp = mpp + pick.time_errors.upper_uncertainty lpp = mpp + pick.time_errors.upper_uncertainty
epp = mpp - pick.time_errors.lower_uncertainty epp = mpp - pick.time_errors.lower_uncertainty
except TypeError as e: except TypeError as e:
msg = e.message + ',\n falling back to symmetric uncertainties' msg = e + ',\n falling back to symmetric uncertainties'
warnings.warn(msg) warnings.warn(msg)
lpp = mpp + spe lpp = mpp + spe
epp = mpp - spe epp = mpp - spe

View File

@ -1726,25 +1726,27 @@ class PickDlg(QDialog):
spe = picks['spe'] spe = picks['spe']
if picktype == 'manual': if picktype == 'manual':
color = pick_color_plt(picktype, phaseID, quality)
if not textOnly: if not textOnly:
linestyle_mpp, width_mpp = pick_linestyle_plt(picktype, 'mpp') linestyle_mpp, width_mpp = pick_linestyle_plt(picktype, 'mpp')
color = pick_color_plt(picktype, phaseID, quality) ax.plot([mpp, mpp], ylims, color=color, linestyle=linestyle_mpp, linewidth=width_mpp,
if picks['epp'] and picks['lpp']: label='{}-Pick (quality: {})'.format(phase, quality), picker=5)
ax.fill_between([epp, lpp], ylims[0], ylims[1],
alpha=.25, color=color, label='EPP, LPP')
if spe: if spe:
linestyle_spe, width_spe = pick_linestyle_plt(picktype, 'spe') ax.fill_between([mpp-spe, mpp+spe], ylims[0], ylims[1],
ax.plot([mpp - spe, mpp - spe], ylims, color=color, linestyle=linestyle_spe, alpha=.25, color=color, label='{}-SPE'.format(phase))
linewidth=width_spe, label='{}-SPE'.format(phase)) if epp:
ax.plot([mpp + spe, mpp + spe], ylims, color=color, linestyle=linestyle_spe, linestyle_epp, width_epp = pick_linestyle_plt(picktype, 'epp')
linewidth=width_spe) ax.plot([epp, epp], ylims, color=color, linestyle=linestyle_epp,
ax.plot([mpp, mpp], ylims, color=color, linestyle=linestyle_mpp, linewidth=width_mpp, linewidth=width_epp, label='{}-EPP'.format(phase))
label='{}-Pick (quality: {})'.format(phase, quality), picker=5) if lpp:
else: linestyle_lpp, width_lpp = pick_linestyle_plt(picktype, 'lpp')
ax.plot([mpp, mpp], ylims, color=color, linestyle=linestyle_mpp, linewidth=width_mpp, ax.plot([lpp, lpp], ylims, color=color, linestyle=linestyle_lpp,
label='{}-Pick (NO PICKERROR)'.format(phase), picker=5) linewidth=width_lpp, label='{}-LPP'.format(phase))
# append phase text (if textOnly: draw with current ylims) # else:
self.phaseText.append(ax.text(mpp, ylims[1], phase)) # ax.plot([mpp, mpp], ylims, color=color, linestyle=linestyle_mpp, linewidth=width_mpp,
# label='{}-Pick (NO PICKERROR)'.format(phase), picker=5)
# append phase text (if textOnly: draw with current ylims)
self.phaseText.append(ax.text(mpp, ylims[1], phase, color=color))
elif picktype == 'auto': elif picktype == 'auto':
color = pick_color_plt(picktype, phaseID, quality) color = pick_color_plt(picktype, phaseID, quality)
linestyle_mpp, width_mpp = pick_linestyle_plt(picktype, 'mpp') linestyle_mpp, width_mpp = pick_linestyle_plt(picktype, 'mpp')
@ -1754,7 +1756,7 @@ class PickDlg(QDialog):
ax.vlines(mpp, ylims[0], ylims[1], color=color, linestyle=linestyle_mpp, linewidth=width_mpp, ax.vlines(mpp, ylims[0], ylims[1], color=color, linestyle=linestyle_mpp, linewidth=width_mpp,
picker=5, label='{}-Autopick (quality: {})'.format(phase, quality)) picker=5, label='{}-Autopick (quality: {})'.format(phase, quality))
# append phase text (if textOnly: draw with current ylims) # append phase text (if textOnly: draw with current ylims)
self.phaseText.append(ax.text(mpp, ylims[1], phase)) self.phaseText.append(ax.text(mpp, ylims[1], phase, color=color))
else: else:
raise TypeError('Unknown picktype {0}'.format(picktype)) raise TypeError('Unknown picktype {0}'.format(picktype))