- totts.cwt = Rwave::cwt(ts, totnoct, nvoice, w0=2*pi, twoD=TRUE, plot=FALSE)
- ts.cwt = totts.cwt[,s0log:(s0log+noctave*nvoice)]
- #Normalization
- sqs <- sqrt(2^(0:(noctave*nvoice)/nvoice)*s0)
- sqres <- sweep(ts.cwt,2,sqs,'*')
- res <- sqres / max(Mod(sqres))
- #TODO: serializer les CWT, les récupérer via getDataInFile ;
- #--> OK, faut juste stocker comme séries simples de taille L*n' (53*17519)
- binarize(c(as.double(Re(res)),as.double(Im(res))), cwt_file, ncol(res), ",", nbytes, endian)
+ ts_cwt = Rwave::cwt(ts, noctave, nvoice, w0=2*pi, twoD=TRUE, plot=FALSE)
+
+ # Serialization
+ binarize(as.matrix(c(as.double(Re(ts_cwt)),as.double(Im(ts_cwt)))), cwt_file, 1,
+ ",", nbytes, endian)