diff --git a/R/fcwt.R b/R/fcwt.R index c57f37e..b3085b5 100644 --- a/R/fcwt.R +++ b/R/fcwt.R @@ -60,9 +60,9 @@ #' those are effectively removed by setting corresponding values to [NA]. #' We define the essential support of the #' (Gaussian) wavelet to be four times its standard deviation, -#' \eqn{4 \Sigma_t = 2 * \sqrt{2} \frac{\sigma}{f}}, and so a wavelet touches +#' \eqn{4 \Delta t = 4 \frac{\sigma}{f}}, and so a wavelet touches #' the boundary if the distance of the center of the wavelet to the boundary -#' is less then \eqn{4 \Sigma_t}. Values that fall into that range are removed +#' is less then \eqn{2 \Delta t}. Values that fall into that range are removed #' if `remove_coi = TRUE`. #' #' @param n_threads diff --git a/R/fcwtr_scalogram.R b/R/fcwtr_scalogram.R index ef42006..9ff1347 100644 --- a/R/fcwtr_scalogram.R +++ b/R/fcwtr_scalogram.R @@ -60,12 +60,12 @@ sc_coi_mask <- function(x) { #' @noRd coi_mask <- function(dim_t, dim_f, sample_freq, freq_begin, freq_end, freq_scale, sigma) { - # The standard deviation Σ of a the Gauß like wave packet at frequency f + # The standard deviation Dt of a the Gauß like wave packet at frequency f # and sampling frequency f_s with given σ is given by - # Σ = σ / sqrt(2) f_s / f + # Dt = σ / f # we choose 4Σ to define the support of a wave packet # (and so boundary effects are expected to occur until 2Σ) - coi_pred <- \(f, t) ddu(t * f) < sqrt(2) * sigma + coi_pred <- \(f, t) ddu(t * f) < 2 * sigma # express in dimensionless quantities t <- rep(1:dim_t, times = dim_f) @@ -84,7 +84,7 @@ coi_mask <- function(dim_t, dim_f, sample_freq, freq_begin, freq_end, # invalid time steps on one side of the time series # invalid meaning: at least one frequency in that time range has invalid value coi_invalid_time_steps <- function(sample_freq, freq_begin, sigma) { - as.integer(ddu(floor(sqrt(2) * sigma * sample_freq / freq_begin))) + as.integer(ddu(floor(2 * sigma * sample_freq / freq_begin))) } sc_dim_freq <- function(x) { diff --git a/man/fcwt.Rd b/man/fcwt.Rd index 22e3341..57c9303 100644 --- a/man/fcwt.Rd +++ b/man/fcwt.Rd @@ -56,9 +56,9 @@ Boundary effects can result in nonphysical artifacts. If \code{remove_coi = TRUE those are effectively removed by setting corresponding values to \link{NA}. We define the essential support of the (Gaussian) wavelet to be four times its standard deviation, -\eqn{4 \Sigma_t = 2 * \sqrt{2} \frac{\sigma}{f}}, and so a wavelet touches +\eqn{4 \Delta t = 4 \frac{\sigma}{f}}, and so a wavelet touches the boundary if the distance of the center of the wavelet to the boundary -is less then \eqn{4 \Sigma_t}. Values that fall into that range are removed +is less then \eqn{2 \Delta t}. Values that fall into that range are removed if \code{remove_coi = TRUE}.} \item{n_threads}{Number of threads used by the computation, if supported by your platform.