getTimeseries | R Documentation |
The getTimeseries
method makes a request of the IRIS DMC timeseries
webservice and returns a Stream
object in which individual Traces
have been sorted by start time.
getTimeseries(obj, network, station, location, channel, starttime, endtime,...)
obj |
|
network |
character string with the two letter seismic network code |
station |
character string with the station code |
location |
character string with the location code |
channel |
character string with the three letter channel code |
starttime |
POSIXct class specifying the starttime (GMT) |
endtime |
POSIXct class specifying the endtime (GMT) |
... |
optional arguments
|
This is an alternative method for retreiving seismic data that accepts optional processing commands.
Data requests are made through
the timeseries
webservice and returned data are parsed using
the internal miniseed2Stream() function.
If the location argument contains an empty string to specify a 'blank' location code, a location
code of "--"
will be used in the dataselect request URL.
The processing
parameter can be used to specify any type of processing supported by the
timeseries
webs service. This string must begin with an ampersand and be ready to be appended to the request url, e.g.
processing="&demean=true&taper0.2,HANNING"
. This gives the user complete control over the number
and order of processing commands.
(See timeseries documentation.)
If inclusiveEnd=FALSE
, then getDataselect
will subtract 0.000001 seconds from the endtime before passing the
value to the dataselect
webservice. An endtime of, e.g., as.POSIXct("2016-01-03", tz="GMT")
will be passed
into dataselect
as end=2016-01-02T23:59:59.999999
. A data sample at time 2016-01-03T00:00:00 will not be returned
unless inclusiveEnd=TRUE
.
Sometimes the station webservice will return multiple records for the same SNCL, each with a different scale or starttime. These represent different epochs with potentially different metadata parameters for the SNCL and, by default, will cause a 'Multiple epochs' error message to be generated.
Handling all possible metadata differences so that the data may be merged is beyond the scope of this
package. Instead, to avoid errors, users may specify ignoreEpoch=TRUE
in which case
the very first SNCL-epoch encountered will be used and all others will be discarded.
For access to restricted data, getDataselect will look for system environmental variable "IrisClient_netrc" which should point to a .netrc authentication file.
Error returns from the webservice will stop evaluation and generate an error message.
A new Stream
object is returned.
Jonathan Callahan jonathan.s.callahan@gmail.com
The IRIS DMC timeseries webservice:
https://service.iris.edu/irisws/timeseries/1/
getDataselect
,
getSNCL
,
IrisClient-class
## Not run: # Open a connection to IRIS DMC webservices (use debug=TRUE so we can see the URLs generated) iris <- new("IrisClient",debug=TRUE) starttime <- as.POSIXct("2013-06-01",tz="GMT") endtime <- starttime + 24*3600 # Get raw data and processed data st1 <- getDataselect(iris,"IU","ANMO","00","LHZ",starttime,endtime) st2 <- getTimeseries(iris,"IU","ANMO","00","LHZ",starttime,endtime,"&demean=true&taper=0.2,HANNING") layout(matrix(seq(2))) plot(st1) plot(st2) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.