Learn R Programming

eseis (version 0.6.0)

signal_motion: Calculate particle motion parameters

Description

The function calculates from a data set of three seismic components of the same signal the following particle motion paramters using a moving window approach: horizontal-vertical eigenvalue ratio, azimuth and inclination.

Usage

signal_motion(data, time, dt, window, step, order = "xyz")

Value

A List object with eigenvalue ratios (eigen), azimuth (azimuth) and inclination (inclination) as well as the corresponding time vector for these values.

Arguments

data

List, data frame or matrix, seismic componenents to be processed. If data is a matrix, the components must be organised as columns. Also, data can be a list of eseis objects.

time

POSIXct vector, time vector corresponding to the seismic signal components. If omitted, a synthetic time vector will be generated. If omitted, the sampling period (dt) must be provided.

dt

Numeric value, sampling period. Only needed if time is omitted or if data is no eseis object.

window

Numeric value, time window length (given as number of samples) used to calculate the particle motion parameters. If value is even, it will be set to the next smaller odd value. If omitted, the window size is set to 1 percent of the time series length by default.

step

Numeric value, step size (given as number of samples), by which the window is shifted over the data set. If omitted, the step size is set to 50 percent of the window size by default.

order

Character value, order of the seismic components. Describtion must contain the letters "x","y" and "z" in the order according to the input data set. Default is "xyz" (EW-NS-vertical).

Author

Michael Dietze

Details

The function code is loosely based on the function GAZI() from the package RSEIS with removal of unnecessary content and updated or rewritten loop functionality.

Examples

Run this code
## load example data set
data(earthquake)

## filter seismic signals
s <- eseis::signal_filter(data = s, 
                          dt = 1/200, 
                          f = c(1, 3))

## integrate signals to get displacement
s_d <- eseis::signal_integrate(data = s, dt = 1/200)

## calculate particle motion parameters
pm <- signal_motion(data = s_d, 
                    time = t, 
                    dt = 1 / 200,
                    window = 100, 
                    step = 10)
                    
## plot function output
par_original <- par(no.readonly = TRUE)
par(mfcol = c(2, 1))

plot(x = t, y = s$BHZ, type = "l")
plot(x = pm$time, y = pm$azimuth, type = "l")

par(par_original)

Run the code above in your browser using DataLab