inputs are scalars or arrays of the same size Print, 'result = cnb_voigt(x, sigma, gamma)' MODIFIATION HISTORY: October 2010: Written by Chris Beaumont. Scalar or vector OUTPUTS: The voigt profile with the specified sigma, gamma, evaluated at x. Scalar or vector gamma: The width of the Lorentzian part of the profile. sigma: The width of the Gaussian part of the profile. The Voigt function implemented here is a stright convolution of a Gaussian with a Lorentzian. It is a wrapper to the builtin IDL VOIGT routine, which uses a somewhat confusing variable convention. + PURPOSE: This function computes centered Voigt profiles. For even widths, the actual maximum of the array will be slightly less than the MAXIMUM value. If WIDTH is a vector, each element of WIDTH is used to specify the width for each dimension in the Gaussian. If WIDTH is a scalar, the same width is applied for every dimension. WIDTH can be either a scalar or vector value. This value can be used to override the value calculated from Sigma. If neither MAXIMUM nor NORMALIZE is set, the default maximum value will be set to 1.0. This keyword is ignored if MAXIMUM is set. If this keyword is set the peak height is calculated such that the Gaussian sum is 1.0. If neither MAXIMUM or NORMALIZE is set, the default maximum value is set to 1.0. Set this keyword to the maximum value of the resulting array. Set this keyword to force the computations to be done in double-precision arithmetic. Unless the WIDTH keyword is set, the width of the kernel is determined by Sigma such that the kernel contains approximately three standard deviations in each dimension. Each element of Sigma is used to specify the sigma value for each dimension of the result. The number of dimensions in the resulting kernel is equal to the number of elements in Sigma. Sigma can either be a scalar or a vector of up to eight elements. The sigma value used to calculate the Gaussian kernel. Result = GAUSSIAN_FUNCTION( Sigma ) Return Value Create a 2-D Gaussian with a sigma of 1 gauss1 = GAUSSIAN_FUNCTION() Create a 2-D Gaussian with a sigma of 3, a width of 20, and a peak height of 5 gauss2 = GAUSSIAN_FUNCTION(, WIDTH= 20, MAXIMUM= 5) Display the curves s1 = SURFACE(gauss1, LAYOUT=, STYLE= 1) s2 = SURFACE(gauss2, LAYOUT=, STYLE= 1, /CURRENT) Syntax The GAUSSIAN_FUNCTION function creates a Gaussian kernel used in convolution.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
June 2023
Categories |