When summing the coefficients, i forgot it was supposed to sum the absolute values... was giving weird results with thresholding, the patch has been updated on my site. -- Edouard Gomez