| getTraveltime | R Documentation |
Deprecated due to the upcoming retirement of the EarthScope traveltime web service.
Please use taupTraveltime instead.
The getTraveltime method obtains seismic traveltime data from
the EarthScope traveltime web service and returns it in a dataframe.
getTraveltime(obj, latitude, longitude, depth, staLatitude, staLongitude)
obj |
an |
latitude |
latitude of seismic event |
longitude |
longitude of seismic event |
depth |
depth of seismic event |
staLatitude |
latitude of seismic station |
staLongitude |
longitude of seismic station |
The traveltime web service calculates travel-times for seismic phases using a 1-D spherical earth model.
A dataframe with the following columns:
distance, depth, phaseName, travelTime, rayParam, takeoff, incident puristDistance, puristName
Rows are ordered by travelTime.
Jonathan Callahan jonathan@mazamascience.com
The EarthScope traveltime web service:
https://service.earthscope.org/irisws/traveltime/1/
IrisClient-class
## Not run:
# Open a connection to EarthScope webservices
iris <- new("IrisClient")
# Two days around the "Nisqually Quake"
starttime <- as.POSIXct("2001-02-27", tz="GMT")
endtime <- starttime + 3600 * 24 * 2
# Find biggest seismic event over these two days -- it's the "Nisqually"
events <- getEvent(iris, starttime, endtime, minmag=5.0)
bigOneIndex <- which(events$magnitude == max(events$magnitude))
bigOne <- events[bigOneIndex[1],]
# Find US stations that are available within an hour of the event
start <- bigOne$time
end <- start + 3600
availability <- getChannel(iris, "US", "", "", "BHZ",
starttime=start, endtime=end,
latitude=bigOne$latitude, longitude=bigOne$longitude,
minradius=0, maxradius=10)
# Get the station the furthest East
minLonIndex <- which(availability$longitude == max(availability$longitude))
snclE <- availability[minLonIndex,]
# Plot the BHZ signal from this station
st <- getDataselect(iris,snclE$network,snclE$station,snclE$location,snclE$channel,
start,end)
# Check that there is only a single trace and then plot it
length(st@traces)
tr <- st@traces[[1]]
plot(tr, subsampling=1) # need subsmpling=1 to add vertical lines with abline()
# Find travel times to this station
traveltimes <- getTraveltime(iris, bigOne$latitude, bigOne$longitude, bigOne$depth,
snclE$latitude, snclE$longitude)
# Look at the list
traveltimes
# mark the P and S arrival times
pArrival <- start + traveltimes$travelTime[traveltimes$phaseName=="P"]
sArrival <- start + traveltimes$travelTime[traveltimes$phaseName=="S"]
abline(v=pArrival, col='red')
abline(v=sArrival, col='blue')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.