Bug fixes: Take mask into account when making residual 0 mean, unit variance. Add missing sqrt in computation of FWHM