Learn R Programming

IRISSeismic (version 1.5.1)

getDataAvailability: Retrieve miniseed trace extents from IRIS DMC

Description

The getDataAvailability method obtains miniseed time extents from the IRIS DMC availability web service and returns it in a dataframe.

Usage

getDataAvailability(obj, network, station, location, channel,starttime, endtime,
                     mergequality, mergesamplerate, mergeoverlap, mergetolerance, 
                     includerestricted, excludetoolarge)

Arguments

obj

IrisClient object

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)

mergequality

optional logical identifying if timespans with differing qualities are grouped together (default=FALSE)

mergesamplerate

optional logical identifying if timespans from data with differing sample rates are grouped together (default=FALSE)

mergeoverlap

optional logical identifying if overlapping timespans are merged together (default=FALSE)

mergetolerance

optional numeric. If mergeoverlap=TRUE, timespans which are separated by gaps smaller than or equal to the mergetolerance value are merged together. To have an effect, the mergetolerance value must be larger than 1.5 times the sample period.

includerestricted

optional logical identifying whether to report on restricted data (default=FALSE)

excludetoolarge

optional logical identifying whether to ignore channels that are too fragmented for the availability service to process (default=TRUE). If FALSE, the service reports a 413 error (request too large) if any of these channels are selected.

Value

A dataframe with the following columns:

  network, station, location, channel, repository, samplerate, starttime, endtime, snclId 
  

Rows are ordered by snclId.

The snclId column, eg. "US.OCWA..BHE", is generated as a convenience. It is not part of the normal return from the station web service.

Details

The getDataAvailability method uses the IRIS availability service to obtain start and endtimes for all continuous trace segments in the IRIS archive for the requested network, station, location, channels and returns that data in a dataframe. Each row of the dataframe represents a unique data trace extent.

Each of the arguments network, station, location or channel may contain a valid code or a wildcard expression, e.g. "BH?" or "*". Empty strings are converted to "*". Otherwise the ascii string that is used for these values is simply inserted into the web service request URL.

For more details see the web service documentation.

References

The IRIS DMC station web service:

http://service.iris.edu/irisws/availability/1/

See Also

IrisClient-class

Examples

Run this code
# NOT RUN {
# Open a connection to IRIS DMC webservices
iris <- new("IrisClient")

starttime <- as.POSIXct("2018-01-01",tz="GMT")
endtime <- as.POSIXct("2019-01-01",tz="GMT")
network <- "TA"
station <- "M22K"
channel <- "BHZ"

traceList <- getDataAvailability(iris,network,station,"*",channel,starttime,endtime)
traceList
# }

Run the code above in your browser using DataLab