# Hybrid input-output algorithm

## Definition

An algorithm proposed by R. Fienup in 1982. The original application of the algorithm was the phase retrieval of diffraction patterns of non-periodic objects. However, the algorithm or its components have been used several times also in crystallography.

Let $\rho^{(n)}$ be a trial scattering density in the nth iteration cycle. Let $\rho'^{(n)}$ be a density obtained from $\rho^{(n)}$ by Fourier-transforming $\rho^{(n)}$, replacing all Fourier amplitudes by the experimentally observed amplitudes, and applying inverse Fourier transform. Then the density $\rho^{(n+1)}$ is defined pixel-wise by the following scheme:

In crystallography, the support is usually not known $\textit{a~priori}$, and a dynamical support must be used, $\textit{i.e.}$ the support is newly defined in each iteration cycle based on a predefined criterion.