[R] Morlet wavelet not supportd by wavCWTPeaks

stephen sefick ssefick at gmail.com
Sat Dec 6 08:25:17 CET 2008


aa <- (structure(list(X.0.85 = c(-1.02, -1.17, -1.29, -1.39, -1.46,
-1.5, -1.52, -1.5, -1.46, -1.39, -1.3, -1.19, -1.07, -0.93, -0.79,
-0.65, -0.5, -0.36, -0.22, -0.08, 0.05, 0.18, 0.3, 0.41, 0.52,
0.62, 0.72, 0.81, 0.89, 0.98, 1.05, 1.13, 1.19, 1.25, 1.29, 1.31,
1.31, 1.29, 1.24, 1.16, 1.06, 0.93, 0.77, 0.58, 0.38, 0.16, -0.07,
-0.31, -0.89, -1.05, -1.19, -1.31, -1.41, -1.47, -1.51, -1.51,
-1.49, -1.44, -1.37, -1.28, -1.17, -1.04, -0.91, -0.76, -0.62,
-0.47, -0.33, -0.19, -0.06, 0.08, 0.2, 0.32, 0.43, 0.54, 0.64,
0.73, 0.82, 0.91, 0.99, 1.07, 1.14, 1.2, 1.25, 1.29, 1.31, 1.31,
1.28, 1.23, 1.15, 1.04, 0.9, 0.73, 0.55, 0.34, 0.11, -0.12, -0.92,
-1.08, -1.22, -1.33, -1.42, -1.48, -1.51, -1.51, -1.48, -1.43,
-1.35, -1.26, -1.14, -1.01, -0.88, -0.74, -0.59, -0.45, -0.3,
-0.16, -0.03, 0.1, 0.22, 0.34, 0.45, 0.56, 0.66, 0.75, 0.84,
0.93, 1.01, 1.08, 1.15, 1.21, 1.26, 1.3, 1.31, 1.3, 1.27, 1.21,
1.13, 1.01, 0.87, 0.7, 0.5, 0.29, 0.07, -0.17, -0.95, -1.11,
-1.24, -1.35, -1.44, -1.49, -1.51, -1.51, -1.48, -1.42, -1.33,
-1.23, -1.12, -0.99, -0.85, -0.71, -0.56, -0.42, -0.27, -0.14,
0, 0.13, 0.25, 0.36, 0.47, 0.58, 0.68, 0.77, 0.86, 0.94, 1.02,
1.1, 1.17, 1.23, 1.27, 1.3, 1.31, 1.3, 1.26, 1.2, 1.11, 0.98,
0.83, 0.66, 0.46, 0.25, 0.02, -0.22, -0.99, -1.14, -1.27, -1.37,
-1.45, -1.5, -1.52, -1.5, -1.47, -1.4, -1.32, -1.21, -1.09, -0.96,
-0.82, -0.68, -0.53, -0.39, -0.25, -0.11, 0.02, 0.15, 0.27, 0.39,
0.5, 0.6, 0.7, 0.79, 0.87, 0.96, 1.04, 1.11, 1.18, 1.24, 1.28,
1.31, 1.31, 1.29, 1.25, 1.18, 1.08, 0.96, 0.8, 0.62, 0.42, 0.2,
-0.03, -0.27)), .Names = "X.0.85", class = "data.frame", row.names = c(NA,
-240L)))
library(wmtsa)
library(fields)
aats <- ts (aa, deltat =1/30, start = 0.0)
aa.cwt <-  wavCWT(aats)
aa.tree <- wavCWTTree (aa.cwt)
aa.peak <- wavCWTPeaks(aa.tree)

sorry I didn't realize that only the mexican hat wavelet could be used
for the peak function.  This should work fine.  and Use the tim.colors
argument in the plot() function.  I hope this helps....  This reason I
suggested the morlet wavelet is that it is compactly suppoted

On Sat, Dec 6, 2008 at 1:39 AM,  <mauede at alice.it> wrote:
> aa.cwt <-  wavCWT(aats,wavelet="morlet")
>> aa.cwt
> Continuous Wavelet Transform of aats
> ------------------------------------
> Wavelet                 : Morlet
> Wavelet frequency shift : 5 (rad/sec)
> Length of series        : 241
> Sampling interval       : 0.03333333
> Number of scales        : 65
> Range of scales         : 0.0333333333333333 to 8.03333333333333
>>  aa.cwt.coef <- as.matrix (aa.cwt)
>>    plot (aa.cwt, series=TRUE)
>> plot (aa.cwt, type="persp")
>
>>   aa.tree <- wavCWTTree (aa.cwt)
>>  aa.peak <- wavCWTPeaks (aa.tree)
> Error in wavCWTPeaks(aa.tree) :
>   Only CWT developed using the Mexican hat (gaussian2) filter are supported
>>
>
> Alice Messenger ;-) chatti anche con gli amici di Windows Live Messenger e
> tutti i telefonini TIM!
> Vai su http://maileservizi.alice.it/alice_messenger/index.html?pmk=footer



-- 
Stephen Sefick

Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods.  We are mammals, and have not exhausted the
annoying little problems of being mammals.

								-K. Mullis



More information about the R-help mailing list