diff --git a/R/fcwt.R b/R/fcwt.R index 0b98631..829998c 100644 --- a/R/fcwt.R +++ b/R/fcwt.R @@ -9,12 +9,12 @@ #' Sampling rate of input time series in physical units. #' #' @param freq_begin -#' Sets the minimal frequency (`> 0`!), in same units as `sample_freq`, +#' Sets the minimal frequency (\code{> 0}!), in same units as \code{sample_freq}, #' that should be contained in the output. #' #' @param freq_end -#' Sets the maximal frequency (`> freq_begin`!), in sameunits as `sample_freq`, -#' that should be contained in the output. +#' Sets the maximal frequency (\code{> freq_begin}!), in same units as +#' \code{sample_freq}, that should be contained in the output. #' #' @param n_freqs #' Number of frequency bins generated by the CWT. The frequencies @@ -23,8 +23,7 @@ #' #' @param sigma #' Sets a dimensionless parameter modifying the wavelet spread which in the -#' time-domain is roughly given by -#' \eqn{\Sigma_t \sim \sqrt(2) \frac{\sigma}{f}}. +#' time-domain is roughly given by \eqn{\Sigma_t \sim \sqrt{2} \frac{\sigma}{f}}. #' Changing this parameter adjusts the time/frequency uncertainty balance. #' Defaults to 1. #' Larger (lower) value of sigma corresponds to a better (worse) frequency @@ -35,16 +34,16 @@ #' settings corresponding values to NA. #' We define the essential support of the #' (Gaußian) 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 \Sigma_t = 2 * \sqrt{2} \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 rangeare removed +#' is less then \eqn{4 \Sigma_t}. Values that fall into that range are removed #' if `remove_coi = TRUE`. #' #' @param nthreads #' Number of threads used by the computation, if applicable. #' #' @return -#' A numeric real-valued matrix with `dim = c(length(signal), n_freqs)`. +#' A numeric real-valued matrix with \code{dim = c(length(signal), n_freqs)}. #' #' @examples #' ts_sin_440 <- sin((1:44100) * 2 * pi * 440 / 44100) @@ -57,7 +56,6 @@ #' n_freqs = 10, #' sigma = 5 #' ) -#' #' @export fcwt <- function(signal, sample_freq, diff --git a/man/fcwt.Rd b/man/fcwt.Rd index d94923a..7186fd8 100644 --- a/man/fcwt.Rd +++ b/man/fcwt.Rd @@ -20,19 +20,18 @@ fcwt( \item{sample_freq}{Sampling rate of input time series in physical units.} -\item{freq_begin}{Sets the minimal frequency (`> 0`!), in same units as `sample_freq`, +\item{freq_begin}{Sets the minimal frequency (\code{> 0}!), in same units as \code{sample_freq}, that should be contained in the output.} -\item{freq_end}{Sets the maximal frequency (`> freq_begin`!), in sameunits as `sample_freq`, -that should be contained in the output.} +\item{freq_end}{Sets the maximal frequency (\code{> freq_begin}!), in same units as +\code{sample_freq}, that should be contained in the output.} \item{n_freqs}{Number of frequency bins generated by the CWT. The frequencies are linearly distributed. Computation time increases when raising the number of frequency bins.} \item{sigma}{Sets a dimensionless parameter modifying the wavelet spread which in the -time-domain is roughly given by -\eqn{\Sigma_t \sim \sqrt(2) \frac{\sigma}{f}}. +time-domain is roughly given by \eqn{\Sigma_t \sim \sqrt{2} \frac{\sigma}{f}}. Changing this parameter adjusts the time/frequency uncertainty balance. Defaults to 1. Larger (lower) value of sigma corresponds to a better (worse) frequency @@ -42,15 +41,15 @@ resolution and a worse (better) time resolution.} settings corresponding values to NA. We define the essential support of the (Gaußian) 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 \Sigma_t = 2 * \sqrt{2} \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 rangeare removed +is less then \eqn{4 \Sigma_t}. Values that fall into that range are removed if `remove_coi = TRUE`.} \item{nthreads}{Number of threads used by the computation, if applicable.} } \value{ -A numeric real-valued matrix with `dim = c(length(signal), n_freqs)`. +A numeric real-valued matrix with \code{dim = c(length(signal), n_freqs)}. } \description{ This function call is a thin wrapper for the fcwt API. @@ -66,5 +65,4 @@ fcwt( n_freqs = 10, sigma = 5 ) - } diff --git a/man/fcwt_batch.Rd b/man/fcwt_batch.Rd index c597805..c72e5d6 100644 --- a/man/fcwt_batch.Rd +++ b/man/fcwt_batch.Rd @@ -21,19 +21,18 @@ fcwt_batch( \item{sample_freq}{Sampling rate of input time series in physical units.} -\item{freq_begin}{Sets the minimal frequency (`> 0`!), in same units as `sample_freq`, +\item{freq_begin}{Sets the minimal frequency (\code{> 0}!), in same units as \code{sample_freq}, that should be contained in the output.} -\item{freq_end}{Sets the maximal frequency (`> freq_begin`!), in sameunits as `sample_freq`, -that should be contained in the output.} +\item{freq_end}{Sets the maximal frequency (\code{> freq_begin}!), in same units as +\code{sample_freq}, that should be contained in the output.} \item{n_freqs}{Number of frequency bins generated by the CWT. The frequencies are linearly distributed. Computation time increases when raising the number of frequency bins.} \item{sigma}{Sets a dimensionless parameter modifying the wavelet spread which in the -time-domain is roughly given by -\eqn{\Sigma_t \sim \sqrt(2) \frac{\sigma}{f}}. +time-domain is roughly given by \eqn{\Sigma_t \sim \sqrt{2} \frac{\sigma}{f}}. Changing this parameter adjusts the time/frequency uncertainty balance. Defaults to 1. Larger (lower) value of sigma corresponds to a better (worse) frequency