Typically, $s$ is a continuous field, $d$ a discrete data vector. Particularly, $R$ is not invertible.
Typically, $s$ is a continuous field, $d$ a discrete data vector. Particularly, $R$ is not invertible.
IFT aims at **inverting** the above uninvertible problem in the **best possible way** using Bayesian statistics.
IFT aims at **inverting** the above uninvertible problem in the **best possible way** using Bayesian statistics.
## NIFTy
## NIFTy
NIFTy (Numerical Information Field Theory) is a Python framework in which IFT problems can be tackled easily.
NIFTy (Numerical Information Field Theory) is a Python framework in which IFT problems can be tackled easily.
Main Interfaces:
Main Interfaces:
-**Spaces**: Cartesian, 2-Spheres (Healpix, Gauss-Legendre) and their respective harmonic spaces.
-**Spaces**: Cartesian, 2-Spheres (Healpix, Gauss-Legendre) and their respective harmonic spaces.
-**Fields**: Defined on spaces.
-**Fields**: Defined on spaces.
-**Operators**: Acting on fields.
-**Operators**: Acting on fields.
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
## Wiener Filter: Formulae
## Wiener Filter: Formulae
### Assumptions
### Assumptions
- $d=Rs+n$, $R$ linear operator.
- $d=Rs+n$, $R$ linear operator.
- $\mathcal P (s) = \mathcal G (s,S)$, $\mathcal P (n) = \mathcal G (n,N)$ where $S, N$ are positive definite matrices.
- $\mathcal P (s) = \mathcal G (s,S)$, $\mathcal P (n) = \mathcal G (n,N)$ where $S, N$ are positive definite matrices.
### Posterior
### Posterior
The Posterior is given by:
The Posterior is given by:
$$\mathcal P (s|d) \propto P(s,d) = \mathcal G(d-Rs,N) \,\mathcal G(s,S) \propto \mathcal G (m,D) $$
$$\mathcal P (s|d) \propto P(s,d) = \mathcal G(d-Rs,N) \,\mathcal G(s,S) \propto \mathcal G (s-m,D) $$
where
where
$$\begin{align}
$$\begin{align}
m &= Dj \\
m &= Dj \\
D^{-1}&= (S^{-1} +R^\dagger N^{-1} R )\\
D^{-1}&= (S^{-1} +R^\dagger N^{-1} R )\\
j &= R^\dagger N^{-1} d
j &= R^\dagger N^{-1} d
\end{align}$$
\end{align}$$
Let us implement this in NIFTy!
Let us implement this in NIFTy!
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
## Wiener Filter: Example
## Wiener Filter: Example
- We assume statistical homogeneity and isotropy. Therefore the signal covariance $S$ is diagonal in harmonic space, and is described by a one-dimensional power spectrum, assumed here as $$P(k) = P_0\,\left(1+\left(\frac{k}{k_0}\right)^2\right)^{-\gamma /2},$$
- We assume statistical homogeneity and isotropy. Therefore the signal covariance $S$ is diagonal in harmonic space, and is described by a one-dimensional power spectrum, assumed here as $$P(k) = P_0\,\left(1+\left(\frac{k}{k_0}\right)^2\right)^{-\gamma /2},$$