meet style conventions
This commit is contained in:
parent
7120a20499
commit
4109696800
@ -1,3 +1,6 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from obspy.core import read
|
from obspy.core import read
|
||||||
@ -145,7 +148,7 @@ class SeismicShot(object):
|
|||||||
def getPickError(self, traceID):
|
def getPickError(self, traceID):
|
||||||
pickerror = abs(self.getEarliest(traceID) - self.getLatest(traceID))
|
pickerror = abs(self.getEarliest(traceID) - self.getLatest(traceID))
|
||||||
if np.isnan(pickerror) == True:
|
if np.isnan(pickerror) == True:
|
||||||
print "SPE is NaN for shot %s, traceID %s"%(self.getShotnumber(), traceID)
|
print("SPE is NaN for shot %s, traceID %s"%(self.getShotnumber(), traceID))
|
||||||
return pickerror
|
return pickerror
|
||||||
|
|
||||||
def getStreamTraceIDs(self):
|
def getStreamTraceIDs(self):
|
||||||
@ -170,7 +173,7 @@ class SeismicShot(object):
|
|||||||
def getPickwindow(self, traceID):
|
def getPickwindow(self, traceID):
|
||||||
try:
|
try:
|
||||||
self.pickwindow[traceID]
|
self.pickwindow[traceID]
|
||||||
except KeyError, e:
|
except KeyError as e:
|
||||||
print('no pickwindow for trace %s, set to %s' % (traceID, self.getCut()))
|
print('no pickwindow for trace %s, set to %s' % (traceID, self.getCut()))
|
||||||
self.setPickwindow(traceID, self.getCut())
|
self.setPickwindow(traceID, self.getCut())
|
||||||
return self.pickwindow[traceID]
|
return self.pickwindow[traceID]
|
||||||
@ -253,7 +256,7 @@ class SeismicShot(object):
|
|||||||
return Stream(traces)
|
return Stream(traces)
|
||||||
else:
|
else:
|
||||||
self.setPick(traceID, None)
|
self.setPick(traceID, None)
|
||||||
print 'Warning: ambigious or empty traceID: %s' % traceID
|
print('Warning: ambigious or empty traceID: %s' % traceID)
|
||||||
|
|
||||||
#raise ValueError('ambigious or empty traceID: %s' % traceID)
|
#raise ValueError('ambigious or empty traceID: %s' % traceID)
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
def readParameters(parfile, parameter):
|
def readParameters(parfile, parameter):
|
||||||
|
Loading…
Reference in New Issue
Block a user