Learn R Programming

eseis (version 0.8.0)

signal_interpolate: Interpolate a signal vector

Description

The signal vector data is interpolated by an integer factor n. If an eseis object is provided, the meta data is updated. The function is a wrapper for the function interp of the package signal. Note that interpolation does not create new meaningful information but rather artefacts above the initial frequency range.

Usage

signal_interpolate(data, n, l = 4, ...)

Value

Interpolated data set.

Arguments

data

eseis object, numeric vector or list of objects, data set to be processed.

n

Numeric value, number of samples to be interpolated by. Must be an integer value greater than 1. Default is 2.

l

Character value, FIR filter length. For details see documentation of signal::decimate. Default is 4.

...,

further arguments passed to signal::interp. See details.

Author

Michael Dietze

Details

The function calls the function signal::interp and wraps the output into the eseis object structure. The ...-argument may contain the passed argument Wc (FIR filter cutoff frequency). Note that by convention the argument n of eseis::signal_interpolate does not equal the argument n of signal::interp. Rather this is the argument l that is passed as n.

Examples

Run this code

## load example data set
data(rockfall)

## detrend data set
s <- signal_detrend(data = rockfall_eseis)

## interpolate by factor 2
s_int = signal_interpolate(data = s, n = 2)

## calculate and plot spectrogram
p_int = signal_spectrogram(data = s_int)
plot(p_int)

Run the code above in your browser using DataLab