analytical filtering of Gaussian function with tophat
$begingroup$
I have a Gaussian Function -
$$G(a,x) = sqrt{frac{6.0}{pi cdot a^2}}cdot expleft(frac{-6.0x^2}{a^2}right)$$
and I want to filter it with a tophat kernel
$$
f(x,xi) = left{begin{aligned}
&frac{1}{Delta} &&: |x-xi| < frac {Delta}{2}\
&0 &&: |x-xi| ge frac{Delta}{2}
end{aligned}
right.$$
Is it possible to derive an analytical expression for filtered function?
For example if I we wish to filter G with a Gaussian filter
then I can do it analytically.
I hope it is clear enough.If not please let me know.
Thanks in advance
error-function
$endgroup$
add a comment |
$begingroup$
I have a Gaussian Function -
$$G(a,x) = sqrt{frac{6.0}{pi cdot a^2}}cdot expleft(frac{-6.0x^2}{a^2}right)$$
and I want to filter it with a tophat kernel
$$
f(x,xi) = left{begin{aligned}
&frac{1}{Delta} &&: |x-xi| < frac {Delta}{2}\
&0 &&: |x-xi| ge frac{Delta}{2}
end{aligned}
right.$$
Is it possible to derive an analytical expression for filtered function?
For example if I we wish to filter G with a Gaussian filter
then I can do it analytically.
I hope it is clear enough.If not please let me know.
Thanks in advance
error-function
$endgroup$
add a comment |
$begingroup$
I have a Gaussian Function -
$$G(a,x) = sqrt{frac{6.0}{pi cdot a^2}}cdot expleft(frac{-6.0x^2}{a^2}right)$$
and I want to filter it with a tophat kernel
$$
f(x,xi) = left{begin{aligned}
&frac{1}{Delta} &&: |x-xi| < frac {Delta}{2}\
&0 &&: |x-xi| ge frac{Delta}{2}
end{aligned}
right.$$
Is it possible to derive an analytical expression for filtered function?
For example if I we wish to filter G with a Gaussian filter
then I can do it analytically.
I hope it is clear enough.If not please let me know.
Thanks in advance
error-function
$endgroup$
I have a Gaussian Function -
$$G(a,x) = sqrt{frac{6.0}{pi cdot a^2}}cdot expleft(frac{-6.0x^2}{a^2}right)$$
and I want to filter it with a tophat kernel
$$
f(x,xi) = left{begin{aligned}
&frac{1}{Delta} &&: |x-xi| < frac {Delta}{2}\
&0 &&: |x-xi| ge frac{Delta}{2}
end{aligned}
right.$$
Is it possible to derive an analytical expression for filtered function?
For example if I we wish to filter G with a Gaussian filter
then I can do it analytically.
I hope it is clear enough.If not please let me know.
Thanks in advance
error-function
error-function
edited Jun 18 '15 at 14:29
Asaf Karagila♦
306k33438769
306k33438769
asked Sep 12 '13 at 14:47
user94517user94517
12
12
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
Yes, an analytical expression is possible. However, it includes the Gaussian Error Function (erf
), so it may not be simple to calculate (although many numerical programming packages include a fairly accurate/efficient approximation).
The general ingredients:
- Convolution is a linear operation $$A * (B + C) = (A * B) + (A * C)$$
- The tophat kernel is equivalent to the sum of two scaled and translated versions of the Heaviside step function (one right-side-up for the leading edge, the other inverted to get it back to 0)
$$f(x) = frac{H(x + fracdelta2) - H(x - fracdelta2)}delta$$ - Convolution with the Heaviside step function is basically integration $$(f * H) = int_{-infty}^x f(z)dz$$
- The integral of a Gaussian function is a Gauss error function.
So you can split your tophat kernel into two modified Heaviside step functions, and split your convolution as well. Treat each convolution as integration to get your Gaussian Error Functions, and recombine - I expect the end result will be the difference of two GEFs.
$endgroup$
$begingroup$
Is it possible to get the final answer as a Gaussian function? As I want to compare the answer with filtering using Gaussian kernel.
$endgroup$
– user94517
Sep 12 '13 at 16:32
$begingroup$
Only inside an integral, I'm afraid.
$endgroup$
– cloudfeet
Sep 13 '13 at 7:49
$begingroup$
The result of convolving a Gaussian with a tophat is not Gaussian-ish. It is the difference of two Gaussian Error Functions (which is the integral of your Gauss function). I'm afraid the comparison will not be as simple as you hoped.
$endgroup$
– cloudfeet
Sep 13 '13 at 7:50
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f491720%2fanalytical-filtering-of-gaussian-function-with-tophat%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Yes, an analytical expression is possible. However, it includes the Gaussian Error Function (erf
), so it may not be simple to calculate (although many numerical programming packages include a fairly accurate/efficient approximation).
The general ingredients:
- Convolution is a linear operation $$A * (B + C) = (A * B) + (A * C)$$
- The tophat kernel is equivalent to the sum of two scaled and translated versions of the Heaviside step function (one right-side-up for the leading edge, the other inverted to get it back to 0)
$$f(x) = frac{H(x + fracdelta2) - H(x - fracdelta2)}delta$$ - Convolution with the Heaviside step function is basically integration $$(f * H) = int_{-infty}^x f(z)dz$$
- The integral of a Gaussian function is a Gauss error function.
So you can split your tophat kernel into two modified Heaviside step functions, and split your convolution as well. Treat each convolution as integration to get your Gaussian Error Functions, and recombine - I expect the end result will be the difference of two GEFs.
$endgroup$
$begingroup$
Is it possible to get the final answer as a Gaussian function? As I want to compare the answer with filtering using Gaussian kernel.
$endgroup$
– user94517
Sep 12 '13 at 16:32
$begingroup$
Only inside an integral, I'm afraid.
$endgroup$
– cloudfeet
Sep 13 '13 at 7:49
$begingroup$
The result of convolving a Gaussian with a tophat is not Gaussian-ish. It is the difference of two Gaussian Error Functions (which is the integral of your Gauss function). I'm afraid the comparison will not be as simple as you hoped.
$endgroup$
– cloudfeet
Sep 13 '13 at 7:50
add a comment |
$begingroup$
Yes, an analytical expression is possible. However, it includes the Gaussian Error Function (erf
), so it may not be simple to calculate (although many numerical programming packages include a fairly accurate/efficient approximation).
The general ingredients:
- Convolution is a linear operation $$A * (B + C) = (A * B) + (A * C)$$
- The tophat kernel is equivalent to the sum of two scaled and translated versions of the Heaviside step function (one right-side-up for the leading edge, the other inverted to get it back to 0)
$$f(x) = frac{H(x + fracdelta2) - H(x - fracdelta2)}delta$$ - Convolution with the Heaviside step function is basically integration $$(f * H) = int_{-infty}^x f(z)dz$$
- The integral of a Gaussian function is a Gauss error function.
So you can split your tophat kernel into two modified Heaviside step functions, and split your convolution as well. Treat each convolution as integration to get your Gaussian Error Functions, and recombine - I expect the end result will be the difference of two GEFs.
$endgroup$
$begingroup$
Is it possible to get the final answer as a Gaussian function? As I want to compare the answer with filtering using Gaussian kernel.
$endgroup$
– user94517
Sep 12 '13 at 16:32
$begingroup$
Only inside an integral, I'm afraid.
$endgroup$
– cloudfeet
Sep 13 '13 at 7:49
$begingroup$
The result of convolving a Gaussian with a tophat is not Gaussian-ish. It is the difference of two Gaussian Error Functions (which is the integral of your Gauss function). I'm afraid the comparison will not be as simple as you hoped.
$endgroup$
– cloudfeet
Sep 13 '13 at 7:50
add a comment |
$begingroup$
Yes, an analytical expression is possible. However, it includes the Gaussian Error Function (erf
), so it may not be simple to calculate (although many numerical programming packages include a fairly accurate/efficient approximation).
The general ingredients:
- Convolution is a linear operation $$A * (B + C) = (A * B) + (A * C)$$
- The tophat kernel is equivalent to the sum of two scaled and translated versions of the Heaviside step function (one right-side-up for the leading edge, the other inverted to get it back to 0)
$$f(x) = frac{H(x + fracdelta2) - H(x - fracdelta2)}delta$$ - Convolution with the Heaviside step function is basically integration $$(f * H) = int_{-infty}^x f(z)dz$$
- The integral of a Gaussian function is a Gauss error function.
So you can split your tophat kernel into two modified Heaviside step functions, and split your convolution as well. Treat each convolution as integration to get your Gaussian Error Functions, and recombine - I expect the end result will be the difference of two GEFs.
$endgroup$
Yes, an analytical expression is possible. However, it includes the Gaussian Error Function (erf
), so it may not be simple to calculate (although many numerical programming packages include a fairly accurate/efficient approximation).
The general ingredients:
- Convolution is a linear operation $$A * (B + C) = (A * B) + (A * C)$$
- The tophat kernel is equivalent to the sum of two scaled and translated versions of the Heaviside step function (one right-side-up for the leading edge, the other inverted to get it back to 0)
$$f(x) = frac{H(x + fracdelta2) - H(x - fracdelta2)}delta$$ - Convolution with the Heaviside step function is basically integration $$(f * H) = int_{-infty}^x f(z)dz$$
- The integral of a Gaussian function is a Gauss error function.
So you can split your tophat kernel into two modified Heaviside step functions, and split your convolution as well. Treat each convolution as integration to get your Gaussian Error Functions, and recombine - I expect the end result will be the difference of two GEFs.
edited Sep 13 '13 at 9:27
answered Sep 12 '13 at 16:16
cloudfeetcloudfeet
33518
33518
$begingroup$
Is it possible to get the final answer as a Gaussian function? As I want to compare the answer with filtering using Gaussian kernel.
$endgroup$
– user94517
Sep 12 '13 at 16:32
$begingroup$
Only inside an integral, I'm afraid.
$endgroup$
– cloudfeet
Sep 13 '13 at 7:49
$begingroup$
The result of convolving a Gaussian with a tophat is not Gaussian-ish. It is the difference of two Gaussian Error Functions (which is the integral of your Gauss function). I'm afraid the comparison will not be as simple as you hoped.
$endgroup$
– cloudfeet
Sep 13 '13 at 7:50
add a comment |
$begingroup$
Is it possible to get the final answer as a Gaussian function? As I want to compare the answer with filtering using Gaussian kernel.
$endgroup$
– user94517
Sep 12 '13 at 16:32
$begingroup$
Only inside an integral, I'm afraid.
$endgroup$
– cloudfeet
Sep 13 '13 at 7:49
$begingroup$
The result of convolving a Gaussian with a tophat is not Gaussian-ish. It is the difference of two Gaussian Error Functions (which is the integral of your Gauss function). I'm afraid the comparison will not be as simple as you hoped.
$endgroup$
– cloudfeet
Sep 13 '13 at 7:50
$begingroup$
Is it possible to get the final answer as a Gaussian function? As I want to compare the answer with filtering using Gaussian kernel.
$endgroup$
– user94517
Sep 12 '13 at 16:32
$begingroup$
Is it possible to get the final answer as a Gaussian function? As I want to compare the answer with filtering using Gaussian kernel.
$endgroup$
– user94517
Sep 12 '13 at 16:32
$begingroup$
Only inside an integral, I'm afraid.
$endgroup$
– cloudfeet
Sep 13 '13 at 7:49
$begingroup$
Only inside an integral, I'm afraid.
$endgroup$
– cloudfeet
Sep 13 '13 at 7:49
$begingroup$
The result of convolving a Gaussian with a tophat is not Gaussian-ish. It is the difference of two Gaussian Error Functions (which is the integral of your Gauss function). I'm afraid the comparison will not be as simple as you hoped.
$endgroup$
– cloudfeet
Sep 13 '13 at 7:50
$begingroup$
The result of convolving a Gaussian with a tophat is not Gaussian-ish. It is the difference of two Gaussian Error Functions (which is the integral of your Gauss function). I'm afraid the comparison will not be as simple as you hoped.
$endgroup$
– cloudfeet
Sep 13 '13 at 7:50
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f491720%2fanalytical-filtering-of-gaussian-function-with-tophat%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown