Skip to contents

Setting the correct value for sigma in fcwt() for a particular use case is important. Sigma controls the wavelet spread used by the FCWT and so determines the time-/frequency resolution (depending on a given reference frequency).

Usage

sigma_from_freq_res(res, freq)

Arguments

res

The required frequency resolution in frequency units (see u()).

freq

The reference frequency where the required resolution must hold. Must be a quantity with frequency units (see u()).

Value

A dimensionless number controlling the FCWT wavelet spread, corresponding to the sigma argument in fcwt().

Details

If you set a high frequency resolution, the time resolution of the output signal will suffer, and vice versa. Determining the correct balance for a particular use case can be crucial. This function determines the value of sigma for a particular frequency resolution requirement.

Examples

ref_freq <- u(440, "Hz")
sigma <- sigma_from_freq_res(u(7, "Hz"), ref_freq)

sigma_res(sigma, ref_freq)
#> $time
#> 0.3637827 [1/Hz]
#> 
#> $freq
#> 7 [Hz]
#>