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()
.
Details
The scalograms are stitched together in chronological fashion (i.e. the first argument will 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: 150 [Hz]
#> * Frequency scale: 50 [Hz] - 1000 [Hz], log
#> * Time offset: 0 [s]
#> * Sigma: 5
#> o Time resolution at 50 [Hz] : 0.4 [1/Hz]
#> o Time resolution at 1000 [Hz] : 0.02 [1/Hz]
#> o Relative frequency resolution: 0.127324
#> * Time/frequency matrix summary
#> Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
#> 0.00000 0.00000 0.00000 0.00001 0.00001 0.00023 114
# doubled scalogram
res_doubled <- rbind(res, res)
print(res_doubled)
#> _Scalogram_
#> * (Time/Frequency) dimension: ( 36 , 10 )
#> * Sampling rate: 150 [Hz]
#> * Frequency scale: 50 [Hz] - 1000 [Hz], log
#> * Time offset: 0 [s]
#> * Sigma: 5
#> o Time resolution at 50 [Hz] : 0.4 [1/Hz]
#> o Time resolution at 1000 [Hz] : 0.02 [1/Hz]
#> o Relative frequency resolution: 0.127324
#> * Time/frequency matrix summary
#> Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
#> 0.00000 0.00000 0.00000 0.00001 0.00001 0.00023 228