Here is another occurrence of wmTSA internal error.
My time series is a short breathing cycle (2425-Cyle_9.txt).
Since wmtsa functions that extract extrema seem to expect longer series than I
have, I tried the folowing two tricks:
1) I prolong the 1-cycle series on both ends through duplicating the first value
(on the left end( and the last value on the right end as any ties as the
1-cycle series length. Then I apply CWT to such prolonged series and then obtain
the maxima trees and the peaks as follows:
aal <- rep (aa[1], length(aa))
aar <- rep (aa[length(aa)], length(aa))
aa3 <- c(aal,aa,aar)
aa3ts <- create.signalSeries(aa3, pos=list(from=0.0, by=0.033))
#CONVERT AMPLITUDE INTO TIME-SERIES
aa3.cwt <- wavCWT(aa3ts)
#CWT
aa3.maxtree <- wavCWTTree (aa3.cwt, type="maxima") # GENERATE
CWT MAXIMA TREE
aa3.maxpeak <- wavCWTPeaks (aa3.maxtree) #GET MAXIMUM
PEAKS
Notice that in this case the generated tree (Bad-Tree-Configuration) has only 4
branches. I believe this may cause the error I get when I try to get the
maxime:> aa3.maxpeak <- wavCWTPeaks (aa3.maxtree)
Error in `row.names<-.data.frame`(`*tmp*`, value = c("1",
"0")) :
invalid 'row.names' length
2) I prolong the 1-cycle series on both ends through replicating the series 3
times. Then I apply CWT to such prolonged series and then obtain the maxima
trees and the peaks as follows:
aa3 <- c(aa,aa,aa)
aa3ts <- create.signalSeries(aa3, pos=list(from=0.0, by=0.033))
#CONVERT AMPLITUDE INTO TIME-SERIES
aa3.cwt <- wavCWT(aa3ts)
#CWT
aa3.maxtree <- wavCWTTree (aa3.cwt, type="maxima") # GENERATE
CWT MAXIMA TREE
aa3.maxpeak <- wavCWTPeaks (aa3.maxtree) #GET MAXIMUM
PEAKS
Notice that in this case the generated tree (Good-Tree-Configuration) has 6
branches. This way the peaks are regularly found. No error is printed out:
> aa3.maxpeak <- wavCWTPeaks (aa3.maxtree)
Any comment on the above weird behavour is welcome. Thank you so much.
Maura
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
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 2425-Cyle_9.txt
URL:
<https://stat.ethz.ch/pipermail/r-help/attachments/20081212/6263c7a5/attachment.txt>