Skip to content

A julia module to calculate travel time between two points in a layerd model

License

Notifications You must be signed in to change notification settings

changguo1998/SeismicRayTrace.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SeismicRayTrace.jl

This module is used to calculate travel time between two points in a layerd model.

Usage

using SeismicRayTrace
depth1 = 0.0 # depth of first point
depth2 = 1.0 # depth of another point
distance = 10.0 # horizontal distance
model_depth = [0.0, 1.0, 2.0] # depth of each interface
model_velocity = [1.0, 2.0, 4.0] # velocity under the related interface
phase_type = ["all"] # can be refraction, reflection and guide
travel_time = raytrace(depth1, depth2, distance, model_depth, model_velocity, phase_type)

Return Value

The return values are like:

(x = 4.0, t = 4.0, p = 1.0, l = 0, type = "refraction"),
(x = 3.99999,t = 4.47213,p = 0.8944267450394816,l = 2,type = "reflection"),
...
(x = 4.0, t = 3.7320508075688776, p = 0.5, l = 2, type = "guide")
...

The program first solve the equation to get ray parameter p, and then get the horitonzal distance x and travel time t. l means the layer on which the ray reflect or became guide wave.

Tips

There are artifacts between $\alpha$, $\epsilon$ and MAX_STEP.

  • To run faster, set a larger $\alpha$ and/or larger $\epsilon$
  • When MAX_STEP triggerd, consider setting smaller $\alpha$
  • use internal function SeismicRayTrace.set! to change these parameters

About

A julia module to calculate travel time between two points in a layerd model

Topics

Resources

License

Stars

Watchers

Forks

Languages