Using Obspy to identify events and plot waveforms

1,174 views
Skip to first unread message

Alan Pointing

unread,
Apr 1, 2017, 12:40:16 PM4/1/17
to RaspberryShake
Hi,

Being located in an intra-plate area, I have to make most of the larger teleseismic earthquakes occurring around the world!

Swarm is useful as an interactive tool to view the helicorder dayplot and extract a waveform to filter and try and spot the earthquake, after calculating the expected traveltime by hand. 

To automate this process, I have been using obspy (obspy.org), python and matplotlib on an Apple Mac, to automatically retrieve and plot the origin times of large magnitude earthquakes on a (filtered) helicorder plot and then extract the waveforms for these events, overlain with the expected travel times of the earthquake phases. This makes it easier to discard those earthquakes that are not quite detected on the shake.

To illustrate this, the attached python script, first shows the helicorder with earthquakes above a certain magnitude, like this:

Then for each event, it extracts and plots the filtered waveform with overlain phases, like this:

You can see that the second event (from California) is not detected.

These tools are useful for those of you that don't mind using the command line and doing some simple coding. There are quite a few examples of similar scripts on the obspy.org website, but it would be great if others can post examples they are working on, to build up a library of code for the Shake.

Thanks, Alan

  
travel_time.py

Branden Christensen

unread,
Apr 1, 2017, 5:45:45 PM4/1/17
to RaspberryShake
Awesome contribution. Thanks Alan. 

Branden Christensen
Director, OSOP & Gempa GeoServices


Get yours now! Visit shop.raspberryshake.org


--
Some useful links:
 
Manual: http://manual.raspberryshake.org/
Do It YourSelf Page: http://raspberryshake.org/do-it-yourself
Shop: https://shop.raspberryshake.org/
Website: http://raspberryshake.org/
 
Instagram: https://www.instagram.com/raspberryshake/
Hashtag: #rasperryshake
---
You received this message because you are subscribed to the Google Groups "RaspberryShake" group.
To unsubscribe from this group and stop receiving emails from it, send an email to raspberryshake+unsubscribe@googlegroups.com.
To post to this group, send email to raspberryshake@googlegroups.com.
Visit this group at https://groups.google.com/group/raspberryshake.
To view this discussion on the web visit https://groups.google.com/d/msgid/raspberryshake/d8c863c1-3dd7-476c-aa4e-8a48c2345663%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

MBorgh

unread,
Apr 2, 2017, 4:20:25 PM4/2/17
to RaspberryShake
Hi Alan,

Great stuff, thanks for sharing. I had to make some minor changes to make it work on Ubuntu (yakkety, with python 2.7.12)- see the attached file.

Kind regards,

Marten
travel_time.py

Branden Christensen

unread,
Apr 2, 2017, 5:21:45 PM4/2/17
to RaspberryShake
Hi Alan, Marten and others:


And Raspberry Shake source code collaboration was just born! 

Would it be useful for me to open a new, public git account for you guys to create new projects and share code? Source code control is useful at all levels, from when you are just toying around with a new idea or making really big cool new applications. 

Let me know your thoughts. I could have this up and ready in minutes. I would call it the "Raspberry Shake Maker Space" or something like that. GitHub or GitLab?

BTW, a new Shake came online just now in Switzerland: http://ift.tt/2oyfVat


Yours, 


Branden Christensen
Director, OSOP & Gempa GeoServices


Get yours now! Visit shop.raspberryshake.org


--
Some useful links:
 
Manual: http://manual.raspberryshake.org/
Do It YourSelf Page: http://raspberryshake.org/do-it-yourself
Shop: https://shop.raspberryshake.org/
Website: http://raspberryshake.org/
 
Instagram: https://www.instagram.com/raspberryshake/
Hashtag: #rasperryshake
---
You received this message because you are subscribed to the Google Groups "RaspberryShake" group.
To unsubscribe from this group and stop receiving emails from it, send an email to raspberryshake+unsubscribe@googlegroups.com.
To post to this group, send email to raspber...@googlegroups.com.

d3noob

unread,
Apr 3, 2017, 1:11:50 AM4/3/17
to RaspberryShake, branden.c...@osop.com.pa
 Thanks Alan, Marten and Branden,

+1 from me and a vote for GitHub!

Malcolm

Alan Pointing

unread,
Apr 3, 2017, 2:30:25 AM4/3/17
to RaspberryShake
Great idea Branden, setting something up on Github gets my vote.

Thanks, Alan

Branden Christensen

unread,
Apr 3, 2017, 7:38:56 AM4/3/17
to RaspberryShake
Good morning all.

The GitHub Raspberry Shake Maker Space is up and running and ready for collaboration: https://github.com/Raspberry-Shake-Maker-Space


Yours, 


Branden Christensen
Director, OSOP & Gempa GeoServices


Get yours now! Visit shop.raspberryshake.org


On Mon, Apr 3, 2017 at 1:30 AM, 'Alan Pointing' via RaspberryShake <raspber...@googlegroups.com> wrote:
Great idea Branden, setting something up on Github gets my vote.

Thanks, Alan
--
Some useful links:

Manual: http://manual.raspberryshake.org/
Do It YourSelf Page: http://raspberryshake.org/do-it-yourself
Shop: https://shop.raspberryshake.org/
Website: http://raspberryshake.org/

Instagram: https://www.instagram.com/raspberryshake/
Hashtag: #rasperryshake
---
You received this message because you are subscribed to the Google Groups "RaspberryShake" group.
To unsubscribe from this group and stop receiving emails from it, send an email to raspberryshake+unsubscribe@googlegroups.com.
To post to this group, send email to raspberryshake@googlegroups.com.

Branden Christensen

unread,
May 14, 2017, 2:22:51 PM5/14/17
to RaspberryShake
GitHub organization path updated to: https://github.com/raspishake


Branden
Reply all
Reply to author
Forward
0 new messages