[obspy-users] quakeml remove pick

VICIC BLAZ [PHD0900016] BLAZ.VICIC at phd.units.it
Thu Feb 9 16:30:29 CET 2017


Dear all.


I have a bunch of quakeml event files. Somehow, when they got exported, also some strange picks got exported with them.

now, is there a way to remove pick out of quakeml so next time i try to open quakeml, this pick will not be inside?

i tried with


from obspy import read_events, Catalog
cat2 = Catalog()
cat = read_events("2014-04-22T08_58_27.612000Z.xml")

for event in cat:
for pick in event.picks:
if pick.phase_hint==None:
event.picks.remove(pick)
else:
continue
cat2.append(event)

print(cat2)
for event in cat2:
for pick in event.picks:
print(pick.waveform_id.station_code, pick.waveform_id.channel_code, pick.phase_hint)

at last print, there are still picks with no info (None)

Any help would be appreciated

on the link, you can find the quakeml file:
https://drive.google.com/open?id=0BzMcKedS7yadS1NxekNBakxJTzg

Thank you very much,
Blaž

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.swapbytes.de/pipermail/obspy-users/attachments/20170209/ec3761ed/attachment.html>


More information about the obspy-users mailing list