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