Added mode calculation to FWHM determination