Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
lschneiderbauer committed Dec 28, 2024
1 parent 38508f5 commit 5b15fc0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
9 changes: 6 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ knitr::opts_chunk$set(

<!-- 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 wraps 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. It provides an R-like functional interface and implements common S3 methods for convenience.

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>

Expand Down Expand Up @@ -78,11 +78,14 @@ output <-
sigma = 5
)
# The result is a numeric matrix
# The result is basically a numeric matrix with time and frequency dimension
dim(output)
# Some meta data is recorded too
output
```

The result can be easily coerced into a data frame:
The result can be converted into a data frame if need be:

```{r example_df}
head(as.data.frame(output), 10)
Expand Down
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ 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 wraps 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.
It provides an R-like functional interface and implements common S3
methods for convenience.

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,
Expand Down Expand Up @@ -91,12 +93,24 @@ output <-
sigma = 5
)

# The result is a numeric matrix
# The result is basically a numeric matrix with time and frequency dimension
dim(output)
#> [1] 6000 200

# Some meta data is recorded too
output
#> _Scalogram_
#> <> (Time/Frequency) dimension: [6000,200]
#> <> Sampling rate: 44.1 [kHz]
#> <> Frequency scale: 16 [Hz] - 2100 [Hz], linear
#> <> Time offset: 0 [s]
#> <> Sigma: 5
#> Time/frequency matrix summary
#> Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
#> 0.00 0.00 0.00 0.13 0.04 2.81 232338
```

The result can be easily coerced into a data frame:
The result can be converted into a data frame if need be:

``` r
head(as.data.frame(output), 10)
Expand Down

0 comments on commit 5b15fc0

Please sign in to comment.