Take into account, that input_dict is not available when calling from terminal.

This commit is contained in:
Ludger Küperkoch 2017-05-18 10:09:51 +02:00
parent f4f7615bf8
commit 45ff145616
2 changed files with 13 additions and 3 deletions

View File

@ -185,7 +185,12 @@ def autoPyLoT(input_dict=None, parameter=None, inputfile=None, fnames=None, save
print(wfdat)
##########################################################
# !automated picking starts here!
picks = autopickevent(wfdat, parameter, iplot=iplot, fig_dict=fig_dict)
if input_dict:
if input_dict.has_key('fig_dict'):
fig_dict = input_dict['fig_dict']
picks = autopickevent(wfdat, parameter, iplot=iplot, fig_dict=fig_dict)
else:
picks = autopickevent(wfdat, parameter, iplot=iplot)
##########################################################
# locating
if locflag == 1:
@ -252,7 +257,12 @@ def autoPyLoT(input_dict=None, parameter=None, inputfile=None, fnames=None, save
print("autoPyLoT: Number of maximum iterations reached, stop iterative picking!")
break
print("autoPyLoT: Starting with iteration No. %d ..." % nlloccounter)
picks = iteratepicker(wfdat, nllocfile, picks, badpicks, parameter, fig_dict=fig_dict)
if input_dict:
if input_dict.has_key('fig_dict'):
fig_dict = input_dict['fig_dict']
picks = iteratepicker(wfdat, nllocfile, picks, badpicks, parameter, fig_dict=fig_dict)
else:
picks = iteratepicker(wfdat, nllocfile, picks, badpicks, parameter)
# write phases to NLLoc-phase file
nll.export(picks, phasefile, parameter)
# remove actual NLLoc-location file to keep only the last

View File

@ -1 +1 @@
fa2b-dirty
f4f76-dirty