Gerchberg–Saxton algorithm: Difference between revisions

Content deleted Content added
D6 (talk | contribs)
m fmt headline levels (to start with "==", WP Check Wikipedia check #7
OAbot (talk | contribs)
m Open access bot: url-access updated in citation with #oabot.
 
(45 intermediate revisions by 32 users not shown)
Line 1:
{{Short description|Algorithm for phase retrieval}}
[[Image:GS-diagram.png|thumb|360px|The Gerchberg-Saxton Algortithm]]
[[ImageFile:SmilieGerchberg-photographSaxton algorithm.jpg|thumb|A projection from a400px|The Gerchberg-Saxton hologramalgorithm. FT is Fourier transform.]]
The '''Gerchberg–Saxton (GS) algorithm''' is an iterative [[phase retrieval]] [[algorithm]] for retrieving the phase of a complex-valued wavefront from two intensity measurements acquired in two different planes.<ref>{{Cite journal|last=Gerchberg|first=R. W.|last2=Saxton|first2=W. O.|date=1972|title=A practical algorithm for the determination of the phase from image and diffraction plane pictures|url=http://www.u.arizona.edu/~ppoon/GerchbergandSaxton1972.pdf|archive-url=https://web.archive.org/web/20160328053000/http://www.u.arizona.edu/~ppoon/GerchbergandSaxton1972.pdf|url-status=dead|archive-date=March 28, 2016|journal=Optik|language=EN|volume=35|pages=237–246}}</ref> Typically, the two planes are the image plane and the far field (diffraction) plane, and the wavefront propagation between these two planes is given by the [[Fourier transform]]. The original paper by Gerchberg and Saxton considered image and diffraction pattern of a sample acquired in an electron microscope.
 
It is often necessary to know only the phase distribution from one of the planes, since the phase distribution on the other plane can be obtained by performing a Fourier transform on the plane whose phase is known. Although often used for two-dimensional signals, the GS algorithm is also valid for one-dimensional signals.
The '''Gerchberg-Saxton (GS) algorithm''' is an iterative [[algorithm]] for retrieving the phase of a pair of light distributions (or any other mathematically valid distribution) related via a propagating function, such as the [[Fourier transform]], if their intensities at their respective optical planes are known.
 
ItThe is[[pseudocode]] oftenbelow necessary to know onlyperforms the phaseGS distributionalgorithm fromto oneobtain of the planes, since thea phase distribution onfor the other plane can"Source", besuch obtainedthat by performing aits Fourier transform onwould have the planeamplitude whosedistribution phase is known. Although often used for two-dimensional signals,of the GS algorithm is also valid for one-dimensionalplane signals"Target".
 
The Gerchberg-Saxton algorithm is one of the most prevalent methods used to create [[computer-generated hologram]]s.<ref>{{Cite journal |last=Memmolo |first=Pasquale |last2=Miccio |first2=Lisa |last3=Merola |first3=Francesco |last4=Paciello |first4=Antonio |last5=Embrione |first5=Valerio |last6=Fusco |first6=Sabato |last7=Ferraro |first7=Pietro |last8=Antonio Netti |first8=Paolo |date=2014-01-01 |title=Investigation on specific solutions of Gerchberg–Saxton algorithm |url=https://www.sciencedirect.com/science/article/pii/S0143816613001942 |journal=Optics and Lasers in Engineering |volume=52 |pages=206–211 |doi=10.1016/j.optlaseng.2013.06.008 |issn=0143-8166|url-access=subscription }}</ref>
The paper by R. W. Gerchberg and W. O. Saxton on this algorithm is entitled “A practical algorithm for the determination of the phase from image and diffraction plane pictures,” and was published in ''Optik'' (35, 237–246 1972).
 
==Pseudo-codePseudocode algorithm==
The [[Pseudo-code]] below performs the GS algorithm to obtain a phase distribution for the plane, Source, such that its Fourier transform would have the amplitude distribution of the plane, Target.
 
==Pseudo-code algorithm==
 
'''Let:'''
FT - Forwardforward Fourier Transformtransform
IFT - Inverseinverse Fourier Transformtransform
''i'' - the imaginary numberunit, sqrt(-√&minus;1) (square root of -&minus;1)
exp - exponential function (exp(x) = ''e^''<sup>''x''</sup>)
Target and Source be the Target and Source Amplitude planes respectively
A, B, C & D be complex planes with the same dimension as Target and Source
Amplitude – Amplitude- Amplitde extracting function:
ege.g. for complex ''z'' = ''x'' + ''iy'', Amplitudeamplitude(''z'') = sqrt(''x*''·''x'' + ''y*''·''y'')
for real ''x'', Amplitudeamplitude(''x'') = |''x''|
Phase - Phase extracting function:
ege.g. Phase(z) = arctan(y / x)
'''end Let'''
'''Gerchberg–Saxton Algorithmalgorithm''' Gerchberg–Saxton(Source, Target, Retrieved_Phase) '''is'''
A := IFT(Target)
'''while''' error criterion is not satifiedsatisfied
B := Amplitude(Source) *× exp(i* × Phase(A))
C := FT(B)
D := Amplitude(Target) *× exp(i* × Phase(C))
A := IFT(D)
'''end while'''
Retrieved_Phase = Phase(A)
 
This is just one of the many ways to implement the GS algorithm. Aside from optimizations, others may start by performing a forward Fourier Transformtransform to the source distribution.
'''Gerchberg–Saxton Algorithm'''(Source, Target, Retrieved_Phase)
A = IFT(Target)
'''while''' error criterion is not satified
B = Amplitude(Source) * exp(i*Phase(A))
C = FT(B)
D = Amplitude(Target) * exp(i*Phase(C))
A = IFT(D)
'''end while'''
Retrieved_Phase = Phase(A)
'''end Gerchberg–Saxton Algorithm'''
 
This is just one of the many ways to implement the GS algorithm. Aside from optimizations, others may start by performing a forward Fourier Transform to the source distribution.
 
==See also==
* [[Phase retrieval]]
* [[Fourier optics]]
* [[Holography]]
Line 45 ⟶ 44:
 
==References==
{{reflist}}
# R. W. Gerchberg and W. O. Saxton, “A practical algorithm for the determination of the phase from image and diffraction plane pictures,” Optik 35, 237 (1972)
# ''Smilie Face Hologram - K. Ardnt, C. Byers, G. Donald, S. McKernan, C. Wilson; University of Glasgow, (2006)
 
==External links==
* Dr W. Owen Saxton's pages [http://www-hrem.msm.cam.ac.uk/people/saxton/] {{Webarchive|url=https://web.archive.org/web/20080613024950/http://www-hrem.msm.cam.ac.uk/people/saxton/ |date=2008-06-13 }}, [https://www.murrayedwards.cam.ac.uk/fellows/dr-w-owen-saxton]
* [http://www.ysbl.york.ac.uk/~cowtan/fourier/coeff.html Graphical explanatory material by Kevin Cowtan]
*[http://www-hrem.msm.cam.ac.uk/people/saxton/ Dr W. Owen Saxton's page]
* [http://www.optics.rochester.edu/workgroups/fienup/index.html Applications and publications on phase retrieval from the University of Rochester, Institute of Optics]
* [https://www.creatgraphy.com/05/2020/allgemein/lightmodulation-gerchberg-saxton-algorithmus-gsa-660/ A Python-Script of the GS by Dominik Doellerer]
 
* MATLAB GS algorithms [https://ch.mathworks.com/matlabcentral/fileexchange/68647-gerchberg-saxton-phase-retrieval-algorithm/], [https://ch.mathworks.com/matlabcentral/fileexchange/65979-gerchberg-saxton-algorithm]
{{DEFAULTSORT:Gerchberg-Saxton algorithm}}
[[Category:Digital signal processing]]
[[Category:Physical optics]]