# Indirect Fourier transformation

In a Fourier transformation (FT), the Fourier transformed function ${\hat {f}}(s)$ is obtained from $f(t)$ by:
    ${\hat {f}}(s)=\int _{-\infty }^{\infty }f(t)e^{-ist}dt$
where $i$ is defined as $i^{2}=-1$. $f(t)$ can be obtained from ${\hat {f}}(s)$ by inverse FT:
    $f(t)={\frac {1}{2\pi }}\int _{-\infty }^{\infty }{\hat {f}}(s)e^{ist}dt$
$s$ and $t$ are inverse variables, e.g. frequency and time.
Obtaining ${\hat {f}}(s)$ directly requires that $f(t)$ is well known from $t=-\infty$ to $t=\infty$, vice versa. In real experimental data this is rarely the case due to noise and limited measured range, say $f(t)$ is known from $a>-\infty$ to $b<\infty$. Performing a FT on $f(t)$ in the limited range may lead to systematic errors and overfitting.
An indirect Fourier transform (IFT) is a solution to this problem.

## Indirect Fourier transformation in small-angle scattering

In small-angle scattering on single molecules, an intensity $I(\mathbf {r} )$ is measured and is a function of the magnitude of the scattering vector $q=|\mathbf {q} |=4\pi \sin(\theta )/\lambda$, where $2\theta$ is the scattered angle, and $\lambda$ is the wavelength of the incoming and scattered beam (elastic scattering). $q$ has units 1/length. $I(q)$ is related to the so-called pair distance distribution $p(r)$ via Fourier Transformation. $p(r)$ is a (scattering weighted) histogram of distances $r$ between pairs of atoms in the molecule. In one dimensions ($r$ and $q$ are scalars), $I(q)$ and $p(r)$ are related by:
    $I(q)=4\pi n\int _{-\infty }^{\infty }p(r)e^{-iqr\cos(\phi )}dr$
    $p(r)={\frac {1}{2\pi ^{2}n}}\int _{-\infty }^{\infty }{\hat {}qr)^{2}I(q)e^{-iqr\cos(\phi )}dq$
where $\phi$ is the angle between $\mathbf {q}$ and $\mathbf {r}$, and $n$ is the number density of molecules in the measured sample. The sample is orientational averaged (denoted by $\langle ..\rangle$), and the Debye equation can thus be exploited to simplify the relations by
    $\langle e^{-iqr\cos(\phi )}\rangle =\langle e^{iqr\cos(\phi )}\rangle ={\frac {\sin(qr)}{qr}}$
In 1977 Glatter proposed an IFT method to obtain $p(r)$ form $I(q)$, and three years later, Moore introduced an alternative method. Others have later introduced alternative methods for IFT, and automatised the process

## The Glatter method of IFT

This is an brief outline of the method introduced by Otto Glatter. For simplicity, we use $n=1$ in the following.
In indirect Fourier transformation, a guess on the largest distance in the particle $D_{max}$ is given, and an initial distance distribution function $p_{i}(r)$ is expressed as a sum of $N$ cubic spline functions $\phi _{i}(r)$ evenly distributed on the interval (0,$p_{i}(r)$):
where $c_{i}$ are scalar coefficients. The relation between the scattering intensity $I(q)$ and the $p(r)$ is:
Inserting the expression for p$_i$(r) (1) into (2) and using that the transformation from $p(r)$ to $I(q)$ is linear gives:
    $I(q)=4\pi \sum _{i=1}^{N}c_{i}\psi _{i}(q),$
where $\psi _{i}(q)$ is given as:
    $\psi _{i}(q)=\int _{0}^{\infty }\phi _{i}(r){\frac {\sin(qr)}{qr}}{\text{d}}r.$
The $c_{i}$'s are unchanged under the linear Fourier transformation and can be fitted to data, thereby obtaining the coefficients $c_{i}^{fit}$. Inserting these new coefficients into the expression for $p_{i}(r)$ gives a final $p_{f}(r)$. The coefficients $c_{i}^{fit}$ are chosen to minimise the $\chi ^{2}$ of the fit, given by:
    $\chi ^{2}=\sum _{k=1}^{M}{\frac {[I_{experiment}(q_{k})-I_{fit}(q_{k})]^{2}}{\sigma ^{2}(q_{k})}}$
where $M$ is the number of datapoints and $\sigma _{k}$ is the standard deviations on data point $k$. The fitting problem is ill posed and a very oscillating function would give the lowest $\chi ^{2}$ despite being physically unrealistic. Therefore, a smoothness function $S$ is introduced:
    $S=\sum _{i=1}^{N-1}(c_{i+1}-c_{i})^{2}$.
The larger the oscillations, the higher $S$. Instead of minimizing $\chi ^{2}$, the Lagrangian $L=\chi ^{2}+\alpha S$ is minimized, where the Lagrange multiplier $\alpha$ is denoted the smoothness parameter. The method is indirect in the sense that the FT is done in several steps: $p_{i}(r)\rightarrow {\text{fitting}}\rightarrow p_{f}(r)$.