For multiple event processing eventID has to be derived out of event string. Uses module string.
This commit is contained in:
parent
b5b7453214
commit
dc088509d4
@ -6,7 +6,7 @@ import os
|
|||||||
import argparse
|
import argparse
|
||||||
import glob
|
import glob
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import string
|
||||||
from obspy.core import read
|
from obspy.core import read
|
||||||
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
|
||||||
@ -99,7 +99,6 @@ def autoPyLoT(inputfile):
|
|||||||
data.setWFData(glob.glob(os.path.join(datapath, event, '*')))
|
data.setWFData(glob.glob(os.path.join(datapath, event, '*')))
|
||||||
print('Working on event %s' % event)
|
print('Working on event %s' % event)
|
||||||
print(data)
|
print(data)
|
||||||
|
|
||||||
wfdat = data.getWFData() # all available streams
|
wfdat = data.getWFData() # all available streams
|
||||||
##########################################################
|
##########################################################
|
||||||
# !automated picking starts here!
|
# !automated picking starts here!
|
||||||
@ -114,7 +113,8 @@ def autoPyLoT(inputfile):
|
|||||||
# For locating the event the NLLoc-control file has to be modified!
|
# For locating the event the NLLoc-control file has to be modified!
|
||||||
# create comment line for NLLoc-control file
|
# create comment line for NLLoc-control file
|
||||||
# NLLoc-output file
|
# NLLoc-output file
|
||||||
nllocout = '%s/loc/%s_%s' % (nllocroot, event, nllocoutpatter)
|
evID = event[string.rfind(event, "/") + 1 : len(events) - 1]
|
||||||
|
nllocout = '%s/loc/%s_%s' % (nllocroot, evID, nllocoutpatter)
|
||||||
locfiles = 'LOCFILES %s NLLOC_OBS %s %s 0' % (phasefile, ttpatter, nllocout)
|
locfiles = 'LOCFILES %s NLLOC_OBS %s %s 0' % (phasefile, ttpatter, nllocout)
|
||||||
print ("Modifying NLLoc-control file %s ..." % locfile)
|
print ("Modifying NLLoc-control file %s ..." % locfile)
|
||||||
# modification of NLLoc-control file
|
# modification of NLLoc-control file
|
||||||
@ -133,7 +133,7 @@ def autoPyLoT(inputfile):
|
|||||||
##########################################################
|
##########################################################
|
||||||
# write phase files for various location routines
|
# write phase files for various location routines
|
||||||
# HYPO71
|
# HYPO71
|
||||||
hypo71file = '%s/%s/autoPyLoT_HYPO71.pha' % (datapath, eventID)
|
hypo71file = '%s/%s/autoPyLoT_HYPO71.pha' % (datapath, evID)
|
||||||
writephases(picks, 'HYPO71', hypo71file)
|
writephases(picks, 'HYPO71', hypo71file)
|
||||||
|
|
||||||
print '------------------------------------------'
|
print '------------------------------------------'
|
||||||
|
Loading…
Reference in New Issue
Block a user