diff --git a/pylot/core/active/seismicshot.py b/pylot/core/active/seismicshot.py index 5b21024a..ecb602c2 100644 --- a/pylot/core/active/seismicshot.py +++ b/pylot/core/active/seismicshot.py @@ -1,3 +1,6 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + import os import numpy as np from obspy.core import read @@ -145,7 +148,7 @@ class SeismicShot(object): def getPickError(self, traceID): pickerror = abs(self.getEarliest(traceID) - self.getLatest(traceID)) 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 def getStreamTraceIDs(self): @@ -170,7 +173,7 @@ class SeismicShot(object): def getPickwindow(self, traceID): try: self.pickwindow[traceID] - except KeyError, e: + except KeyError as e: print('no pickwindow for trace %s, set to %s' % (traceID, self.getCut())) self.setPickwindow(traceID, self.getCut()) return self.pickwindow[traceID] @@ -253,7 +256,7 @@ class SeismicShot(object): return Stream(traces) else: 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) diff --git a/pylot/core/active/surveyUtils.py b/pylot/core/active/surveyUtils.py index 4fbbe603..909fed13 100644 --- a/pylot/core/active/surveyUtils.py +++ b/pylot/core/active/surveyUtils.py @@ -1,3 +1,6 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + import numpy as np def readParameters(parfile, parameter):