Skip to content

Latest commit

 

History

History
72 lines (50 loc) · 2.85 KB

README.md

File metadata and controls

72 lines (50 loc) · 2.85 KB

SeisTau.jl

Build status

Build Status Build status Coverage Status

Using

SeisTau integrates the TauPy and Seis packages, allowing one to easily use seismic travel time predictions for 1D Earth models with Seis.Traces.

SeisTau extends Seis.add_picks! so that you can add picks to your Traces like so:

julia> using Seis, SeisTau

julia> t = sample_data(:array);

julia> add_picks!.(t, "PKIKP")
60-element Array{Seis.SeisDict{Union{Int64, Symbol},NamedTuple{(:time, :name),Tuple{Float32,Union{Missing, String}}}},1}:
 Seis.SeisDict(:A=>Seis.Pick{Float32,String}((time=1134.08, name="A")),:PKIKP=>Seis.Pick{Float32,String}((time=1126.4486, name="PKIKP")),1=>Seis.Pick{Float32,String}((time=137.35, name=missing)))
...

Here we have added a pick for the PKIKP phase to all of the traces at once using Julia's .-notation, broadcasting the call to add_picks! across each of the Traces in t.

You can now plot up the data aligned on this pick:

julia> using Plots, Seis.Plot

julia> section(t, align="PKIKP", xlim=(-10,20), zoom=2)

Example record section aligned on pick

See Seis.picks for more information on access picks in Seis.

Installation

First, install Seis.jl.

Then, having chosen one of the options below:

julia> ] # Pressing ']' enters pkg mode

(v1.1) pkg> add https://github.com/anowacki/TauPy.jl https://github.com/anowacki/SeisTau.jl

Note on Python installation

The TauPy package on which SeisTau relies uses the Obspy module obspy.taup to calculate travel times. Therefore, one needs Obspy to be installed. There are two options:

  1. Install Obspy locally if it is not already installed on your machine, then build PyCall pointing at that installation by setting the $PYTHON environment variable to the path to your python executable:
    • ENV["PYTHON"] = "python"; import Pkg; Pkg.build("PyCall")
  2. Allow PyCall to install its own private Miniconda distribution. In this case, Obspy will be automatically installed when adding TauPy above. N.B. There are intermittent problems with automatic installation via this option, so option 1 is recommended at present.