Description Usage Arguments Details Value Author(s) References See Also Examples
From [1]: The traveltime webservice calculates travel-times for
seismic phases using a 1-D spherical earth model.
There are two ways to perform this computation:
(1) ws.ttDistances
for epicentral distances (in decimal
degrees, or kilometers), and
(2) ws.ttStaSrc
for station/source pairs of latitudes
and longitudes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ws.ttDistances(distances, distance.units = c("degrees", "kilometers"),
depth = 0, model = c("iasp91", "prem", "ak135"), phases = NULL,
filename = NULL, no.header = FALSE, traveltime.only = FALSE,
rayparam.only = FALSE, mintime.only = FALSE, verbose = TRUE)
PS_time.distances(distances, agg.fun = mean, ...)
ws.ttDeg(distances, ...)
ttDeg.ws(distances, ...)
ws.ttKm(distances, ...)
ttKm.ws(distances, ...)
ws.ttStaSrc(event.latlon, station.latlons, depth = 0, model = c("iasp91",
"prem", "ak135"), phases = NULL, filename = NULL, no.header = FALSE,
traveltime.only = FALSE, rayparam.only = FALSE, mintime.only = FALSE,
verbose = TRUE)
ttStaSrc.ws(event.latlon, station.latlons, depth = 0, model = c("iasp91",
"prem", "ak135"), phases = NULL, filename = NULL, no.header = FALSE,
traveltime.only = FALSE, rayparam.only = FALSE, mintime.only = FALSE,
verbose = TRUE)
PS_time.stations(event.latlon, station.latlons, agg.fun = mean, ...)
.llpair(X, verbose = TRUE)
|
distances |
numeric; great-circle distance from source to station.
Specify multiple distances as a vector (e.g., |
distance.units |
character; the units of |
depth |
numeric; the depth of the event, in kilometers. Note that currently only one depth can be specified. |
model |
character; Name of 1-D earth velocity model to be used.
Available models include:
|
phases |
character; Comma separated list of phases, defaulting to
|
filename |
|
no.header |
logical; suppresses header from the resulting table |
traveltime.only |
logical; returns a space-separated list of travel times, in seconds. See Note (2). |
rayparam.only |
logical; will return a space-separated list of ray parameters, in sec/deg. |
mintime.only |
logical; will only retrieve the first arrival of each phase for each distance |
verbose |
logical; should messages be given? |
agg.fun |
function for data aggregation: i.e. |
... |
additional parameters to |
event.latlon |
numeric; the lat/lon of the eqarthquake epicenter |
station.latlons |
numeric; the lat(s)/lon(s) of the stations. See |
X |
numeric; the lat(s)/lon(s) of the stations; these
can be specified as a single vector with latitudes and longitudes concatenated;
or (preferrably), a list or data.frame.
|
For distance calculations ws.ttDistances
is the primary
function; both ws.ttDeg
and ws.ttKm
are
wrapper functions for calculations using degrees and kilometers, respectively.
For station/source pair calculations ws.ttStaSrc
is
the primary function.
Note that ttDeg.ws
is simply a pointer to ws.ttDeg
and
similarly for ttKm.ws
and ttStaSrc.ws
.
The query is generated with constructor2
,
and executed with query.iris
, which throws
errors based on check.query
.
filename=
)NA
: An auto-generated file.
NULL
: A temporary file.
<character string>: Any desired name.
Autogenerated files are of the form:
iriswsQ.<calculation type>.<model>.tt
where calculation type
depends on the type of calculation:
Dist
if the calculation was based on distances, or
StaSrc
if based on station-source pairs.
Temporary files are generated within query.iris
.
PS_time
functions:
return P- and S-wave data and
the difference between the S and P information.
More specifically,
PS_time.distances
does this using
ws.ttDistances
and phases=c("P","S")
; hence, distance
units are in decimal degrees (by default) but can be modified through the
additional parameters ...
.
From [1]:
Valid arbitrary phases can be made up e.g. sSKJKP, but invalid phases will be ignored.
Travel times are produced in ascending time order regardless of the order in which the phases are specified.
Also note that one can specify a specific phase velocity
by adding 'kmps'
after the desired velocity (in
km/s) [3]. For example '4.4kmps'
will return the
principal G-phases.
It is advisable not to turn on traveltime.only=TRUE
or rayparam.only=TRUE
unless a vector of phases
is given; this is because the IRIS WS does not return the phase list
if these options are enabled, so the numbers returned
will be essentially meaningless (that is, if phases
is not set).
A list (invisibly) with the query string, and data from the result
AJ Barbour
[1] http://service.iris.edu/irisws/traveltime/1/
[2] http://www.iris.edu/dms/products/emc-referencemodels/ describes the spherical-Earth reference models.
[3] http://www.seis.sc.edu/TauP/ is the engine used for the computations.
Other WebServices: distaz
,
flinnengdahl
,
irisws-webservices
, resp
,
timeseries
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ## Not run:
#
# In epicentral degrees
wsdeg1 <- ws.ttDistances(c(0,10,20,30,40), verbose=TRUE)
wsdeg2 <- ws.ttDeg(c(0,10,20,30,40), verbose=TRUE)
all.equal(wsdeg1, wsdeg2)
#
# In kilometers
ws.ttKm(c(0,10,20,30,40), verbose=TRUE)
#
# Get P/S wave times for distances
PS_time.distances(1:20)
PS_time.distances(1:20, distance.units="kilometers")
#
# Stations pairs:
# (fake some Lats/lons)
(ws.ttStaSrc(c(1,2),c(20,10,1:10), verbose=FALSE))
(ws.ttStaSrc(c(1,2),list(lats=1:10, lons=11:20), verbose=FALSE))
(ws.ttStaSrc(c(1,2), data.frame(lats=1:10, lons=11:20), verbose=FALSE))
#
PS_time.stations(c(10,20),1:10)
#
# Here's how the lat lon pairs are combined...
.llpair(1:10)
try(.llpair(1:11)) # success, but only because of value recycling
.llpair(data.frame(x=1:5,y=6:10))
.llpair(list(x=1:5,y=6:10))
.llpair(matrix(1:12,ncol=3))
try(.llpair(list(x=1:5,y=6:11))) # failure
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.