R/imageP.R

Defines functions `imageP`

`imageP` <-
function(phiS, del , lam, SCALE=FALSE, UP=FALSE, col=NULL )
{
  #  Based on Aki and Richards convention figure 4.20 p. 114 2nd edition
  #  del = dip of plane from horizontal (face in direction of strike)
  #  phiS = strike of plane from north
  #  lam = rake of slip measured from strike horizontal
  #  x = north, y = east, z=down
  
if(missing(SCALE)) { SCALE=FALSE }
if(missing(col)) { col=heat.colors(20) }

if(missing(UP)) { UP=FALSE }

  DEG2RAD = pi/180
    RAD2DEG = 180/pi


x = seq(-1, 1, 0.01)
y = x

X = matrix(rep(x, length(y)), nrow= length(x))
Y = t(X)

p = RAD2DEG*(pi/2 -atan2(Y, X))
p[p<0] = p[p<0] + 360

R = sqrt(X^2+Y^2)
R[R>1] = NaN

dip =RAD2DEG*2*asin(R/sqrt(2))

if(UP==TRUE) { dip = 180-dip }

G = radP( del, phiS, lam, dip, p)

image(x,y,G, col = col,asp=1, xlab='', ylab='', axes=FALSE )

if(SCALE==TRUE) { imageSCALE( G,  col = col , x=1.1,  labels="breaks" ,  nlab=10 ) }


}

Try the RFOC package in your browser

Any scripts or data that you put into this service are public.

RFOC documentation built on Sept. 8, 2023, 6:12 p.m.