debugged some code fragments while trying to solve the load event data problem

This commit is contained in:
2015-09-17 17:55:40 +02:00
8 changed files with 58 additions and 31 deletions

View File

@@ -218,7 +218,7 @@ class AICcf(CharacteristicFunction):
def calcCF(self, data):
print 'Calculating AIC ...'
#print 'Calculating AIC ...' ## MP MP output suppressed
x = self.getDataArray()
xnp = x[0].data
nn = np.isnan(xnp)
@@ -260,7 +260,7 @@ class HOScf(CharacteristicFunction):
y = np.power(xnp, 3)
y1 = np.power(xnp, 2)
elif self.getOrder() == 4: # this is kurtosis
print 'Calculating kurtosis ...'
#print 'Calculating kurtosis ...' ## MP MP output suppressed
y = np.power(xnp, 4)
y1 = np.power(xnp, 2)

View File

@@ -18,6 +18,7 @@ calculated after Diehl & Kissling (2009).
:author: MAGS2 EP3 working group / Ludger Kueperkoch
"""
import numpy as np
import matplotlib.pyplot as plt
from pylot.core.pick.utils import getnoisewin, getsignalwin
@@ -245,8 +246,7 @@ class AICPicker(AutoPicking):
if datafit[0] >= datafit[len(datafit) - 1]:
print 'AICPicker: Negative slope, bad onset skipped!'
return
self.slope = 1 / tslope * datafit[len(dataslope) - 1] - datafit[0]
self.slope = 1 / tslope * (datafit[len(dataslope) - 1] - datafit[0])
else:
self.SNR = None

View File

@@ -43,7 +43,13 @@ def earllatepicker(X, nfac, TSNR, Pick1, iplot=None):
LPick = None
EPick = None
PickError = None
<<<<<<< Updated upstream
print ("earllatepicker: Get earliest and latest possible pick relative to most likely pick ...")
=======
# MP MP ++ output suppressed
#print 'earllatepicker: Get earliest and latest possible pick relative to most likely pick ...'
# MP MP --
>>>>>>> Stashed changes
x = X[0].data
t = np.arange(0, X[0].stats.npts / X[0].stats.sampling_rate,

View File

@@ -386,6 +386,9 @@ class Data(object):
"""
return self.evtdata
def setEvtData(self, event):
self.evtdata = event
def applyEVTData(self, data, type='pick', authority_id='rub'):
"""
@@ -447,7 +450,10 @@ class Data(object):
:param event:
"""
pass
if not self.isNew():
self.setEvtData(event)
else:
raise OverwriteError('Acutal event would be overwritten!')
applydata = {'pick': applyPicks,
'arrival': applyArrivals,

View File

@@ -105,10 +105,10 @@ class MPLWidget(FigureCanvas):
for level in noiselevel:
self.getAxes().plot([time_ax[0], time_ax[-1]],
[level, level], '--k')
xlabel = 'seconds since {0}'.format(wfstart)
ylabel = ''
self.updateWidget(xlabel, ylabel, title)
self.setPlotDict(n, (station, channel))
xlabel = 'seconds since {0}'.format(wfstart)
ylabel = ''
self.updateWidget(xlabel, ylabel, title)
self.setXLims([0, wfend - wfstart])
self.setYLims([-0.5, n + 0.5])
if zoomx is not None: