View source: R/createLocalList.R
| createLocalList | R Documentation |
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.
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
# 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
# r = 100 instead of the defaults r = 1e4 for q1 and r = 1e3 for q2
# is used to reduce the run time,
# this is okay for illustration purposes, but for precise results
# the default number of Monte-Carlo simulations is recommended
idealisation <- hilde(gramA, filter = filter, family = "jsmurfPS", method = "LR",
startTime = 9, messages = 10, localList = localList, r = 100)
identical(hilde(gramA, filter = filter, family = "jsmurfPS", method = "LR",
startTime = 9, r = 100), idealisation)
# for HILDE allowing heterogeneous noise, here 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
# as used in hilde, see the examples of hilde for HILDE allowing heterogeneous noise
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.