From b30ab69ad223d9cb0430436220c1d499d413ee2c Mon Sep 17 00:00:00 2001 From: marcel Date: Mon, 21 Aug 2017 15:33:00 +0200 Subject: [PATCH] [bugfix] teach comparison to cope without pick --- pylot/core/util/widgets.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index 08b8e003..87978ea1 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -271,6 +271,10 @@ class ComparisonDialog(QDialog): # _axes.cla() station = self.plotprops['station'] phase = self.plotprops['phase'] + if not phase in self.data.comparison[station]: + _axes.set_title('No pick found for phase {}.'.format(phase)) + self.canvas.draw() + return pdf = self.data.comparison[station][phase] x, y, std, exp = pdf.axis, pdf.data, pdf.standard_deviation(), \ pdf.expectation()