malcolmw / pykonal

Travel-time calculator based on the fast-marching method solution to the Eikonal equation.
https://malcolmw.github.io/pykonal-docs/
GNU General Public License v3.0
147 stars 54 forks source link

Earthquake location #48

Open andresp-wave opened 2 months ago

andresp-wave commented 2 months ago

Hi Malcolm,

I am trying to use Pykonal to locate some events. Is there any minimal example on how to use 'EQLocator' Class ? I noticed that there is a code 'Locator2.ipnb' that locate events but the files required to run it are not available in the repository.

Best, Andres.

malcolmw commented 2 months ago

Hi Andres,

There is a working script over here: https://github.com/malcolmw/PyCatEQ.

First, you need to use the 300_compute_ttlut script to compute travel-time lookup tables. This script will output a traveltime field file for each station+phase pair, in addition to a tt_inventory.hdf5 file. You only need the tt_inventory.hdf5 file for the next step.

After running 300_compute_ttlut, you can run 310_reloc_deo to relocate events. This script has a norm parameter that can either be set to "EDT" to use the "equal differential time" norm (as in NonLinLoc) or "L2" to use an ordinary least squares norm. I recommend using the EDT norm.

Note that both of the above scripts can be run with the -h option to get help and require a config file, examples of which are found in the cfg directory of the PyCatEQ repository.

Hope this helps.

Cheers, Malclm