Description Objects from the Class Slots Methods Note Author(s) Examples

A `Trace`

object containing a seismic trace – a continuous timeseries.

Objects occupy the `traces`

slot of a Stream-class object and are typically
populated by calls to getDataselect.

`id`

:Object of class

`"character"`

: Unique "SNCL" identifier specifying the Network, Station, Location, Channel and Quality factor associated with this trace: eg.`AK.PIN..VEA.M`

. The`id`

is generated automatically when the trace is first created and is intended for read only.`Sensor`

:Object of class

`"character"`

: Instrument name.`InstrumentSensitivity`

:Object of class

`"numeric"`

: The total sensitivity for a channel, representing the complete acquisition system expressed as a scalar. Equivalent to SEED stage 0 gain.`SensitivityFrequency`

:Object of class

`"numeric"`

: The frequency at which the total sensitivity is correct.`InputUnits`

:Object of class

`"character"`

: The units of the data as input from the perspective of data acquisition. After correcting data for this response, these would be the resulting units.`stats`

:Object of class

`"TraceHeader"`

: Container with metadata information describing the trace. (see TraceHeader-class)`data`

:Object of class

`"numeric"`

: Vector of data values.

- as.vector
`signature(x="Trace")`

: returns the data slot; equivalent to`x@data`

- DDT
`signature(x="Trace", demean="logical", detrend="logical", taper="numeric")`

: returns a new trace that has been 'cleaned up' for further processing by applying demean, detrend, and taper techniques (see DDT)- envelope
`signature(x="Trace")`

: returns the envelope of the seismic signal (see envelope)- isDC
`signature(x="Trace")`

: returns`TRUE`

if trace data consist of a DC signal- length
`signature(x="Trace")`

: returns the length of the data; equivalent to`length(x@data)`

- max
`signature(x="Trace")`

: returns the maximum value of the data; equivalent to`max(x@data)`

- median
`signature(x="Trace", na.rm="logical")`

: returns the median value of the data; equivalent to`median(x@data)`

- mean
`signature(x="Trace")`

: returns the mean value of the data; equivalent to`mean(x@data)`

- min
`signature(x="Trace")`

: returns the minimum value of the data; equivalent to`min(x@data)`

- multiplyBy
`signature(x="Trace", y="numeric")`

: returns a new`Trace`

where the data have been multiplied by y (see multiplyBy)- plot
`signature(x="Trace")`

: default plot of the`Trace`

data with appropriate labeling- rms
`signature(x="Trace")`

: returns the Root Mean Square amplitude of the data (see rms)- rmsVariance
`signature(x="Trace")`

: returns the RMS variance of the data (see rmsVariance)- sd
`signature(x="Trace", na.rm="logical")`

: returns the standard deviation of the data; equivalent to`sd(x@data)`

- slice
`signature(x="Trace", starttime="POSIXct", endtime="POSIXct")`

: returns a new`Trace`

subset of an existing`Trace`

(see slice)- STALTA
`signature(x="Trace",staSecs="numeric",ltaSecs="numeric",algorithm="character", ...)`

: returns the STALTA picker result (see STALTA)- triggerOnset
`signature(x="Trace", picker="numeric", threshold="numeric", ...)`

: returns the time or index of an event onset as determined by the STALTA picker (see triggerOnset)

The `Trace`

object is inspired by the `Trace`

class found in the
python ObsPy package (https://docs.obspy.org/packages/autogen/obspy.core.trace.Trace.html).

Jonathan Callahan jonathan@mazamascience.com

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ```
## Not run:
# Open a connection to IRIS DMC webservices
iris <- new("IrisClient")
# Set the starttime and endtime
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)
# Get the first trace and generate some statistics
tr1 <- st@traces[[1]]
min(tr1)
median(tr1)
mean(tr1)
max(tr1)
sd(tr1)
rms(tr1)
rmsVariance(tr1)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.