Take into account, that input_dict is not available when calling from terminal.
This commit is contained in:
parent
f4f7615bf8
commit
45ff145616
14
autoPyLoT.py
14
autoPyLoT.py
@ -185,7 +185,12 @@ def autoPyLoT(input_dict=None, parameter=None, inputfile=None, fnames=None, save
|
|||||||
print(wfdat)
|
print(wfdat)
|
||||||
##########################################################
|
##########################################################
|
||||||
# !automated picking starts here!
|
# !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
|
# locating
|
||||||
if locflag == 1:
|
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!")
|
print("autoPyLoT: Number of maximum iterations reached, stop iterative picking!")
|
||||||
break
|
break
|
||||||
print("autoPyLoT: Starting with iteration No. %d ..." % nlloccounter)
|
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
|
# write phases to NLLoc-phase file
|
||||||
nll.export(picks, phasefile, parameter)
|
nll.export(picks, phasefile, parameter)
|
||||||
# remove actual NLLoc-location file to keep only the last
|
# remove actual NLLoc-location file to keep only the last
|
||||||
|
@ -1 +1 @@
|
|||||||
fa2b-dirty
|
f4f76-dirty
|
||||||
|
Loading…
Reference in New Issue
Block a user