Learn R Programming

eseis (version 0.8.0)

signal_rotate: 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)

Value

Numeric matrix, the 3-dimensional rotation matrix.

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.

Author

Michael Dietze

Examples

Run this code

## 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)

Run the code above in your browser using DataLab