[add] parameter savexml added to autoPyLoT
This commit is contained in:
parent
0a8f6f8a39
commit
3cd64d09de
11
autoPyLoT.py
11
autoPyLoT.py
@ -32,8 +32,8 @@ from pylot.core.util.version import get_git_version as _getVersionString
|
||||
__version__ = _getVersionString()
|
||||
|
||||
|
||||
def autoPyLoT(input_dict=None, parameter=None, inputfile=None, fnames=None, eventid=None, savepath=None, station='all',
|
||||
iplot=0, ncores=0):
|
||||
def autoPyLoT(input_dict=None, parameter=None, inputfile=None, fnames=None, eventid=None, savepath=None,
|
||||
savexml=True, station='all', iplot=0, ncores=0):
|
||||
"""
|
||||
Determine phase onsets automatically utilizing the automatic picking
|
||||
algorithms by Kueperkoch et al. 2010/2012.
|
||||
@ -93,6 +93,8 @@ def autoPyLoT(input_dict=None, parameter=None, inputfile=None, fnames=None, even
|
||||
iplot = input_dict['iplot']
|
||||
if 'locflag' in input_dict:
|
||||
locflag = input_dict['locflag']
|
||||
if 'savexml' in input_dict:
|
||||
savexml = input_dict['savexml']
|
||||
|
||||
if not parameter:
|
||||
if inputfile:
|
||||
@ -408,7 +410,10 @@ def autoPyLoT(input_dict=None, parameter=None, inputfile=None, fnames=None, even
|
||||
event_id = eventpath.split('/')[-1]
|
||||
evt.resource_id = ResourceIdentifier('smi:local/' + event_id)
|
||||
data.applyEVTData(evt, 'event')
|
||||
fnqml = '%s/PyLoT_%s' % (eventpath, evID)
|
||||
if savexml:
|
||||
if not savepath:
|
||||
savepath = eventpath
|
||||
fnqml = '%s/PyLoT_%s' % (savepath, evID)
|
||||
data.exportEvent(fnqml, fnext='.xml', fcheck=['auto', 'magnitude', 'origin'])
|
||||
if locflag == 1:
|
||||
# HYPO71
|
||||
|
@ -2325,7 +2325,8 @@ class TuneAutopicker(QWidget):
|
||||
'eventid': self.get_current_event_fp(),
|
||||
'iplot': 2,
|
||||
'fig_dict': self.fig_dict,
|
||||
'locflag': 0}
|
||||
'locflag': 0,
|
||||
'savexml': False}
|
||||
for key in self.fig_dict.keys():
|
||||
self.fig_dict[key].clear()
|
||||
self.ap_thread = Thread(self, autoPyLoT, arg=args,
|
||||
|
Loading…
Reference in New Issue
Block a user