From 0b1f16866bb45859bebb651343a1f448009bd621 Mon Sep 17 00:00:00 2001 From: Marcel Paffrath Date: Fri, 11 Dec 2015 11:08:06 +0100 Subject: [PATCH] added plotHist --- pylot/core/active/activeSeismoPick.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pylot/core/active/activeSeismoPick.py b/pylot/core/active/activeSeismoPick.py index 3cf59e80..ce8ea46d 100644 --- a/pylot/core/active/activeSeismoPick.py +++ b/pylot/core/active/activeSeismoPick.py @@ -155,6 +155,17 @@ class Survey(object): ax.set_ylabel('Time [s]') ax.text(0.5, 0.95, 'Plot of all MANUAL picks', transform=ax.transAxes, horizontalalignment='center') + def plotHist(self): + import matplotlib.pyplot as plt + plt.interactive(True) + diffs = [] + for shot in self.data.values(): + for traceID in shot.getTraceIDlist(): + if shot.getPickFlag(traceID) == 1 and shot.getManualPickFlag(traceID) == 1: + diffs.append(self.getDiffsFromManual()[shot][traceID]) + plt.hist(diffs, 20) + plt.title('Histogram of the differences between automatic and manual pick') + plt.xlabel('Difference in time (auto - manual) [s]') def pickAllShots(self, windowsize, HosAic = 'hos', vmin = 333, vmax = 5500, folm = 0.6): '''