# Hybrid input-output algorithm

### From Online Dictionary of Crystallography

## 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 [math]\rho^{(n)}[/math] be a trial scattering density in the *n*th iteration cycle. Let [math]\rho'^{(n)}[/math] be a density obtained from [math]\rho^{(n)}[/math] by Fourier-transforming [math]\rho^{(n)}[/math], replacing all Fourier amplitudes by the experimentally observed amplitudes, and applying inverse Fourier transform. Then the density [math]\rho^{(n+1)}[/math] is defined pixel-wise by the following scheme:

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