Learn R Programming

TauP.R (version 1.5)

ConvAng2p: Angle to Ray Parameter

Description

Convert between ray angle (from vertical) and ray parameter.

Usage

ConvAng2p(phase, h, angle, model = NULL, vp = NULL, vs = NULL, rp =
NULL)
ConvP2Ang(phase, h, p, model = NULL, vp = NULL, vs = NULL, rp = NULL)

Arguments

phase

Arrival phase (e.g. 'P' or 'SKS')

h

Depth (km) at which to convert.

angle

Takeoff angle (degrees). 0 is downward, 180 is upward

p

Ray parameter (s/deg)

model

Planet model

vp

P wave velocity at depth h (km/s)

vs

S wave velocity at depth h (km/s)

rp

Planet radius (km)

Value

For ConvAng2p, returns a vector of ray parameters (s/deg) corresponding to values in 'angle'.

For ConvP2Ang, returns a vector twice the length of 'p', with all upward angles corresponding to 'p' followed by all downward angles.

Details

Either 'model' or all of 'vp', 'vs', 'rp' must be provided. p and angle may be vectors; other arguments may not.

Examples

Run this code
# NOT RUN {
data(model)
ConvP2Ang('P',100,1,model)

ConvAng2p('P',100,30,model)

# }

Run the code above in your browser using DataLab