Skip to content

Commit

Permalink
be more diligent with the package name: fCWTr instead of fcwtr, to ho…
Browse files Browse the repository at this point in the history
…nor the original authors choice
  • Loading branch information
lschneiderbauer committed Jun 15, 2024
1 parent 7814eba commit 0573737
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Package: fcwtr
Package: fCWTr
Type: Package
Title: Fast Continuous Wavelet Transform
Version: 0.2.0
Expand Down
4 changes: 2 additions & 2 deletions LICENSE.note
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ export(fcwt_batch)
importFrom(graphics,plot)
importFrom(utils,setTxtProgressBar)
importFrom(utils,txtProgressBar)
useDynLib(fcwtr, .registration = TRUE)
useDynLib(fCWTr, .registration = TRUE)
2 changes: 1 addition & 1 deletion R/cpp11.R
Original file line number Diff line number Diff line change
@@ -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)
}
2 changes: 1 addition & 1 deletion R/fcwtr-package.R → R/fCWTr-package.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## usethis namespace: start
#' @useDynLib fcwtr, .registration = TRUE
#' @useDynLib fCWTr, .registration = TRUE
## usethis namespace: end
NULL
2 changes: 1 addition & 1 deletion R/fcwt.R
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion R/fcwt_batch.R
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 8 additions & 8 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ knitr::opts_chunk$set(
)
```

# fcwtr
# fCWTr

<!-- badges: start -->

[![R-CMD-check](https://github.com/lschneiderbauer/fcwtr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/lschneiderbauer/fcwtr/actions/workflows/R-CMD-check.yaml) [![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) [![CRAN status](https://www.r-pkg.org/badges/version/fcwtr)](https://CRAN.R-project.org/package=fcwtr) [![Codecov test coverage](https://codecov.io/gh/lschneiderbauer/fcwtr/branch/master/graph/badge.svg)](https://app.codecov.io/gh/lschneiderbauer/fcwtr?branch=master)

<!-- badges: end -->

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). <https://doi.org/10.1038/s43588-021-00183-z>

## 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.
Expand All @@ -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)
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# fcwtr
# fCWTr

<!-- badges: start -->

Expand All @@ -15,7 +15,7 @@ coverage](https://codecov.io/gh/lschneiderbauer/fcwtr/branch/master/graph/badge.

<!-- badges: end -->

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)
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion man/fcwt.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/fcwt_batch.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified man/figures/README-example_long_df-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-example_plot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/cpp11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@

// interface_fcwt.cpp
std::vector<double> fcwt_raw(std::vector<double> 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<cpp11::decay_t<std::vector<double>>>(signal), cpp11::as_cpp<cpp11::decay_t<int>>(fs), cpp11::as_cpp<cpp11::decay_t<double>>(f0), cpp11::as_cpp<cpp11::decay_t<double>>(f1), cpp11::as_cpp<cpp11::decay_t<int>>(fn), cpp11::as_cpp<cpp11::decay_t<double>>(sigma), cpp11::as_cpp<cpp11::decay_t<int>>(nthreads), cpp11::as_cpp<cpp11::decay_t<bool>>(optplans), cpp11::as_cpp<cpp11::decay_t<bool>>(abs)));
END_CPP11
}

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);
Expand Down

0 comments on commit 0573737

Please sign in to comment.