Export of phases for VELEST, hypoDD and HASH only possible if event location is available.
This commit is contained in:
parent
92a1c77f9c
commit
15fd175813
11
autoPyLoT.py
11
autoPyLoT.py
@ -2,7 +2,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import pdb
|
||||
import argparse
|
||||
import glob
|
||||
import os
|
||||
@ -114,6 +114,13 @@ def autoPyLoT(inputfile):
|
||||
for event in events:
|
||||
data.setWFData(glob.glob(os.path.join(datapath, event, '*')))
|
||||
evID = os.path.split(event)[-1]
|
||||
# the following is necessary because within
|
||||
# multiple event processing no event ID is provided
|
||||
# in autopylot.in
|
||||
try:
|
||||
parameter.get('eventID')
|
||||
except:
|
||||
parameter.setParam(eventID=event)
|
||||
print('Working on event %s' % event)
|
||||
print(data)
|
||||
wfdat = data.getWFData() # all available streams
|
||||
@ -229,6 +236,7 @@ def autoPyLoT(inputfile):
|
||||
print("Network moment magnitude: %4.1f" % net_mw.mag)
|
||||
else:
|
||||
print("autoPyLoT: No NLLoc-location file available! Stop iteration!")
|
||||
locflag = 9
|
||||
##########################################################
|
||||
# write phase files for various location
|
||||
# and fault mechanism calculation routines
|
||||
@ -244,6 +252,7 @@ def autoPyLoT(inputfile):
|
||||
# HYPOSAT
|
||||
hyposatfile = '%s/autoPyLoT_HYPOSAT_phases' % event
|
||||
hyposat.export(picks, hyposatfile, parameter)
|
||||
if locflag == 1:
|
||||
# VELEST
|
||||
velestfile = '%s/autoPyLoT_VELEST_phases.cnv' % event
|
||||
velest.export(picks, velestfile, parameter, evt)
|
||||
|
Loading…
Reference in New Issue
Block a user