FUNCTION fwhm2sigma, fwhm ; Description: This function converts a Gaussian FWHM to a Gaussian sigma. The input ; parameter "fwhm" may be a scalar, vector or array. ; ; Input Parameters: ; ; fwhm - FLOAT/DOUBLE SCALAR/VECTOR/ARRAY - The Gaussian FWHM. This parameter ; must be non-negative. ; ; Return Value: ; ; The function returns the sigma of the Gaussian as the same variable type and ; with the same units as the input parameter "fwhm". Where "fwhm" is negative, ; a value of "-1.0" is returned. If the input parameter "fwhm" is a scalar, then ; the return value will be a scalar, and if the input parameter "fwhm" is a vector ; or an array, then the return value will be a vector or an array, respectively. ; If the function fails, then it returns a value of "-1.0". ; ; Author: Dan Bramich (dan.bramich@hotmail.co.uk) ; ; History: ; ; 20/04/2009 - Module expanded to accept vectors and arrays for the input parameter ; (dmb). ; 15/07/2008 - Module created (dmb). ;Check that "fwhm" is of the correct number type ;Convert the Gaussian FWHM to a Gaussian sigma, setting negative values to "-1.0" ;Return the Gaussian sigma value(s)