Trace method
The RMS amplitude of a single Trace
is calculated as:
$$rms(x) = \sqrt{ \frac{\sum_1^n{(x_i)^2}}{n} } $$
The RMS variance of a single Trace
is calculated as:
$$rmsVariance(x) = \sqrt{ \frac{\sum_1^n{(x_i - \bar{x})^2}}{n} } $$
where \(x\) is the vector of data values and \(n\) is the length of that vector.
Stream methods
For Stream
objects, data from all Trace
s in the stream
are first extracted and concatenated into a single numeric vector after which the
algorithm is applied.
The parallel~
version of this method is only available on Stream
objects
and returns a vector of values, one for each Trace
.
By default, the Stream
versions of these methods use na.rm=FALSE
as there
should be no missing datapoints in each Trace
. The Trace
methods default to
na.rm=TRUE
to accommodate merged traces where gaps between traces have been
filled with NA
s.