Simple constraint for phase retrieval with high efficiency.
I propose the use of a simple real space constraint for iterative phase retrieval intended for diffractive imaging. The proposed constraint is a single parameter equal to the number of nonzero pixels in the image. This greatly simplifies the procedure to determine the constraint. A series of algorithms using this constraint can be easily deduced from existing algorithms, such as hybrid-input-output and difference map algorithms. The high efficiency of these algorithms is largely preserved, as confirmed by numerical studies. A concept widely used in control system theory, proportional-integral-derivative control, is shown to increase the execution speed of the proposed constraint significantly.