GUI testing

This commit is contained in:
Marcel Paffrath 2016-06-07 13:39:21 +02:00
parent 7e33502824
commit f3769846ba
2 changed files with 8 additions and 7 deletions

View File

@ -37,8 +37,8 @@ class Survey(object):
def _initiate_fnames(self):
for shot in self.data.values():
shot.setRecfile(self.getPath() + self.getReceiverfile())
shot.setSourcefile(self.getPath() + self.getSourcefile())
shot.setRecfile(self.getReceiverfile())
shot.setSourcefile(self.getSourcefile())
def _generateSurvey(self):
from obspy.core import read
@ -47,7 +47,7 @@ class Survey(object):
shotlist = self.getShotlist()
for shotnumber in shotlist: # loop over data files
# generate filenames and read manual picks to a list
obsfile = self._obsdir + str(shotnumber) + '_pickle.dat'
obsfile = os.path.join(self._obsdir, str(shotnumber)) + '_pickle.dat'
if obsfile not in shot_dict.keys():
shot_dict[shotnumber] = []
shot_dict[shotnumber] = seismicshot.SeismicShot(obsfile)
@ -354,7 +354,7 @@ class Survey(object):
'''
Returns a list of all shotnumbers contained in the set Sourcefile.
'''
filename = self.getPath() + self.getSourcefile()
filename = self.getSourcefile()
srcfile = open(filename, 'r')
shotlist = []
for line in srcfile.readlines():
@ -367,7 +367,7 @@ class Survey(object):
'''
Returns a list of all trace IDs contained in the set Receiverfile.
'''
filename = self.getPath() + self.getReceiverfile()
filename = self.getReceiverfile()
recfile = open(filename, 'r')
reclist = []
for line in recfile.readlines():

View File

@ -26,7 +26,7 @@ folm = 0.6 # fraction of local maximum for threshold pic
tsignal = 0.03
tgap = 0.0007
nproc = 32
nproc = 16
vmin = 333
vmax = 5500
@ -81,7 +81,8 @@ print('directory: %s\nsourcefile: %s\nreceiverfile: %s\nsurvey output filename:
if HosAic == 'aic': print('picking with AIC\n')
if HosAic == 'hos': print('picking with HOS\n')
survey = activeSeismoPick.Survey(obsdir, sourcefile, receiverfile, useDefaultParas = False)
survey = activeSeismoPick.Survey(obsdir, os.path.join(obsdir, sourcefile),
os.path.join(obsdir, receiverfile), useDefaultParas = False)
survey.setParametersForAllShots(cutwindow, tmovwind, tsignal, tgap)
surveyUtils.setDynamicFittedSNR(survey.getShotDict())
#surveyUtils.setConstantSNR(survey.getShotDict(), 0)