diff --git a/DESCRIPTION b/DESCRIPTION index 94a7c83..0692342 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,4 +1,4 @@ -Package: fcwtr +Package: fCWTr Type: Package Title: Fast Continuous Wavelet Transform Version: 0.2.0 diff --git a/LICENSE.note b/LICENSE.note index 34ecbfd..db38602 100644 --- a/LICENSE.note +++ b/LICENSE.note @@ -1,3 +1,3 @@ -The fcwtr package as a whole is distributed under GPLv3. The fcwtr package includes other open source software components. The following is a list of these components: +The fCWTr package as a whole is distributed under GPLv3. The fCWTr package includes other open source software components. The following is a list of these components: -* fcwt: Apache License 2.0 - Copyright 2021 Lukas P.A. Arts & Egon L. van den Broek +* fCWT: Apache License 2.0 - Copyright 2021 Lukas P.A. Arts & Egon L. van den Broek diff --git a/NAMESPACE b/NAMESPACE index 0cef8ec..cb5e304 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -7,4 +7,4 @@ export(fcwt_batch) importFrom(graphics,plot) importFrom(utils,setTxtProgressBar) importFrom(utils,txtProgressBar) -useDynLib(fcwtr, .registration = TRUE) +useDynLib(fCWTr, .registration = TRUE) diff --git a/R/cpp11.R b/R/cpp11.R index 8a4f1c1..fb85303 100644 --- a/R/cpp11.R +++ b/R/cpp11.R @@ -1,5 +1,5 @@ # Generated by cpp11: do not edit by hand fcwt_raw <- function(signal, fs, f0, f1, fn, sigma, nthreads, optplans, abs) { - .Call(`_fcwtr_fcwt_raw`, signal, fs, f0, f1, fn, sigma, nthreads, optplans, abs) + .Call(`_fCWTr_fcwt_raw`, signal, fs, f0, f1, fn, sigma, nthreads, optplans, abs) } diff --git a/R/fcwtr-package.R b/R/fCWTr-package.R similarity index 58% rename from R/fcwtr-package.R rename to R/fCWTr-package.R index 654b72d..10d63ad 100644 --- a/R/fcwtr-package.R +++ b/R/fCWTr-package.R @@ -1,4 +1,4 @@ ## usethis namespace: start -#' @useDynLib fcwtr, .registration = TRUE +#' @useDynLib fCWTr, .registration = TRUE ## usethis namespace: end NULL diff --git a/R/fcwt.R b/R/fcwt.R index d056a71..12175d7 100644 --- a/R/fcwt.R +++ b/R/fcwt.R @@ -1,6 +1,6 @@ #' Fast continuous wavelet transform #' -#' The core function of this package making use of the fcwt library. It processes +#' The core function of this package making use of the fCWT library. It processes #' an input signal in form of a real valued numeric vector interpreted as an #' evenly spaced time series and returns the absolute values of a spectogram, #' i.e. a graph with a time and a frequency dimension. diff --git a/R/fcwt_batch.R b/R/fcwt_batch.R index b2e7efa..7b2f686 100644 --- a/R/fcwt_batch.R +++ b/R/fcwt_batch.R @@ -1,4 +1,4 @@ -#' Fcwt batch processing +#' Fast continuous wavelet transform - Batch processing #' #' Performs a fast continuous wavelet transform on long sequences by sequentially #' processing junks of the input signal and keeping only low-resolution output diff --git a/README.Rmd b/README.Rmd index e1bab4e..efb8525 100644 --- a/README.Rmd +++ b/README.Rmd @@ -15,7 +15,7 @@ knitr::opts_chunk$set( ) ``` -# fcwtr +# fCWTr @@ -23,14 +23,14 @@ knitr::opts_chunk$set( -The R package fcwtr is a simple wrapper invoking the [fcwt library](https://github.com/fastlib/fCWT), a library implementing a [continuous wavelet transform](https://en.wikipedia.org/wiki/Continuous_wavelet_transform) with a Morlet wavelet, utilizing the power of [fftw](https://www.fftw.org/), a fast fourier transform implementation. +The R package fCWTr is a simple wrapper invoking the [fCWT library](https://github.com/fastlib/fCWT), a library implementing a [continuous wavelet transform](https://en.wikipedia.org/wiki/Continuous_wavelet_transform) with a Morlet wavelet, utilizing the power of [fftw](https://www.fftw.org/), a fast fourier transform implementation. See the original paper by Arts, L.P.A., van den Broek, E.L. The fast continuous wavelet transformation (fCWT) for real-time, high-quality, noise-resistant time–frequency analysis. Nat Comput Sci 2, 47–58 (2022). ## Dependencies - R \>= 4.1 -- [fftw](https://www.fftw.org/) library (used by fcwt) +- [fftw](https://www.fftw.org/) library (used by fCWT) - Optional: a CPU/compiler supporting the [AVX](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions) instruction set - Optional: OpenMP - On Windows, OpenMP support is disabled since rtools decided to compile fftw without OpenMP support. @@ -45,21 +45,21 @@ CXXFLAGS = -mavx ## Installation -You can install the latest CRAN release of fcwtr with: +You can install the latest CRAN release of fCWTr with: ``` r -install.packages("fcwtr") +install.packages("fCWTr") ``` -Alternatively, you can install the development version of fcwtr like so (requiring installed [devtools](https://devtools.r-lib.org/) package): +Alternatively, you can install the development version of fCWTr like so (requiring installed [devtools](https://devtools.r-lib.org/) package): ``` r -devtools::install_github("lschneiderbauer/fcwtr") +devtools::install_github("lschneiderbauer/fCWTr") ``` ## Example -This is a basic example that invokes the fcwt library to calculate the continuous wavelet transform and plot the result. +This is a basic example that invokes the fCWT library to calculate the continuous wavelet transform and plot the result. ```{r example} library(fcwtr) diff --git a/README.md b/README.md index d503c26..281b569 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# fcwtr +# fCWTr @@ -15,7 +15,7 @@ coverage](https://codecov.io/gh/lschneiderbauer/fcwtr/branch/master/graph/badge. -The R package fcwtr is a simple wrapper invoking the [fcwt +The R package fCWTr is a simple wrapper invoking the [fCWT library](https://github.com/fastlib/fCWT), a library implementing a [continuous wavelet transform](https://en.wikipedia.org/wiki/Continuous_wavelet_transform) @@ -30,7 +30,7 @@ noise-resistant time–frequency analysis. Nat Comput Sci 2, 47–58 (2022). ## Dependencies - R \>= 4.1 -- [fftw](https://www.fftw.org/) library (used by fcwt) +- [fftw](https://www.fftw.org/) library (used by fCWT) - Optional: a CPU/compiler supporting the [AVX](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions) instruction set @@ -55,22 +55,22 @@ CXXFLAGS = -mavx ## Installation -You can install the latest CRAN release of fcwtr with: +You can install the latest CRAN release of fCWTr with: ``` r -install.packages("fcwtr") +install.packages("fCWTr") ``` -Alternatively, you can install the development version of fcwtr like so +Alternatively, you can install the development version of fCWTr like so (requiring installed [devtools](https://devtools.r-lib.org/) package): ``` r -devtools::install_github("lschneiderbauer/fcwtr") +devtools::install_github("lschneiderbauer/fCWTr") ``` ## Example -This is a basic example that invokes the fcwt library to calculate the +This is a basic example that invokes the fCWT library to calculate the continuous wavelet transform and plot the result. ``` r diff --git a/man/fcwt.Rd b/man/fcwt.Rd index 37d41b4..35c5193 100644 --- a/man/fcwt.Rd +++ b/man/fcwt.Rd @@ -57,7 +57,7 @@ This matrix is wrapped into a S3-class \code{fcwtr_scalogram} so that plotting a coercion functions can be used conveniently. } \description{ -The core function of this package making use of the fcwt library. It processes +The core function of this package making use of the fCWT library. It processes an input signal in form of a real valued numeric vector interpreted as an evenly spaced time series and returns the absolute values of a spectogram, i.e. a graph with a time and a frequency dimension. diff --git a/man/fcwt_batch.Rd b/man/fcwt_batch.Rd index 4ec7841..352feda 100644 --- a/man/fcwt_batch.Rd +++ b/man/fcwt_batch.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/fcwt_batch.R \name{fcwt_batch} \alias{fcwt_batch} -\title{Fcwt batch processing} +\title{Fast continuous wavelet transform - Batch processing} \usage{ fcwt_batch( signal, diff --git a/man/figures/README-example_long_df-1.png b/man/figures/README-example_long_df-1.png index 7d04565..4b19eed 100644 Binary files a/man/figures/README-example_long_df-1.png and b/man/figures/README-example_long_df-1.png differ diff --git a/man/figures/README-example_plot-1.png b/man/figures/README-example_plot-1.png index cb915de..3b185b9 100644 Binary files a/man/figures/README-example_plot-1.png and b/man/figures/README-example_plot-1.png differ diff --git a/src/cpp11.cpp b/src/cpp11.cpp index 80587d2..e099c53 100644 --- a/src/cpp11.cpp +++ b/src/cpp11.cpp @@ -7,7 +7,7 @@ // interface_fcwt.cpp std::vector fcwt_raw(std::vector signal, int fs, double f0, double f1, int fn, double sigma, int nthreads, bool optplans, bool abs); -extern "C" SEXP _fcwtr_fcwt_raw(SEXP signal, SEXP fs, SEXP f0, SEXP f1, SEXP fn, SEXP sigma, SEXP nthreads, SEXP optplans, SEXP abs) { +extern "C" SEXP _fCWTr_fcwt_raw(SEXP signal, SEXP fs, SEXP f0, SEXP f1, SEXP fn, SEXP sigma, SEXP nthreads, SEXP optplans, SEXP abs) { BEGIN_CPP11 return cpp11::as_sexp(fcwt_raw(cpp11::as_cpp>>(signal), cpp11::as_cpp>(fs), cpp11::as_cpp>(f0), cpp11::as_cpp>(f1), cpp11::as_cpp>(fn), cpp11::as_cpp>(sigma), cpp11::as_cpp>(nthreads), cpp11::as_cpp>(optplans), cpp11::as_cpp>(abs))); END_CPP11 @@ -15,12 +15,12 @@ extern "C" SEXP _fcwtr_fcwt_raw(SEXP signal, SEXP fs, SEXP f0, SEXP f1, SEXP fn, extern "C" { static const R_CallMethodDef CallEntries[] = { - {"_fcwtr_fcwt_raw", (DL_FUNC) &_fcwtr_fcwt_raw, 9}, + {"_fCWTr_fcwt_raw", (DL_FUNC) &_fCWTr_fcwt_raw, 9}, {NULL, NULL, 0} }; } -extern "C" attribute_visible void R_init_fcwtr(DllInfo* dll){ +extern "C" attribute_visible void R_init_fCWTr(DllInfo* dll){ R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); R_useDynamicSymbols(dll, FALSE); R_forceSymbols(dll, TRUE);