general code clean-up

This commit is contained in:
Sebastian Wehling-Benatelli 2015-10-19 05:32:10 +02:00
parent b49206407a
commit 0fa701a878
30 changed files with 270 additions and 249 deletions

View File

@ -8,11 +8,11 @@ import glob
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
from obspy.core import read from obspy.core import read
from pylot.core.util import _getVersionString
from pylot.core.read.data import Data from pylot.core.read.data import Data
from pylot.core.read.inputs import AutoPickParameter from pylot.core.read.inputs import AutoPickParameter
from pylot.core.util.structure import DATASTRUCTURE from pylot.core.util.structure import DATASTRUCTURE
from pylot.core.pick.autopick import autopickevent from pylot.core.pick.autopick import autopickevent
from pylot.core.util.version import get_git_version as _getVersionString
__version__ = _getVersionString() __version__ = _getVersionString()

View File

@ -0,0 +1 @@
# -*- coding: utf-8 -*-

View File

@ -1 +1,2 @@
# -*- coding: utf-8 -*-
__author__ = 'sebastianw' __author__ = 'sebastianw'

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
import sys import sys
import numpy as np import numpy as np
from pylot.core.active import seismicshot from pylot.core.active import seismicshot
@ -144,8 +145,8 @@ class Survey(object):
def countAllTraces(self): def countAllTraces(self):
numtraces = 0 numtraces = 0
for line in self.getShotlist(): for shot in self.getShotlist():
for line in self.getReceiverlist(): for rec in self.getReceiverlist():
numtraces += 1 numtraces += 1
return numtraces return numtraces

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
import numpy as np import numpy as np
def vgrids2VTK(inputfile = 'vgrids.in', outputfile = 'vgrids.vtk'): def vgrids2VTK(inputfile = 'vgrids.in', outputfile = 'vgrids.vtk'):

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
import sys import sys
from obspy import read from obspy import read
from obspy import Stream from obspy import Stream

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
import sys import sys
import numpy as np import numpy as np
from scipy.interpolate import griddata from scipy.interpolate import griddata

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
import sys import sys
import numpy as np import numpy as np
from scipy.interpolate import griddata from scipy.interpolate import griddata

View File

@ -35,8 +35,7 @@ class SeismicShot(object):
self.snr = {} self.snr = {}
self.snrthreshold = {} self.snrthreshold = {}
self.timeArray = {} self.timeArray = {}
self.paras = {} self.paras = {'shotname': obsfile}
self.paras['shotname'] = obsfile
def removeEmptyTraces(self): def removeEmptyTraces(self):
traceIDs = [] traceIDs = []

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
plt.interactive(True) plt.interactive(True)

View File

@ -0,0 +1 @@
# -*- coding: utf-8 -*-

View File

@ -6,7 +6,7 @@ from obspy.signal.trigger import coincidenceTrigger
class CoincidenceTimes(): class CoincidenceTimes(object):
def __init__(self, st, comp='Z', coinum=4, sta=1., lta=10., on=5., off=1.): def __init__(self, st, comp='Z', coinum=4, sta=1., lta=10., on=5., off=1.):
_type = 'recstalta' _type = 'recstalta'

View File

@ -1,3 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
Created August/September 2015. Created August/September 2015.

View File

@ -1,3 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
Created Oct/Nov 2014 Created Oct/Nov 2014

View File

@ -312,7 +312,7 @@ class PragPicker(AutoPicking):
else: else:
for i in range(1, len(self.cf)): for i in range(1, len(self.cf)):
if i > ismooth: if i > ismooth:
ii1 = i - ismooth; ii1 = i - ismooth
cfsmooth[i] = cfsmooth[i - 1] + (self.cf[i] - self.cf[ii1]) / ismooth cfsmooth[i] = cfsmooth[i - 1] + (self.cf[i] - self.cf[ii1]) / ismooth
else: else:
cfsmooth[i] = np.mean(self.cf[1 : i]) cfsmooth[i] = np.mean(self.cf[1 : i])

View File

@ -1 +1,2 @@
# -*- coding: utf-8 -*-
# #

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*-
# #
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """

View File

@ -1 +1 @@
# -*- coding: utf-8 -*-

View File

@ -208,8 +208,7 @@ class FilterOptions(object):
def parseFilterOptions(self): def parseFilterOptions(self):
if self.getFilterType(): if self.getFilterType():
robject = {'type':self.getFilterType()} robject = {'type': self.getFilterType(), 'corners': self.getOrder()}
robject['corners'] = self.getOrder()
if len(self.getFreq()) > 1: if len(self.getFreq()) > 1:
robject['freqmin'] = self.getFreq()[0] robject['freqmin'] = self.getFreq()[0]
robject['freqmax'] = self.getFreq()[1] robject['freqmax'] = self.getFreq()[1]

View File

@ -1 +1,2 @@
# -*- coding: utf-8 -*-
from pylot.core.util.version import get_git_version as _getVersionString from pylot.core.util.version import get_git_version as _getVersionString

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
''' '''
Created on 10.11.2014 Created on 10.11.2014

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
''' '''
Created on 10.11.2014 Created on 10.11.2014

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
import sys import sys
from PySide.QtCore import QThread, Signal from PySide.QtCore import QThread, Signal

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*-
# #
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, time import sys, time
from PySide.QtGui import QApplication from PySide.QtGui import QApplication

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys import sys
import matplotlib import matplotlib

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, time import sys, time
from PySide.QtGui import QApplication from PySide.QtGui import QApplication

View File

@ -1,4 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, time import sys, time
from PySide.QtGui import QApplication from PySide.QtGui import QApplication