[WIP] autopicks -> update xml file
This commit is contained in:
parent
ac25f9cacb
commit
90e27f1d08
@ -170,13 +170,14 @@ class Data(object):
|
|||||||
print("xml-file already exists! Check content ...")
|
print("xml-file already exists! Check content ...")
|
||||||
cat_old = read_events(fnout + fnext)
|
cat_old = read_events(fnout + fnext)
|
||||||
checkflag = 0
|
checkflag = 0
|
||||||
for j in range(len(cat_old.events[0].picks)):
|
picks = cat_old.events[0].picks
|
||||||
if cat_old.events[0].picks[j].method_id.id.split('/')[1] == fcheck:
|
for j, pick in reversed(list(enumerate(picks))):
|
||||||
print("Found %s pick(s), append to new catalog." % fcheck)
|
if pick.method_id.id.split('/')[1] == fcheck:
|
||||||
checkflag = 1
|
picks.remove(j)
|
||||||
break
|
print("Found %s pick(s), remove them and append new picks to catalog." % fcheck)
|
||||||
|
checkflag = 1
|
||||||
if checkflag == 1:
|
if checkflag == 1:
|
||||||
self.get_evt_data().write(fnout + fnext, format=evtformat)
|
event = self.get_evt_data().write(fnout + fnext, format=evtformat)
|
||||||
cat_new = read_events(fnout + fnext)
|
cat_new = read_events(fnout + fnext)
|
||||||
cat_new.append(cat_old.events[0])
|
cat_new.append(cat_old.events[0])
|
||||||
cat_new.write(fnout + fnext, format=evtformat)
|
cat_new.write(fnout + fnext, format=evtformat)
|
||||||
@ -187,6 +188,7 @@ class Data(object):
|
|||||||
|
|
||||||
# try exporting event via ObsPy
|
# try exporting event via ObsPy
|
||||||
else:
|
else:
|
||||||
|
print(self.get_evt_data())
|
||||||
evtdata_copy = self.get_evt_data().copy()
|
evtdata_copy = self.get_evt_data().copy()
|
||||||
evtdata_org = self.get_evt_data()
|
evtdata_org = self.get_evt_data()
|
||||||
# check for stations picked automatically as well as manually
|
# check for stations picked automatically as well as manually
|
||||||
|
Loading…
Reference in New Issue
Block a user