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 this Stream.

requestedStarttime:

Object of class "POSIXct": starttime used when requesting data with getDataselect.

requestedEndtime:

Object of class "POSIXct": endtime used when requesting data with getDataselect.

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 of Trace objects.

Methods

getGaps

signature(x="Stream"): returns information on data dropouts between Traces; 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 all Traces

max

signature(x="Stream"): returns the overall data maximum for all data in all Traces

median

signature(x="Stream", na.rm= "logical"): returns the overall data median for all data in all Traces

mean

signature(x="Stream"): returns the overall data mean for all data in all Traces

mergeTraces

signature(x="Stream", fillMethod="fillNA"): returns a new Stream object where all Traces have been merged into a single Trace mergeTraces

min

signature(x="Stream"): returns the overall data minimum for all data in all Traces

multiplyBy

signature(x="Stream", y="numeric"): returns a new Stream object where the data in every Trace have been multiplied by y; see multiplyBy

parallelLength

signature(x="Stream"): returns a vector of data lengths, one for each Trace

parallelMax

signature(x="Stream"): returns a vector of data maxima, one for each Trace

parallelMedian

signature(x="Stream", na.rm= "logical"): returns a vector of data medians, one for each Trace

parallelMean

signature(x="Stream"): returns a vector of data means, one for each Trace

parallelMin

signature(x="Stream"): returns a vector of data minima, one for each Trace

parallelRms

signature(x="Stream"): returns a vector of RMS calculations, one for each Trace; see rmsVariance

parallelRmsVariance

signature(x="Stream"): returns a vector of RMS variance calculations, one for each Trace; see rmsVariance

parallelSd

signature(x="Stream", na.rm="logical"): returns a vector of standard deviation calculations, one for each Trace

plot

signature(x="Stream"): default plot of the merged Traces in a Stream with appropriate labeling

plotUpDownTimes

signature(x="Stream", min_signal="numeric", min_gap="numeric"): plots the times at which a Stream 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 all Traces; see rmsVariance

rmsVariance

signature(x="Stream"): returns the overall RMS variance for all data in all Traces; see rmsVariance

sd

signature(x="Stream", na.rm="logical"): returns the overall standard deviations for all data in all Traces

slice

signature(x="Stream", starttime="POSIXct", endtime="POSIXct"): returns a new Stream sliced out of an existing Stream (see slice)

uniqueIds

signature(x="Stream"): returns a vector of SNCLQ identifiers, one for each Trace

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)

[Package IRISSeismic version 1.6.6 Index]