Description Usage Arguments Value See Also Examples
View source: R/createLocalList.R
Allows to precompute quantities that can be passed to hilde
and improveSmallScales
, all arguments have to coincide with the corresponding ones in those function calls. Doing so saves run time if those functions are called multiple times (with the same arguments) as then the quantities have to be computed only once.
1 2 | createLocalList(filter, method = c("2Param", "LR"),
lengths = if (method == "LR") 1:20 else 1:65)
|
filter |
an object of class |
method |
the testing method for short events, |
lengths |
a vector of integers giving the lengths on which tests will be performed to detect short events, should be chosen such that events on larger scales are already detected by the previous |
An object of class "localList"
, contains computed quantities used by hilde
and improveSmallScales
hilde
, improveSmallScales
, lowpassFilter
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # the used filter of the gramicidin A recordings given by gramA
filter <- lowpassFilter(type = "bessel", param = list(pole = 4L, cutoff = 1e3 / 1e4),
sr = 1e4)
localList <- createLocalList(filter = filter, method = "LR")
# idealisation by HILDE using localList
# this call requires a Monte-Carlo simulation
# and therefore might last a few minutes,
# progress of the Monte-Carlo simulation is reported
idealisation <- hilde(gramA, filter = filter, family = "jsmurfPS", method = "LR",
startTime = 9, messages = 10, localList = localList)
identical(hilde(gramA, filter = filter, family = "jsmurfPS", method = "LR",
startTime = 9), idealisation)
# HILDE allowing heterogeneous noise, for only few lengths
localList <- createLocalList(filter = filter, method = "2Param", lengths = c(3, 10, 25))
# localList has to be computed with the same filter, method and lengths
hilde(gramA, filter = filter, family = "hjsmurf", method = "2Param",
startTime = 9, messages = 10, r = 100,
lengths = c(3, 10, 25), localList = localList)
# r = 100 is used to reduce its run time,
# this is okay for illustration purposes, but for precise results
# a larger number of Monte-Carlo simulations is recommend
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.