Stream-class {IRISSeismic} | R Documentation |
Class "Stream"
Description
A Stream
object containing a list of Trace
objects.
Objects from the Class
Objects are typically created by calls to getDataselect.
Slots
url
:Object of class
"character"
: URL request used to generate thisStream
.requestedStarttime
:Object of class
"POSIXct"
: starttime used when requesting data withgetDataselect
.requestedEndtime
:Object of class
"POSIXct"
: endtime used when requesting data withgetDataselect
.act_flags
:Object of class
"integer"
: Accumulators for the act_flags bits in each miniSEED record.io_flags
:Object of class
"integer"
: Accumulators for the io_flags bits in each miniSEED record.dq_flags
:Object of class
"integer"
: Accumulators for the dq_flags bits in each miniSEED record.timing_qual
:Object of class
"numeric"
: Average timing quality associated with miniSEED records.traces
:Object of class
"list"
: List ofTrace
objects.
Methods
- getGaps
signature(x="Stream")
: returns information on data dropouts betweenTraces
; see getGaps- getUpDownTimes
signature(x="Stream", min_signal="numeric", min_gap="numeric")
: returns a vector of datetimes associated with channel up/down transitions; see getUpDownTimes- length
signature(x="Stream")
: returns the total number of data points in allTraces
- max
signature(x="Stream")
: returns the overall data maximum for all data in allTraces
- median
signature(x="Stream", na.rm= "logical")
: returns the overall data median for all data in allTraces
- mean
signature(x="Stream")
: returns the overall data mean for all data in allTraces
- mergeTraces
signature(x="Stream", fillMethod="fillNA")
: returns a newStream
object where allTraces
have been merged into a singleTrace
mergeTraces- min
signature(x="Stream")
: returns the overall data minimum for all data in allTraces
- multiplyBy
signature(x="Stream", y="numeric")
: returns a newStream
object where the data in everyTrace
have been multiplied by y; see multiplyBy- parallelLength
signature(x="Stream")
: returns a vector of data lengths, one for eachTrace
- parallelMax
signature(x="Stream")
: returns a vector of data maxima, one for eachTrace
- parallelMedian
signature(x="Stream", na.rm= "logical")
: returns a vector of data medians, one for eachTrace
- parallelMean
signature(x="Stream")
: returns a vector of data means, one for eachTrace
- parallelMin
signature(x="Stream")
: returns a vector of data minima, one for eachTrace
- parallelRms
signature(x="Stream")
: returns a vector of RMS calculations, one for eachTrace
; see rmsVariance- parallelRmsVariance
signature(x="Stream")
: returns a vector of RMS variance calculations, one for eachTrace
; see rmsVariance- parallelSd
signature(x="Stream", na.rm="logical")
: returns a vector of standard deviation calculations, one for eachTrace
- plot
signature(x="Stream")
: default plot of the mergedTraces
in aStream
with appropriate labeling- plotUpDownTimes
signature(x="Stream", min_signal="numeric", min_gap="numeric")
: plots the times at which aStream
transitions from data collection to non-collection (on/off); see getUpDownTimes- rms
signature(x="Stream")
: returns the overall Root Mean Square amplitude for all data in allTraces
; see rmsVariance- rmsVariance
signature(x="Stream")
: returns the overall RMS variance for all data in allTraces
; see rmsVariance- sd
signature(x="Stream", na.rm="logical")
: returns the overall standard deviations for all data in allTraces
- slice
signature(x="Stream", starttime="POSIXct", endtime="POSIXct")
: returns a newStream
sliced out of an existingStream
(see slice)- uniqueIds
signature(x="Stream")
: returns a vector of SNCLQ identifiers, one for eachTrace
Note
The Stream
object is inspired by the Stream
class found in the
python ObsPy package (https://docs.obspy.org/packages/autogen/obspy.core.stream.Stream.html).
The miniSEED flags and timing_qual values are described in the SEED manual (http://www.fdsn.org/seed_manual/SEEDManual_V2.4.pdf). The "accumulators" contain counts of the number of times each bit flag was set during the parsing of a miniSEED file. These attributes are retained primarily for assessing data quality issues within the IRIS DMC.
The following code documentation describes how each of the flags is used within miniSEED files:
# act_flags # [1] Calibration signals present # [2] Time correction applied # [3] Beginning of an event, station trigger # [4] End of an event, station detrigger # [5] A positive leap second happened in this record # [6] A negative leap second happened in this record # [7] Event in progress # [8] Undefined bit set # io_flags # [1] Station volume parity error possibly present # [2] Long record read (possibly no problem) # [3] Short record read (record padded) # [4] Start of time series # [5] End of time series # [6] Clock locked # [7] Undefined bit set # [8] Undefined bit set # dq_flags # [1] Amplifier saturation detected # [2] Digitizer clipping detected # [3] Spikes detected # [4] Glitches detected # [5] Missing/padded data present # [6] Telemetry synchronization error # [7] A digital filter may be charging # [8] Time tag is questionable
Author(s)
Jonathan Callahan jonathan@mazamascience.com
Examples
## Not run:
# Open a connection to IRIS DMC webservices
iris <- new("IrisClient")
starttime <- as.POSIXct("2012-01-24", tz="GMT")
endtime <- as.POSIXct("2012-01-25", tz="GMT")
# Get the waveform
st <- getDataselect(iris,"AK","PIN","","BHZ",starttime,endtime)
min(st)
median(st)
mean(st)
max(st)
sd(st)
rms(st)
rmsVariance(st)
## End(Not run)