I need to summarize a signal's spectral information from 30s windows into spectral bands. Delta (1-4hz), Theta (5-8hz), Alpha (9-12hz) etc. When using continuous wavelet transformation (cwt), I would get back coefficients that correspond to specific frequencies which I could summarize to get the average power per band.
The discrete Wavelet Transform (dwt) returns "approximations" and "details" instead. I don't understand how to map these coefficients to my spectral bands. I know that as the number of levels increases the frequency resolution increases so if my sample rate is 512, the coefficients should be mapped like the following..
Detail lvl 1: 256hz - 512hz
Detail lvl 2: 128hz - 256hz
Detail lvl 3: 64hz - 128hz
Detail lvl 4: 32hz - 64hz
Detail lvl 5: 16hz - 32hz
Detail lvl 6: 8hz - 16hz
Detail lvl 7: 4hz - 8hz
Approx lvl 7: 0hz - 4hz
I can just summarize the approximation or detail coefficients in any of these bands, but what if I need specific bands like 6hz - 20hz
? If I know what coefficients correspond to what frequency I can quickly map this.
I'm using PyWavelets in python, my cwt code is below
scale = np.arange(1, 150)
f = pwt.scale2frequency(wavelet='more', scale=scale) * 512
coefficients, frees = pewit.cwt(sig, f, 'morl')
delta = np.mean(amp[1:5, :])
theta = np.mean(amp[5:9, :])
...
I think Daubechies wavelet is the closest discrete wavelet to the Morlet.