  In this work we develop an algorithm for signal reconstruction from the
magnitude of its Fourier transform in a situation where some (non-zero) parts
of the sought signal are known. Although our method does not assume that the
known part comprises the boundary of the sought signal, this is often the case
in microscopy: a specimen is placed inside a known mask, which can be thought
of as a known light source that surrounds the unknown signal. Therefore, in the
past, several algorithms were suggested that solve the phase retrieval problem
assuming known boundary values. Unlike our method, these methods do rely on the
fact that the known part is on the boundary. Besides the reconstruction method
we give an explanation of the phenomena observed in previous work: the
reconstruction is much faster when there is more energy concentrated in the
known part. Quite surprisingly, this can be explained using our previous
results on phase retrieval with approximately known Fourier phase.
