powered by
Convert between ray angle (from vertical) and ray parameter.
ConvAng2p(phase, h, angle, model = NULL, vp = NULL, vs = NULL, rp = NULL) ConvP2Ang(phase, h, p, model = NULL, vp = NULL, vs = NULL, rp = NULL)
Arrival phase (e.g. 'P' or 'SKS')
Depth (km) at which to convert.
Takeoff angle (degrees). 0 is downward, 180 is upward
Ray parameter (s/deg)
Planet model
P wave velocity at depth h (km/s)
S wave velocity at depth h (km/s)
Planet radius (km)
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.
Either 'model' or all of 'vp', 'vs', 'rp' must be provided. p and angle may be vectors; other arguments may not.
# NOT RUN { data(model) ConvP2Ang('P',100,1,model) ConvAng2p('P',100,30,model) # }
Run the code above in your browser using DataLab