,
Downsample a signal_tbl by a factor q
, using an FIR or IIR filter.
This is a wrapper for decimate
from the
gsignal
package, see its documentation for details.
eeg_downsample(
.data,
.q = 2,
.max_sample = NULL,
.n = if (.ftype == "iir") 8 else 30,
.ftype = "iir",
.multiple_times = FALSE,
...
)
An eeg_lst object.
integer factor(s) to downsample by.
Optionally, the (approximated) maximum sample number can be defined here, which is at least half of the total number of samples
Order of the filter used prior to the downsampling, specified as a
positive integer. Default: 8 if ftype
equals "iir"
; 30 of
ftype
equals "fir"
.
filter type; either "fir"
, specifying a FIR filter of
length n
designed with the function fir1
, or
"iir"
(default), specifying an IIR Chebyshev filter of order 8 using
the function cheby1
.
Indicates whether to factorize `q`` and apply the downsampling in steps.
Not in use.
A factor q larger than 13 can result in NAs. To avoid this,
the downsampling can be done in steps. For example, instead of setting
q = 20
, it is possible to set q = c(2,10)
.
Other preprocessing functions:
eeg_baseline()
,
eeg_ica_keep()
,
eeg_ica()
,
eeg_rereference()
,
eeg_segment()
,
filt
Other plotting functions:
annotate_electrodes()
,
annotate_events()
,
annotate_head()
,
ggplot.eeg_lst()
,
plot.eeg_lst()
,
plot_components()
,
plot_in_layout()
,
plot_topo()
,
theme_eeguana()