[change] added plots for debugging

This commit is contained in:
Sebastian Wehling-Benatelli 2016-06-13 14:23:42 +02:00
parent 79f0982558
commit 3cee0e6df9
2 changed files with 26 additions and 0 deletions

View File

@ -223,6 +223,9 @@ class PDFDictionary(object):
else: else:
return True return True
def __getitem__(self, item):
return self.pdf_data[item]
@property @property
def pdf_data(self): def pdf_data(self):
return self._pdfdata return self._pdfdata

View File

@ -203,7 +203,14 @@ class ComparisonDialog(QDialog):
self.plotcomparison() self.plotcomparison()
def plotcomparison(self): def plotcomparison(self):
from matplotlib import gridspec
_axes = self.canvas.figure.add_subplot(111) _axes = self.canvas.figure.add_subplot(111)
_gs = gridspec.GridSpec(3, 2)
_axes = self.canvas.figure.add_subplot(_gs[0:2, :])
_ax1 = self.canvas.figure.add_subplot(_gs[2, 0])
_ax2 = self.canvas.figure.add_subplot(_gs[2, 1])
_axes.cla() _axes.cla()
station = self.plotprops['station'] station = self.plotprops['station']
phase = self.plotprops['phase'] phase = self.plotprops['phase']
@ -222,6 +229,22 @@ class ComparisonDialog(QDialog):
'fraction') 'fraction')
bbox_props = dict(boxstyle='round', facecolor='lightgrey', alpha=.7) bbox_props = dict(boxstyle='round', facecolor='lightgrey', alpha=.7)
_anno.set_bbox(bbox_props) _anno.set_bbox(bbox_props)
pdf_a = self.data.get('auto')[station][phase]
pdf_m = self.data.get('manu')[station][phase]
xauto, yauto, stdauto, expauto = pdf_a.axis, pdf_a.data, \
pdf_a.standard_deviation(), \
pdf_a.expectation()
xmanu, ymanu, stdmanu, expmanu = pdf_m.axis, pdf_m.data, \
pdf_m.standard_deviation(), \
pdf_m.expectation()
_ax1.plot(xauto, yauto)
_ax2.plot(xmanu, ymanu)
_gs.update(wspace=0.5, hspace=0.5)
self.canvas.draw() self.canvas.draw()
def plothist(self): def plothist(self):