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_time_res(res, freq)

Arguments

res

The required time 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 time resolution requirement.

Examples

ref_freq <- u(440, "Hz")
sigma <- sigma_from_time_res(u(10, "ms"), ref_freq)

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