#' @return A [big.]matrix of size log(L) x n containing contributions in columns
#'
#' @export
-curvesToContribs = function(series, wav_filt, contrib_type)
+curvesToContribs = function(series, wav_filt, contrib_type, coin=FALSE)
{
L = nrow(series)
+ if (coin) browser()
D = ceiling( log2(L) )
nb_sample_points = 2^D
apply(series, 2, function(x) {