Cosmetics, focused on python-3 compatibility of print statements.
This commit is contained in:
parent
d933c30148
commit
6177c6292c
46
autoPyLoT.py
46
autoPyLoT.py
@ -88,7 +88,9 @@ def autoPyLoT(inputfile):
|
|||||||
nllocoutpatter = parameter.getParam('outpatter')
|
nllocoutpatter = parameter.getParam('outpatter')
|
||||||
else:
|
else:
|
||||||
locflag = 0
|
locflag = 0
|
||||||
print ("!!No location routine available, autoPyLoT just picks the events without locating them!!")
|
print (" !!! ")
|
||||||
|
print ("!!No location routine available, autoPyLoT is running in non-location mode!!")
|
||||||
|
print (" !!! ")
|
||||||
|
|
||||||
|
|
||||||
# multiple event processing
|
# multiple event processing
|
||||||
@ -130,20 +132,28 @@ def autoPyLoT(inputfile):
|
|||||||
|
|
||||||
# locate the event
|
# locate the event
|
||||||
subprocess.call([nlloccall, locfile])
|
subprocess.call([nlloccall, locfile])
|
||||||
|
|
||||||
|
# !iterative picking if traces remained unpicked or with bad picks!
|
||||||
|
# get theoretical onset times for picks with weights >= 4
|
||||||
|
# in order to reprocess them using smaller time windows
|
||||||
##########################################################
|
##########################################################
|
||||||
# write phase files for various location routines
|
# write phase files for various location routines
|
||||||
# HYPO71
|
# HYPO71
|
||||||
hypo71file = '%s/%s/autoPyLoT_HYPO71.pha' % (datapath, evID)
|
hypo71file = '%s/%s/autoPyLoT_HYPO71.pha' % (datapath, evID)
|
||||||
writephases(picks, 'HYPO71', hypo71file)
|
writephases(picks, 'HYPO71', hypo71file)
|
||||||
|
|
||||||
print '------------------------------------------'
|
endsplash = '''------------------------------------------\n'
|
||||||
print '-----Finished event %s!-----' % event
|
-----Finished event %s!-----\n'
|
||||||
print '------------------------------------------'
|
------------------------------------------'''.format \
|
||||||
|
(version=_getVersionString()) % evID
|
||||||
|
print(endsplash)
|
||||||
|
if locflag == 0:
|
||||||
|
print("autoPyLoT was running in non-location mode!")
|
||||||
|
|
||||||
# single event processing
|
# single event processing
|
||||||
else:
|
else:
|
||||||
data.setWFData(glob.glob(os.path.join(datapath, parameter.getParam('eventID'), '*')))
|
data.setWFData(glob.glob(os.path.join(datapath, parameter.getParam('eventID'), '*')))
|
||||||
print 'Working on event ', parameter.getParam('eventID')
|
print("Working on event "), parameter.getParam('eventID')
|
||||||
print data
|
print data
|
||||||
|
|
||||||
wfdat = data.getWFData() # all available streams
|
wfdat = data.getWFData() # all available streams
|
||||||
@ -175,22 +185,30 @@ def autoPyLoT(inputfile):
|
|||||||
|
|
||||||
# locate the event
|
# locate the event
|
||||||
subprocess.call([nlloccall, locfile])
|
subprocess.call([nlloccall, locfile])
|
||||||
|
|
||||||
|
# !iterative picking if traces remained unpicked or with bad picks!
|
||||||
|
# get theoretical onset times for picks with weights >= 4
|
||||||
|
# in order to reprocess them using smaller time windows
|
||||||
##########################################################
|
##########################################################
|
||||||
# write phase files for various location routines
|
# write phase files for various location routines
|
||||||
# HYPO71
|
# HYPO71
|
||||||
hypo71file = '%s/%s/autoPyLoT_HYPO71.pha' % (datapath, parameter.getParam('eventID'))
|
hypo71file = '%s/%s/autoPyLoT_HYPO71.pha' % (datapath, parameter.getParam('eventID'))
|
||||||
writephases(picks, 'HYPO71', hypo71file)
|
writephases(picks, 'HYPO71', hypo71file)
|
||||||
|
|
||||||
|
endsplash = '''------------------------------------------\n'
|
||||||
|
-----Finished event %s!-----\n'
|
||||||
|
------------------------------------------'''.format \
|
||||||
|
(version=_getVersionString()) % parameter.getParam('eventID')
|
||||||
|
print(endsplash)
|
||||||
|
if locflag == 0:
|
||||||
|
print("autoPyLoT was running in non-location mode!")
|
||||||
|
|
||||||
print '------------------------------------------'
|
endsp = '''####################################\n
|
||||||
print '-------Finished event %s!-------' % parameter.getParam('eventID')
|
************************************\n
|
||||||
print '------------------------------------------'
|
*********autoPyLoT terminates*******\n
|
||||||
|
The Python picking and Location Tool\n
|
||||||
print '####################################'
|
************************************'''.format(version=_getVersionString())
|
||||||
print '************************************'
|
print(endsp)
|
||||||
print '*********autoPyLoT terminates*******'
|
|
||||||
print 'The Python picking and Location Tool'
|
|
||||||
print '************************************'
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# parse arguments
|
# parse arguments
|
||||||
|
Loading…
Reference in New Issue
Block a user