signal_rotate: Rotate signal vectors using a 3-D rotation matrix.

View source: R/signal_rotate.R

signal_rotateR Documentation

Rotate signal vectors using a 3-D rotation matrix.

Description

The function rotates the horizontal components of the input data according to the specified angle.

Usage

signal_rotate(data, angle)

Arguments

data

List, data frame or matrix, seismic componenents to be processed. If data is a matrix, the components must be organised as rows. Also, data can be a list of eseis objects. If a matrix, this matrix must contain either two columns (x- and y-component) or three columns (x-, y-, and z-component), in exactly that order of the components.

angle

Numeric value, rotation angle in degrees.

Value

Numeric matrix, the 3-dimensional rotation matrix.

Author(s)

Michael Dietze

Examples


## create synthetic data set
data <- rbind(x = sin(seq(0, pi, length.out = 10)),
y = sin(seq(0, pi, length.out = 10)),
z = rep(0, 10))

## rotate the data set
x_rot <- signal_rotate(data = data, 
                       angle = 15)
                      
## plot the rotated data set 
plot(x_rot[1,], col = 1, ylim = c(-2, 2))
points(x_rot[2,], col = 2)
points(x_rot[3,], col = 3)


coffeemuggler/eseis documentation built on Aug. 19, 2023, 9:57 p.m.