Skip to contents

Given two or more scalograms with identical sampling frequencies, frequency scales and sigma, it can be useful to combine several into a single object creating a longer time series. The function errs if these conditions are not satisfied.

Usage

# S3 method for class 'fcwtr_scalogram'
rbind(...)

Arguments

...

One or more "fcwtr_scalogram" objects, generated by fcwt().

Value

Returns a new time-wise combined "fcwtr_scalogram" object.

Details

The scalograms are stitched together in chronological fashion (i.e. the first argument will be the initial piece, etc.). Time offset information is kept from the first piece.

Examples

ts_sin_440 <- sin((1:5000) * 2 * pi * 440 / 44100)

res <-
  fcwt(
    ts_sin_440,
    x_sample_freq = u(44.1, "kHz"),
    freq_begin = u(50, "Hz"),
    freq_end = u(1000, "Hz"),
    n_freqs = 10,
    sigma = 5
  )

print(res)
#> _Scalogram_
#> * (Time/Frequency) dimension:  ( 18 , 10 )
#> * Sampling rate: 0.15 [kHz]
#> * Frequency scale: 50 [Hz] - 1000 [Hz], log
#> * Time offset: 0 [s] 
#> * Sigma: 5
#>   o Time resolution at  50 [Hz] :  400 [ms] 
#>   o Time resolution at  1000 [Hz] :  20 [ms] 
#>   o Relative frequency resolution:  0.127324 
#> * Time/frequency matrix summary
#>      Min.   1st Qu.    Median      Mean   3rd Qu.      Max.       NAs 
#> 3.366e-06 1.305e-05 1.412e-04 2.837e-03 2.391e-03 4.841e-02       114 

# doubled scalogram
res_doubled <- rbind(res, res)

print(res_doubled)
#> _Scalogram_
#> * (Time/Frequency) dimension:  ( 36 , 10 )
#> * Sampling rate: 0.15 [kHz]
#> * Frequency scale: 50 [Hz] - 1000 [Hz], log
#> * Time offset: 0 [s] 
#> * Sigma: 5
#>   o Time resolution at  50 [Hz] :  400 [ms] 
#>   o Time resolution at  1000 [Hz] :  20 [ms] 
#>   o Relative frequency resolution:  0.127324 
#> * Time/frequency matrix summary
#>      Min.   1st Qu.    Median      Mean   3rd Qu.      Max.       NAs 
#> 3.366e-06 1.269e-05 1.412e-04 2.837e-03 2.423e-03 4.841e-02       228