Move stats to extern
Add sigma_to_fwhm function