Slightly improved version of svd_analysis