given an earthquake hypocenter and a list of station information, retrieve the station residuals.

1 |

`XY` |
matrix of station location and arrival times. |

`vel` |
list, RSEIS velocity model |

`h1` |
hypocenter location, c(x,y,z,t) |

`PLOT` |
logical, TRUE=plot the residuals |

The XY mtrix is in cartesian coordinates, i.e. it has been projected into units of km. Only 1D velocity models are used at this time. Only residuals of P and S wave arrivals are estimated.

vector, right hand side of the least squares problem.

Jonathan M. Lees<jonathan.lees@unc.edu>

travel.time1D,UPdateEQLOC

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ```
## Not run:
XY = GEOmap::GLOB.XY(pstas$lat, pstas$lon, proj)
elcor = rep(0, length(pstas$lat))
DZ = pstas$z - mean(stas$z)
elcor[pstas$phase=="P"] = DZ[pstas$phase=="P"]/v$vp[1]
elcor[pstas$phase=="S"] = DZ[pstas$phase=="S"]/v$vs[1]
XY$cor = elcor
XY$phase = pstas$phase
XY$sec = pstas$sec
eqXY = GEOmap::GLOB.XY(sol[1], sol[2], proj)
res = EQXYresid(XY, vel=v , h1=c(eqXY$x, eqXY$y, sol[2],sol[4]) , PLOT=FALSE)
## End(Not run)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.