- #1
wil3
- 179
- 1
Hello. In a software application I am attempting to smooth a data set by convoluting it with a discrete Gaussian kernel. Based upon information garnered online, I've been using this Mathematica command to generate the kernel:
kern = Table[Exp[-k^2/100]/Sqrt[2. Pi], {k, -range, range}];
where range is a user-specified parameter. For non-Mathematica speakers, my kernel is:
[tex]
\dfrac{e^{-k^2/100}}{\sqrt{2 \pi}}
\qquad
\forall \; k \; \in \{-\text{range}, \text{range}\}; k \in \mathbb{Z}
[/tex]
What is the correct relation of the parameter "range" in this kernel to the standard deviation of a continuous Gaussian function? I'm aware that a large range correlates to a larger standard deviation Gaussian over which the data is sampled, but I would like to know the precise relation. I can't seem to figure it out because the Gaussian and the discrete kernel seem to have slightly different forms.
Application: I have spectroscopic data, and I have been finding that certain "range" values yield the best-fit smoothing. I am curious whether this is related to the standard deviations of the continuous Gaussian functions that comprise the spectra that I am smoothing.
Thanks very much.
kern = Table[Exp[-k^2/100]/Sqrt[2. Pi], {k, -range, range}];
where range is a user-specified parameter. For non-Mathematica speakers, my kernel is:
[tex]
\dfrac{e^{-k^2/100}}{\sqrt{2 \pi}}
\qquad
\forall \; k \; \in \{-\text{range}, \text{range}\}; k \in \mathbb{Z}
[/tex]
What is the correct relation of the parameter "range" in this kernel to the standard deviation of a continuous Gaussian function? I'm aware that a large range correlates to a larger standard deviation Gaussian over which the data is sampled, but I would like to know the precise relation. I can't seem to figure it out because the Gaussian and the discrete kernel seem to have slightly different forms.
Application: I have spectroscopic data, and I have been finding that certain "range" values yield the best-fit smoothing. I am curious whether this is related to the standard deviations of the continuous Gaussian functions that comprise the spectra that I am smoothing.
Thanks very much.
Last edited: