View source: R/signal_filter.R
signal_filter | R Documentation |
The function filters the input signal vector in the time or frequency domain.
signal_filter(
data,
f,
fft = FALSE,
dt,
type,
shape = "butter",
order = 2,
p,
zero = FALSE,
lazy = FALSE
)
data |
|
f |
|
fft |
|
dt |
|
type |
|
shape |
|
order |
|
p |
|
zero |
|
lazy |
|
Numeric
vector or list of vectors, filtered signal vector.
Michael Dietze
## load example data set
data(rockfall)
## filter data set by bandpass filter between 1 and 90 Hz
rockfall_bp <- signal_filter(data = rockfall_eseis,
f = c(1, 90))
## taper signal to account for edge effects
rockfall_bp <- signal_taper(data = rockfall_bp,
n = 2000)
## plot filtered signal
plot_signal(data = rockfall_bp)
## compare time domain versus frequency domain filtering
rockfall_td <- signal_filter(data = rockfall_eseis,
f = c(10, 40),
fft = FALSE)
rockfall_td_sp <- signal_spectrum(data = rockfall_td)
rockfall_fd <- signal_filter(data = rockfall_eseis,
f = c(10, 40),
fft = TRUE)
rockfall_fd_sp <- signal_spectrum(data = rockfall_fd)
plot_spectrum(data = rockfall_td_sp)
plot_spectrum(data = rockfall_fd_sp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.