On Fri, May 14, 2010 at 8:24 AM, Brian Murphy <
mo...@gmx.net> wrote:
> Hi,
Hi Brian,
> can anyone point me to some example code to extract the development of
> frequency amplitude estimates over time, from continuous 1 dimensional
> signals (EEG signals in my case, but I assume code written for audio
> or other 1D signals would work equally well).
The basic version of this is literally just:
pywt.wavedec(data_vector, "bior4.4")
which gives you a list where the first entry is a vector containing
the time-evolving amplitude of the lowest-frequency band, the second
entry is the same for the second-lowest frequency band, etc. Of course
there are many details that may depend on what you want to do --
"bior4.4" is the CDF 9/7 biorthogonal wavelet basis, which I've seen
people use for EEG before, though I don't have references handy. There
are a number of different wavelet bases that have different
advantages. And see also the optional arguments to wavedec if you want
more things to tweak and worry about :-).
> And another question, that probably reveals my ignorance about
> wavelets - but do wavelets in general, or this package in particular,
> yield phase estimates for each of the component frequency like a DFT
> does?
My understanding is that the closest wavelet analogue to that is the
complex wavelet transform:
http://en.wikipedia.org/wiki/Complex_wavelet_transform
which is not currently supported by pywt. I assume that the
implementation would be fairly simple given the existing code, but I
don't understand the CWT math well enough to say.
-- Nathaniel