Swap order of arguments for fwhm and stddev, and do more error checking for input paramters