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
c(-1.7693803934301, -1.79611069128061, -1.81517746069223, -1.82670965566891, 
-1.83087810080908, -1.82789267608574, -1.81799919307179, -1.8014759899165, 
-1.77863029149271, -1.74979438113458, -1.715321646769, -1.67558250144069, 
-1.63096029291499, -1.58184719143613, -1.52864015940256, -1.47173698930672, 
-1.41153251097017, -1.34841498718826, -1.28276272782059, -1.21494099059151, 
-1.14529915767847, -1.07416827546639, -1.00185892470139, -0.92865947565509, 
-0.854834731030223, -0.780624983913237, -0.706245458006967, -0.631886160179746, 
-0.55771213713919, -0.483864111655527, -0.410459476489888, -0.337593651488704, 
-0.26534174650219, -0.193760513197372, -0.122890565559422, -0.0527587934444491, 
0.016619034092944, 0.0852355374082596, 0.153088911047142, 0.220180064836256, 
0.2865097718006, 0.352075869053914, 0.416870559447205, 0.480877842919462, 
0.544071153733498, 0.606411207146701, 0.667844101663334, 0.728299738033216, 
0.787690533152205, 0.845910508051074, 0.902834719936486, 0.958319098356665, 
1.01220064999431, 1.06429807031477, 1.11441275660834, 1.16233017873755, 
1.20782165400904, 1.25064645517539, 1.29055424883608, 1.3272878396626, 
1.36058619860303, 1.39018767676553, 1.41583346505341, 1.43727115483125, 
1.45425841873631, 1.46656673244844, 1.47398509646004, 1.47632371142625, 
1.47341753063947, 1.4651296923586, 1.45135470092568, 1.43202139762852, 
1.40709560662514, 1.37658245866075, 1.34052831885175, 1.29902231580615, 
1.25219742839135, 1.20023108919059, 1.14334532376212, 1.08180637655081, 
1.01592383437448, 0.946049244754336, 0.872574218167288, 0.795928063370392, 
0.716574928491733, 0.635010494307459, 0.55175825520241, 0.467365404197774, 
0.382398365734926, 0.297438048029497, 0.213074807350078, 0.129903235628895, 
0.0485167862888156, -0.0304976865051694, -0.106565423641361, 
-0.179129226602023, -0.247654838998002, -0.311636176572969, -0.370600352548544, 
-0.424112444111176, -0.471779942425696, -0.513256821187934, -0.548247203783219, 
-0.57650857716989, -0.597854489684654, -0.612156732769792, -0.619346968394209, 
-0.619417769401452, -0.612423083706985, -0.598478073194431, -0.57775837646107, 
-0.550498757184587, -0.516991187261369, -0.477582329218914, -0.432670513472378, 
-0.382702177658387, -0.328167833579868, -0.269597619103885, -0.207556421359651, 
-0.142638702304154, -0.0754630072683562, -0.00666626161098824, 
0.063102108285374, 0.13318616302267, 0.202929484478916, 0.27168119426245, 
0.338801899396421, 0.403669490606997, 0.465684767029092)
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to