dfilter {stepR} | R Documentation |
Digital filters
Description
Create digital filters.
Deprecation warning: This function is mainly used for patchlamp recordings and may be transferred to a specialised package.
Usage
dfilter(type = c("bessel", "gauss", "custom"), param = list(pole = 4, cutoff = 1 / 10),
len = ceiling(3/param$cutoff))
## S3 method for class 'dfilter'
print(x, ...)
Arguments
type |
allows to choose Bessel, Gauss or custom filters |
param |
for a |
len |
filter length (unnecessary for |
x |
the object |
... |
for generic methods only |
Value
Returns a list of class
dfilter
that contains elements kern
and step
, the (digitised) filter kernel and step-response, resp., as well as an element param
containing the argument param
, for a "bessel"
filter alongside the corresponding analogue kernel, step response, power spectrum, and autocorrelation function depending on time or frequency as elements kernfun
, stepfun
, spectrum
, and acfun
, resp.
See Also
filter
, convolve
, BesselPolynomial
, Normal
, family
Examples
# 6-pole Bessel filter with cut-off frequency 1 / 100, with length 100 (too short!)
dfilter("bessel", list(pole = 6, cutoff = 1 / 100), 100)
# custom filter: running mean of length 3
dfilter("custom", rep(1, 3))
dfilter("custom", rep(1, 3))$kern # normalised!
dfilter("custom", rep(1, 3))$step
# Gaussian filter with bandwidth 3 and length 11 (from -5 to 5)
dfilter("gauss", 3, 11)