Syntax
Mout = sw_resconv(M,x,dx,func)
Description
Mout = sw_resconv(M,x,dx,func) convolutes a 2D matrix with a Gaussian
along the first dimension of the matrix. The convolution keeps the
integrated intensity constant. It assumes the x vector
contains the center points of the bins and the distances between the
generated bin edges is calculated by interpolating from the distances
between the given x bin center positions.
Input Arguments
M- Arbitrary matrix with dimensions of .
x- Column vector of coordinates along the first dimension of the matrix.
dx- FWHM value of the Gaussian as a
function of . Either a function handle with a header
fwhm = dx(xVal)or a vector of polynomial coefficients that produces the right standard deviation. In this case in the function the following line will be executedfwhm = polyval(dx,xVal)or a constant FWHM value.The standard deviation of the Gaussian is calculated from the given value using the formula If a general resolution function is provided in the
funcargument, it will be called asy = func(x,[1 x0 fwhm]). In this case thefwhmcan be a row vector and the meaning of the different parameters will depend onfunc. func- Resolution function shape with header
y = func(x,p), wherexis a column vector,pis a row vector of parameters. The meaning of the first 2 elements of the parameter vector are fixed.p(1)integral of the function.p(2)center of mass position of the function.
Optional, default value is
@swfunc.gaussfwhm.
Output Arguments
Mout- Matrix with same dimensions as the input
M.