Skip to content

Latest commit

 

History

History
72 lines (51 loc) · 2.14 KB

Convolution.rst

File metadata and controls

72 lines (51 loc) · 2.14 KB

Convolution

.. index:: Convolution

Description

Convolution is an extension of :ref:`func-CompositeFunction` which performs convolution of its members using either the Fast Fourier Transform (symmetric domain) or the direct formula (asymmetric domain).

f(x)=\int\limits_{A}^{B}R(x-\xi)F(\xi)\mbox{d}\xi

Here R is the first member function and F is the second member. A Convolution must have exactly two member functions. The members can be composite if necessary. Interval [A,B] is the fitting interval.

FFT mode

if |A| similar to |B|, the function is evaluated by first transforming R and F to the Fourier domain, multiplying the transforms, then transforming back to the original domain. The GSL FFT routines are used to do the actual transformations.

It should be noted that the two functions (R and F) are evaluated on different intervals. F is computed on [A,B] while R is computed on [-\Delta/2, \Delta/2], where \Delta=B-A.

In the following example a :ref:`func-Convolution` is convolved with a box function:

Convolution.png

Note that the box function is defined on interval [-5, 5]:

Box.png

Direct mode

If |A| and |B| differ, the convolution is performed with the direct formula. F is computed on [A-B,B-A] and R is computed on [A,B]. This setting guarantees that F overlaps completely R in the domain [A,B] when performing the convolution.

In the following example a QENS signal is fitted to a two-Lorentzian model, convolved with the experimental resolution, in the asymmetric energy range [A,B]=[-0.12, 0.52].

ConvolutionAsymmetric.png
.. attributes::

.. properties::

.. categories::

.. sourcelink::
   :h: Framework/CurveFitting/inc/MantidCurveFitting/Functions/Convolution.h
   :cpp: Framework/CurveFitting/src/Functions/Convolution.cpp