Hi @mahmah took a look into your question about complex wavelets sample rate
" .. where x is a signal and fs its sample rate. > Could anyone help me? Here’s what I have done so far, but I don’t know how to include sample rate here for instance:"
FILE: /.julia/packages/NeuroAnalyzer/r2XpB/docs/src/index.md
NeuroAnalyzer.cmax(x::Vector{<:Complex})
NeuroAnalyzer.cmin(x::Vector{<:Complex})
Adding NOTE Regarding Julia Wavelet Sample Rate appears to be fs as per fs::Int64: sampling rate
NeuroAnalyzer.generate_morlet(fs::Int64, f::Real, t::Real=1; ncyc::Int64=5, complex::Bool=false)
NeuroAnalyzer.generate_morlet_fwhm(fs::Int64, f::Real, t::Real=1; h::Float64=0.25)
Example Julia code in FILE: /.julia/packages/NeuroAnalyzer/r2XpB/benchmarks/na_benchmarking.jl
@time fconv(e10, kernel=generate_morlet(256, 1, 32, complex=true))
print(rpad("Filter: moving average", 36))
NeuroAnalyzer.filter_mavg(e10, k=2)
Example Julia code in FILE: /.julia/packages/NeuroAnalyzer/r2XpB/src/analyze/spectrogram.jl
kernel = generate_morlet(fs, sf[frq_idx], 1, ncyc=ncyc[frq_idx], complex=true)
## RE Sample Rate - - fs::Int64: sampling rate
p = zeros(length(f))
@inbounds for frq_idx in 1:nfrq
## Marc TIP Adding NOTE Regarding Sample Rate appears to be fs per `fs::Int64`: sampling rate
kernel = generate_morlet(fs, f[frq_idx], 1, ncyc = ncyc[frq_idx], complex = true)
w_conv = fconv(s .* w, kernel = kernel, norm = false)
p[frq_idx] = median(abs2.(w_conv))
end
Hope that helps you. And, I find wavelets interesting so please let me know
what your Julia code snippet / MWE (Minimum Working Example) was finally.
I’m also interested to know a bit more about
what you want your wavelet application to accomplish?
and why using Complex wavelets?