Learn R Programming

IRISSeismic (version 1.0.5)

getUnavailability: Retrieve Channel metadata from IRIS DMC

Description

The getUnavailability method obtains channel metadata for non-available channels from the IRIS DMC station web service and returns it in a dataframe.

Usage

getUnavailability(obj, network, station, location, channel,
                  starttime, endtime, includerestricted,
                  latitude, longitude, minradius, maxradius)

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)
includerestricted
optional logical identifying whether to report on restricted data (default=FALSE)
latitude
optional latitude used when specifying a location and radius
longitude
optional longitude used when specifying a location and radius
minradius
optional minimum radius used when specifying a location and radius
maxradius
optional maximum radius used when specifying a location and radius

Value

  • A dataframe with the following columns:network, station, location, channel, latitude, longitude, elevation, depth, azimuth, dip, instrument, scale, scalefreq, scaleunits, samplerate, starttime, endtime

Details

The getUnavailability method compares the results of the getAvailability and getChannel methods and returns those records found only in the output of getChannel.

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 http://service.iris.edu/fdsnws/station/1/{webservice documentation}.

References

The IRIS DMC station webservice:

http://service.iris.edu/fdsnws/station/1/

This implementation was inspired by the functionality in the obspy station() method. http://docs.obspy.org/packages/autogen/obspy.iris.client.Client.station.html

See Also

IrisClient-class, getAvailability, getChannel

Examples

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

# Date of Nisqually quake
starttime <- as.POSIXct("2001-02-28",tz="GMT")
endtime <- starttime + 2*24*3600

# Use the getEvent web service to determine what events happened in this time period
events <- getEvent(iris,starttime,endtime,6.0)
events

# Event #3 is the Nisqually quake in Washington State
e <- events[3,]

# Find all BHZ channels that were NOT collecting data at the time of the quake 
# and within 5 degrees of the quake epicenter?
channels <- getUnavailability(iris,"*","*","*","BHZ",starttime,endtime,
                              lat=e$latitude,long=e$longitude,maxradius=5)
channels

Run the code above in your browser using DataLab