#### example using data in the RSEIS package
data(GH)
#### get the source location
lat.org = GH$pickfile$LOC$lat
lon.org = GH$pickfile$LOC$lon
#### get the station locations
g1 =GH$stafile
#### find the distance to each station
gd = rdistaz(lat.org, lon.org, g1$lat, g1$lon )
##### optional, filter the data
sel= which( GH$COMPS == 'V')
### filter traces
Fdef <- list(ON=TRUE, fl=1, fh=1, type="HP", proto="BU", RM=TRUE, zp=TRUE )
KF <- FILT.SEISN(GH, FILT=Fdef)
### match the stations in GH to the station distances
m1 = match(GH$STNS , g1$name)
dist.GH = gd$dist[m1]
TIM.WIN = range(GH$ex)
####### prepare plot, but do not add traces
A = DISTxsec(KF, dist.GH, TIM.WIN, sel, trace.width = 0.5 , add=FALSE,
plot=FALSE )
##### add traces
B = DISTxsec(KF, dist.GH, TIM.WIN, sel, trace.width = 0.5 , add=TRUE,
plot=TRUE, col='black' , text.col='red', text.size=1 )
Run the code above in your browser using DataLab