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(picks)
if savexml:
if savepath == 'None':
if savepath == 'None' or savepath == None:
savepath = eventpath
fnqml = '%s/PyLoT_%s' % (savepath, evID)
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
epp = mpp - pick.time_errors.lower_uncertainty
except TypeError as e:
msg = e.message + ',\n falling back to symmetric uncertainties'
msg = e + ',\n falling back to symmetric uncertainties'
warnings.warn(msg)
lpp = mpp + spe
epp = mpp - spe

View File

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