Open-sourced HASHpy code (with ObsPy I/O!)

Hi ObsPy’ers,

Just wanted to advertise that at NSL we have recently open-sourced my latest python wrapper package for Hardebeck and Shearer’s first motion focal mechanism HASH code. The version on GitHub is now in line with NSL’s production version that our seismic analysts use currently. It is basically a “HashPype” class which holds the data in NumPy arrays and uses higher-level methods to call the original compiled HASH Fortran subroutines, compiled with f2py.

https://github.com/markcwill/hashpy

I wrote it to be I/O agnostic, but it currently supports accepting data as an ObsPy Event (containing Picks and an Origin with Arrivals) and outputting focal mech solutions as an ObsPy Event containing FocalMechanism objects. There is also a (beta) plotting class which accepts the ObsPy output Event object and plots all FM solutions on a stereonet.

If anyone is interested in writing ObsPy scripts to calculate first motion focal mechanisms, please check it out! It’s on my personal GitHub for now, but I may fork/move main development to the NVSeismoLab organization GitHub in the future.

-Mark

Mark Williams
Nevada Seismological Laboratory
Nevada Seismic Network
University of Nevada, Reno
tel: (775)-784-4317