Creating an event catalogue

Hi all

I’m running an automatic picker on some continuous data (day files).

I want to analyse these picks using obspyck. To do this, I need to create a QuakeML file of an ‘event’ containing all the picks for a particular set of day file traces.

I’m familiar with obtaining event catalogues from repositories, but how do I go about create an event catalogue from scratch myself in Obspy? I’m looking to create a catalogue for a single event with many picks.

Thanks in advance for your help.

Steve

Dr. Stephen Hicks
Postdoctoral Research Fellow in Passive Source Seismology
University of Southampton

T +44 (0)23 8059 9082 (ext: 29239) M +44 7718 286506 / +44 7775 694766
E s.hicks@soton.ac.uk<mailto:s.hicks@soton.ac.uk> Twitter @seismo_steve<http://www.twitter.com/seismo_steve>
W UoS profile<http://www.southampton.ac.uk/oes/about/staff/sphr1r17.page>

Room 786/14
Ocean and Earth Science, National Oceanography Centre Southampton

Steve,

take a look at this notebook we assembled at some point for workshop
teaching:
https://github.com/obspy/docs/blob/master/workshops/2016-03-07_ipgp/06_Event_metadata-with_solutions.ipynb

There's an example to put together a QuakeML file from scratch in the
last example code cell.

In your case you just want to do something like..

from obspy.core.event import Pick, Event, Catalog
event = Event()
catalog = Catalog(events=[event])
for ....:
    pick = Pick(...)
    event.picks.append(pick)
catalog.write(...)

T

Hi Steve

I did something similar a while ago. The notebook by Tobias is a good starter but what really pulled me through was mapping out the obspy.core.event.Catalogue class graphically to get some kind of overview of this relatively complex object. Attached to this mail is what I ended up with, hopefully you can get some help from this (not assuring that its gives the full picture though).

regP

obspy.core.event.Catalog.pdf (97.5 KB)

Nice graphs, Peter!

Steve, in addition, you can also have a look at the QuakeML manual,
we've modeled our class structure pretty closely:

https://quake.ethz.ch/quakeml/docs/REC?action=AttachFile&do=view&target=QuakeML-BED-20130214a.pdf

cheers,
T

Thanks, hopefully it can be usefull as a quick overwiew although I’m not entirelly sure its correct/complete in all details. Have a similar graph for the Inventory object set up when I was developing some tools for stationXML and are currently trying to create one for Parser object as I need to convert some metadata to dataless. Mentioning this in case the graphs may be of use to others, just let me know and I’ll be glad to share

---- Tobias Megies skrev ----

Nice graphs, Peter!

Steve, in addition, you can also have a look at the QuakeML manual,
we’ve modeled our class structure pretty closely:

https://quake.ethz.ch/quakeml/docs/REC?action=AttachFile&do=view&target=QuakeML-BED-20130214a.pdf

cheers,
T

Thanks, Peter. This is helpful. QuakeML looks like a hierarchical database to me, so any help understanding it is great.

The metadata-to-dataless also sounds interesting:-) Are developing this in the open?

Best,
Jon

In the open in the sense I’m happy to share whatever I manage to get working but without fancy gitrepositories or similar solutions. That said, I’m not so sure that what Im working on will be very usefull as its intetion is merely to get metadata in a (non standard) ascii format into dataless, some of which does not really have an appropriate blockette (e.g. Stream id used by guralp) and therefore needs to be tweaked in. That said, if you still want it you can have once done, hopefully by the emd of the week (times pi factor of course)

---- Maccarthy, Jonathan K skrev ----

Thanks, Peter. This is helpful. QuakeML looks like a hierarchical database to me, so any help understanding it is great.

The metadata-to-dataless also sounds interesting:-) Are developing this in the open?

Best,
Jon