\documentclass[12pt]{amsart}

\input{latex_preamble.tex}
%\usepackage{showkeys}

\nwc{\cle}{\preccurlyeq}

\nwc{\lb}{\llbracket}
\nwc{\rb}{\rrbracket}
\nwc{\modpi}{{{\rm mod}\,2\pi}}
\nwc{\tphi}{{{\phi}_0}}

\begin{document}
 \title{
%Partially Blind Ptychography: Uniqueness Theorems
Blind Ptychography: Uniqueness \& Ambiguities %(Counter)Examples
}
\centerline{\red\tt arXiv:1806.02674}
 
\author{Albert Fannjiang 
 \address{
Department of Mathematics, University of California, Davis, California  95616, USA. Email:  {\tt fannjiang@math.ucdavis.edu}
} \and Pengwen Chen
\address{ Applied Mathematics, National Chung Hsing University, Taichung 402, Taiwan. Email: {\tt pengwen@nchu.edu.tw}}
}

\maketitle 

\begin{abstract} Ptychography with an unknown mask and object is analyzed for general ptychographic schemes
that allow the object parts to be strongly connected and admits an anchoring object part. 

Under a mild mask phase constraint,
it is proved that the masked object estimate must be the product of a block phase factor
and the true masked object. Hence blind ptychographic ambiguities in general manifest in the undetermined block phases that can vary from block to block arbitrarily. This is the local uniqueness. 

The global uniqueness is proved  for the mixing schemes that the block phases have an affine profile and
that the object and mask can be simultaneously recovered up to a constant scaling factor and
an affine phase factor. 


\end{abstract}

%\begin{keywords} Ptychography, phase retrieval, affine phase ambiguity, uniqueness.
%\end{keywords}
% \begin{AMS}49K35, 05C70,  90C08\end{AMS}


\section{Introduction}

  \begin{figure}[t]
\begin{center}
%\subfigure[TCB]{
\includegraphics[width=10cm]{ptycho1}
%}\hspace{-0.6cm}
\caption{Simplified ptychographic setup showing a Cartesian grid used for the overlapping raster scan positions \cite{parallel}.
}
\label{fig0}
\end{center}
\end{figure}


Ptychography is the scanning version of coherent diffractive imaging (CDI) \cite{CDI} that 
acquires  multiple diffraction patterns through the scan of a localized illumination on an extended object (Fig. \ref{fig0}). The redundant information in the overlap between adjacent illuminated spots is then exploited  to improve phase retrieval methods  \cite{Pfeiffer,Nugent,Rod08}. Ptychography originated in electron microscopy \cite{Hoppe1, Hoppe2, EM0, EM1,EM2,EM-ptych1,EM-ptych2} and has been successfully  implemented with X-ray, optical  and terahertz waves  \cite{ PIE104,PIE204,DM08, probe09, ptycho10,terahz,FROG}.   
Recently ptychography  has been extended to the Fourier domain \cite{FPM13, Yang14}.  In Fourier ptychography,  illumination angles are scanned sequentially with a programmable array source with the diffraction pattern measured at each angle.  


Ptychographic CDI has its origin in a concept developed to solve the crystallographic phase problem: Hoppe \cite{Hoppe1} pointed out that if one can make the Bragg peaks of crystalline diffraction patterns interfere, information about their relative phases can be obtained and therefore suggested to use a localized illumination instead of the usual extended plane wave. 
Due to the Fourier convolution theorem, the crystal's diffraction peaks in the resulting far-field pattern are then convolved with the Fourier transform of the localized illumination. When the extent of the illumination is shrunk to about the same order of magnitude as the crystalline unit cell, this leads to overlap between adjacent Bragg peaks and thus the desired interferences. While these interferences already allow to determine the relative phases, the twin-image ambiguity remains. Hoppe \cite{Hoppe1} showed that an unambiguous result can be obtained by recording another diffraction pattern at a slightly shifted position of the localized illumination.  Hoppe \cite{Hoppe2} discussed the extension of ptychography to non-periodic objects and
 the possibility of scanning transmission electron diffraction microscopy. 
 
  An important development in ptychography since the work of Thibault {\em et al.}  \cite{DM08,probe09} is the potential of simultaneous 
recovery of the object and the illumination (blind ptychography).
Blind ptychographic reconstruction  is affected by many factors such as
the type of illumination and  the amount of overlap between adjacent illuminations. In practice, the adjacent illuminated areas have an  overlap ratio of at least 50\%, typically 
60-70\% in each direction \cite{overlap,ePIE09}. 
The convergence of numerical reconstruction  is monitored with the residual of the ptychographic data or the difference between successive estimates  \cite{ePIE09, DM08,Fie08,ML12,Waller15, Hesse}. Even in the noiseless case, numerical convergence does not necessarily 
imply recovery of the mask and the object.  


To ensure that a vanishing residual (data fitting) implies a vanishing reconstruction error in the noiseless case, we need a theory of uniqueness of solution.  To the best of our knowledge, no theory of uniqueness is currently available for  blind ptychography. 

 To be sure, a completely blind ptychography or phase retrieval is untenable. 

To begin with,  even with a complete prior information of the mask/illumination, we have  shown in a recent work \cite{ptych-unique}   that twin-image ambiguity 
does arise if  the Fresnel number of the commonly used Fresnel illumination takes on certain values, resulting in poor
reconstruction and hinting on
the benefits of avoiding symmetry and increasing complexity of the mask.  

A simple way to avoid symmetry and increase complexity is to use a random mask.  Random masking is  a form of coded aperture and  has found applications in many imaging modalities and significant improvements
on imaging qualities  \cite{AH, Alm, BWW, rand, rpi, meta1, meta3,ptycho-rpi, random-aperture, diffuser, RCM, random-coding, meta2, Spread, Fucai1,Fucai2,Horisaki1,Horisaki2}. 



For standard nonptychographic phase retrieval, the capability of a randomly coded aperture in removing all the ambiguities, including the translation and twin-image ambiguities, was rigorously analyzed in \cite{unique}.  
Moreover,  uniqueness theory for blind phase retrieval with a plain and a randomly coded diffraction pattern has been
developed in \cite{pum} which  assumes slight prior knowledge
about the phase range of the random mask. In other words, with  a plain and a randomly coded
diffraction pattern one can uniquely and simultaneously determine both the unknown object and the unknown mask. 
In contrast, in blind ptychography we work with just one unknown mask which is more challenging. 
As random masks are typically harder to calibrate (but easier to fabricate) than a deterministic mask, blind ptychography and phase retrieval is of particular interest when a random mask is used. 


Another well known problem in blind ptychography since the early days is that
blind ptychography with the raster scan (Fig. \ref{fig0})  is susceptible to periodic artifacts attributed  to the regularity and symmetry of the scan positions  \cite{probe09}.  


This paper concerns the uniqueness question for blind ptychography with a randomly phased mask or illumination. 
Even with a random mask, our uniqueness theory requires certain object and mask prior
constraints. We exhibit examples to show these priors are in some sense necessary. 
Moreover, we aim to characterize a general class of measurement schemes that avoid the pitfalls of the raster scan. 

\subsection{Set-up and contributions}

Briefly and informally, we summarize our results as follows.
 Let the initial mask domain $\cM^0:=\IZ_m^2=\{(k,l): k,l=0,\cdots, m-1\}$ be the support of the mask function $\mu^0$.  Let $\cT$ be the set of all shifts, including $(0,0)$,  involved  in the ptychographic measurement. 

 
 Denote by $\mu^\bt$ the $\bt$-shifted mask for all $\bt\in \cT$ and $\cM^\bt$ the domain of
$\mu^\bt$. Let $\cM:=\cup_{\bt\in \cT}\cM^\bt$.   Let $f^\bt$ the object restricted to $\cM^\bt$ and  $\mb{\rm Twin}(f^\bt)$ the twin image of $f^\bt$ in $\cM^\bt$. 
We can write $f=\vee_\bt f^\bt\subseteq\cM$ and refer to each $f^\bt$ as a part of $f$. In ptychography, the original object is broken up into a set of overlapping object parts, each of which produces a coded diffraction pattern (coded by $\mu^\bt$).  
\commentout{%10/20/2018
To define the diffraction patterns from the boundary blocks we consider two types of boundary condition: the periodic boundary condition and the Dirichlet boundary condition. For the former, $\IZ^2_n$ is treated as a discrete torus where the boundary blocks wrap around the torus or equivalently the object is periodically extended to $\IZ^2$;
for the latter, the object is extended beyond $\IZ_n^2$ by given known  values which together with the original object $f$ produce the diffraction patterns coded by $\mu^\bt$ from  the boundary blocks $\cM^\bt$.  
}


The totality of the $\bt$-labelled coded diffraction patterns is called the ptychographic measurement data in this paper.  Let $\nu^0$ (with $\bt=(0,0)$) and $g=\vee_\bt g^\bt$ be any pair
 of the mask and the object estimates producing  the same ptychography data as $\mu^0$ and $f$, i.e.
 the diffraction pattern of $\nu^\bt\odot g^\bt$ is identical to that of $\mu^\bt\odot f^\bt$ where
 $\nu^\bt$ is the $\bt$-shift of $\nu^0$ and $g^\bt$ is the restriction of $g$ to $\cM^\bt$. 
 For convenience, $\mu^\bt, f^\bt,\nu^\bt, g^\bt $ assume the value zero outside of $\cM^\bt$. 


The first basic requirement of our method is the strong connectivity property of the object with respect to the measurement scheme. 
It is useful to think of connectivity in graph-theoretical terms: Let the ptychographic experiment be represented by
a complete graph $\Gamma$ whose notes correspond to $\{f^\bt:\bt\in \cT\}$. An edge between two nodes  corresponding to $f^\bt$ and $f^{\bt'}$ is $s$-connective if 
\beq
\label{r100}
%\red{What about $f^{\bt'}$?}
|\cM^\bt\cap \cM^{\bt'}\cap\supp(f)|\ge s. 
\eeq
A $s$-connective reduced graph $\Gamma_s$ of $\Gamma$ consists
of all the nodes of $\Gamma$ but only the $s$-connective edges.  Two nodes are adjacent (and neighbors) in $\Gamma_s$ iff they are $s$-connected. A chain in $\Gamma_s$ is a sequence of nodes  such that 
two successive nodes are adjacent. In a simple chain all the nodes are distinct. Then the object parts $\{ f^\bt:\bt\in \cT\}$ are  $s$-connected if and only if $\Gamma_s$ is a connected graph, i.e. every two nodes is connected by a chain of $s$-connective edges. An object is said to be strongly connected w.r.t. the ptychographic scheme if $s\gg 1$. 


The second requirement is the existence of an {\em anchoring} part. Any part $f^\bt$ is an anchor if and only if it satisfies the object support constraint (OSC). A sufficient, and sometimes over-constraining, condition for OSC
is that $f^\bt$ has a tight box hull in $\cM^\bt$, i.e. $\mb{\rm Box}[\supp(f^\bt)]=\cM^\bt$ 
where $\mb{\rm Box}[E]$ stands for the box hull and  is the smallest
rectangle containing $E$ with sides parallel to $(1,0)$ or $(0,1)$. 
Indeed, much less often suffices to be an anchor (see Section \ref{sec:two} for definition). 
In the case of an object $f$ with $\supp(f)=\cM$, OSC is automatically satisfied and  \eqref{r100} becomes
$|\cM^\bt\cap \cM^{\bt'}|\ge s$. The anchoring assumption is crucial for  uniqueness theory of blind ptychography (Example \ref{ex3.1}). 


For the unknown mask,  we need a slight prior information called the mask phase constraint (MPC):  
 \begin{quote}\em 
Suppose that $\mu^0(\bn)$  are independently and continuously distributed nonvanishing random variables and 
that the mask estimate $\nu^0$ satisfies
$\Re(\bar \nu^0\odot \mu^0)>0$ at every pixel (where $\odot$ denotes the component-wise product and the bar denotes the complex conjugate). 
 \end{quote}

 With any strongly connective scheme with an anchor and a mask under MPC, 
we can prove the local uniqueness property for
blind ptychography  (Theorem \ref{thm:u} and \ref{thm:many}):  With high probability (exponentially close to 1 in $s$)  in  the selection of the random
mask $\mu^0$, we have 
\beq
\label{7.1}
\nu^{\bt}\odot g^\bt=e^{\im\theta_{\bt}}\mu^{\bt}\odot f^\bt,\quad \bt\in \cT, 
\eeq
for some constants $\theta_\bt\in \IR$ (called block phases)
 if $g$ and $\nu^\bt$ produce the same diffraction pattern as $f$ and $\mu^\bt$ for all $\bt\in \cT$. 
MPC is in some sense a necessary assumption for \eqref{7.1} (Example \ref{ex0}).
 
 Eq. \eqref{7.1} is referred to as the local uniqueness property as it does not uniquely determine
 the masked object $\{\nu^\bt \odot g^\bt\}$ as a whole (up to a constant phase factor) since $\theta_\bt$
 can depend on $\bt$ (called phase drift).  
Indeed, a basic ambiguity inherent to  blind ptyhography exhibits the form \eqref{7.1} with
an affine  phase factor, meaning that \eqref{7.1} with a variable block phase is the best to hope for. 
 
{\bf Affine phase ambiguity.}
For any $\bw\in \IZ^2, a,b\in \IR$, let  \beq
\label{lp1}
\nu^0(\bn)&=&\mu^0(\bn) \exp(-\im a-\im \bw\cdot\bn),\quad\bn\in\cM^0\\
\label{lp2} g(\bn)&=& f(\bn) \exp(\im b+\im \bw\cdot\bn),\quad\forall\bn\in \cM.
\eeq
For any $\bt$, we have the following
calculation
\beqn
\nu^\bt(\bn)&=&\nu^0(\bn-\bt)\\
&=&\mu^0(\bn-\bt) \exp(-\im \bw\cdot(\bn-\bt))\exp(-\im a)\\
&=&\mu^\bt(\bn) \exp(-\im \bw\cdot(\bn-\bt))\exp(-\im a).
\eeqn
Since, by the above calculation, 
\beq
\label{drift2}
\nu^\bt(\bn) g^\bt(\bn)&=&\mu^\bt(\bn)f^\bt(\bn) \exp(\im \bw\cdot\bt)\exp(\im(b-a)),\quad \forall\bt\in \cT, \bn\in \cM^\bt, 
\eeq
$g^\bt$ and $\nu^\bt$ produce the same diffraction pattern as $f^\bt$ and $\mu^\bt$ for all $\bt$. 

In addition to the affine phase ambiguity \eqref{lp1}-\eqref{lp2}, another ambiguity,  a scaling constant factor ($g=c f, \nu^0=c^{-1} \mu^0, c>0$),
is also inherent to any blind ptychography as can easily be checked. 

A crucial question then is, Under what conditions are the scaling factor and the affine phase ambiguity 
the only ambiguities in blind ptychography? We show that there are no other ambiguities in blind ptychography with the mixing schemes, introduced here for the first time (Theorem \ref{thm:mix} and Corollary \ref{cor:mix}). The mixing schemes are defined by a set of generic conditions which should hold true for
random perturbations of the raster scan (see Section \ref{sec:blind}). 
 We also  show  that the block phases of the mixing schemes  
must have an affine profile (Theorem \ref{thm:mix} and Corollary \ref{cor:mix}). 
\commentout{%09/19/2018
But there are many more ambiguities inherent to  the lattice scheme of a constant stepsize $\tau$.
First, the affine block phase makes positive and negative imprints on the object and mask estimates, respectively,
creating a non-periodic ambiguity. 
Second, there are $\tau$-periodic ambiguities of $\tau^2$ degrees of freedom, called the raster grid pathology.
 The larger the stepsize the (much) greater the degrees of ambiguity which can not be removed without
extra prior information. 
}


The rest of the paper is organized as follows.
In Section \ref{sec:ptych}, we formulate the basic building block of the
ptychographic measurement and  discuss ambiguities in standard phase retrieval
with one coded diffraction pattern. 
 In Section \ref{sec:two} we consider the ptychography with two overlapping diffraction patterns and 
prove the local uniqueness for the masked object (Theorem \ref{thm:u} and Corollary \ref{thm:u0}).  In Section \ref{sec:multi} we extend the local uniqueness to the multi-part ptychography (Theorem \ref{thm:many}).
 In Section \ref{sec:blind}, we introduce the mixing schemes and show that the mixing property forces the block phases
to have  an affine profile (Theorem \ref{thm:mix} and  Corollary \ref{cor:mix}) which in turn determines the mask and object estimates up to a scaling constant and an affine phase factor (Corollary \ref{cor:blind2}). 
\commentout{%09/19/2018 
In Section \ref{sec:drift} we prove that the block phases for the lattice scheme form
 an arithmetic progression along any cyclic group  (Theorem \ref{lem2}).   In Section \ref{sec:recovery}
we show that for the lattice scheme with a constant stepsize 
blind ptychography is possible 
under  an additional $\tau\times\tau$ prior information if the phase drift is absent (Theorem \ref{thm:recovery}).
 In Section \ref{sec:u2}, we show  that the phase drift is
 absent for sufficiently large masks (Theorem \ref{thm:u2}). 
 }  We conclude in Section \ref{sec:con}. 
 % and give the details of the lattice scheme in Appendix \ref{sec:lattice}.




\section{Coded diffraction pattern}\label{sec:ptych}

We start with discussing the setting of a coded diffraction pattern. An important feature is the higher sampling rate compared to crystallography, coined the oversampling method \cite{Miao}. 

Let $f^0$ be a part of  the unknown object $f$ restricted to the initial block $\cM^0=\IZ^2_m, m<n,$ and let the Fourier transform of $f^0$ be written as 
\[
F(e^{-\im 2\pi\bw})=\sum_{\bk\in \cM^0} e^{-\im 2\pi \bk\cdot\bw} f^0(\bk),\quad \bw=(w_1,w_2). 
\]

Under the Fraunhofer 
approximation, the diffraction pattern  can be written as  \beq
|F(e^{-\im 2\pi\bw})|^2= \sum_{\bk \in \widetilde\cM^0}\lt\{\sum_{\bk'\in \cM^0} f^0(\bk'+\bk)\overline{f^0(\bk')}\rt\}
   e^{-\im 2\pi \bk\cdot \bom},\quad \bom\in [0,1]^2\label{auto}
   \eeq
   where
    \begin{equation*}
 \widetilde \cM^0 = \{ (k_1,k_2)\in \IZ^2: -m+1\le k_1 \le m-1, -m+1\le k_2\leq m-1 \} 
 \end{equation*}
 and $f^0$ assumes the value zero  outside of
 $\cM^0$. 
 Here and below the over-line notation means
complex conjugacy. 

The expression in the brackets  in \eqref{auto} is the autocorrelation function of $f^0$ and
the summation over $\bn$ takes the form of Fourier transform on  the enlarged  grid $\widetilde\cM^0$.
Hence sampling $|F|^2$ 
 on the grid 
\beq\label{L}
\cL = \Big\{(w_1,w_2)\ | \ w_j = 0,\frac{1}{2 m-1},\frac{2}{2m-1},\cdots,\frac{2m-2}{2m-1}\Big\}
\eeq
provides sufficient information to recover the autocorrelation function.

\commentout{%09/21/2018
Let $\Phi^0: \IC^{|\cM^0|}\to \IC^{|\cL|}$ be the {over-sampled} discrete Fourier transform (ODFT) defined on $\cM^0$. Specifically  $\Phi^0 \in \IC^{|\cL|, |\cM^0|}$ is the sub-column matrix of
the standard DFT on  the extended grid $\widetilde\cM^0$.   We can write $F(e^{-\im 2\pi\bw})=(\Phi^0 f^0)(\bw)$ for all $\bw\in \cL$. 
}

A randomly coded diffraction pattern measured with the mask $\mu^0$ is 
the diffraction pattern for 
the  {\em masked object} $
\tilde f^0(\bn) =f^0(\bn) \mu^0(\bn)$ 
where the mask function $\mu^0$ is a finite array of random variables.   
The masked object is also called the {\em exit wave} in the parlance of optics literature. 
In other words, a coded diffraction pattern is just the plain diffraction pattern of
a masked object. 

We assume  {randomness} in the phases $\theta$ of the mask function 
$
\mu^0(\bn)=|\mu^0|(\bn)e^{\im \theta(\bn)}
$
where  $\theta(\bn)$ are independent, continuous real-valued random variables. In other words, each $\theta(\bn)$ is independently distributed with a probability density function $p_\gamma$ supported on $(-\gamma\pi,\gamma\pi]$ with a constant $ \gamma\in [0,1]$. Continuous phase modulation can be experimentally realized with various
techniques such as spread spectrum phase modulation 
\cite{Spread}.

We also require that  $|\mu^0|(\bn)\neq 0,\forall \bn\in \cM^0$ (i.e. the mask is transparent). This is necessary for unique reconstruction of the object
as any opaque pixels of the mask would block the transmission of the object information. 
%By absorbing $|\mu^0(\bn)|$ into the object function we can assume, without loss of generality, that $|\mu^0(\bn)|=1,\forall\bn$, i.e.  a {\em phase} mask. With a proper choice of the normalizing constant  $c$, a phase mask then gives rise to an  {\em isometric}  
\commentout{%09/21/2018
Taking into account the mask function, we then have the measurement matrix
\beq
\label{one}
\hbox{\rm (1-part case)}\quad A= \Phi^0\,\, \diag\{\mu^0\}
\eeq
for the diffraction pattern of $f^0$. 


Now consider the simplest setting for ptychography where 
the object domain is split into
two overlapping blocks, one of which is the translate of the other, i.e. the object domain is $\cM^0\cup \cM^\bt$
where $\cM^\bt=\cM^0+\bt$ denotes the shift of $\cM^0$ by the displacement vector $\bt=(t_1,t_2)\in \IZ^2$.   Likewise, we denote the shifted mask defined on $\cM^\bt$ by $\mu^\bt$ and the restriction of $f$ to $\cM^\bt$ by $f^\bt$.
For convenience, both $\mu^\bt$ and $f^\bt$ assume the value zero outside of $\cM^\bt$. 
%Let $\Phi^0$ denote the ODFT over $\cM^0$ as before and $\Phi^\bt$ the ODFT over $\cM^\bt$. 


Let $f^0$ and $f^\bt$ be separately illuminated with $\mu^0$ and $\mu^\bt$, respectively. Note that
$f^0(\mbm)=f^\bt(\mbm)$ for all $\mbm\in \cM^0\cap \cM^\bt\neq \emptyset$. 



The 2-part measurement matrix  
\beq \label{two}\hbox{(2-part matrix)}\quad 
A=\lt[\begin{matrix}
\Phi^0~\diag\{\mu^0\} &0 \\
0&\Phi^\bt \diag\{\mu^\bt\}
\end{matrix}\rt]
\eeq
has orthogonal columns but since $\cM^0\cap \cM^\bt\not = \emptyset$ and the common columns shared by the two blocks generally have a greater norm than the columns specific to one block. 

\commentout{%09/20/2019
We can fix this problem by the decomposition $A=\tilde A D$ where
 $\tilde A$ is isometric and 
$D$ is the diagonal matrix with diagonal entries being the norms of the columns of $A$. $D$ can be absorbed into the object function (and dealt with at the end). 
}

For multi-part measurement, let \beq\label{1.5}
\supp(f)\subseteq \IZ_n\subseteq \bigcup_{\bt\in \cT}\cM^\bt=\{\bn+\bt:\bn\in \cM^0\}, 
\eeq
 where $\cT$ is the set of shifts, including $(0,0)$, and  write
$ f=\bigvee_{\bt\in \cT} f^\bt.
$
  The measurement matrix $A$ is constructed analogous to \eqref{two} by
 stacking $\Phi^\bt \diag\{\mu^\bt\}, \bt \in \cT. $
}

\commentout{%09/19/2018
For the rest of the paper, we consider both 
the lattice scheme, also called raster scan, and the non-lattice schemes. 
The appendix gives a detailed description of the lattice scheme. 
}

%\section{Ambiguities  in the masked object}\label{sec:one}

First we review the case of a plain diffraction pattern ($\mu^0\equiv 1$).  

\begin{prop}

\label{prop1}\cite{Hayes}
Let the $z$-transform 
$F(\bz) = \sum_{\bn} f^0(\bn) \bz^{-\bn}$ 
 be
given by
\beq
F(\bz)=\alpha \bz^{-\mbm} \prod_{k=1}^p F_k(\bz),\quad  \mbm\in \IN^2, \quad \alpha\in \IC\label{21}
\eeq
where $F_k, k=1,\dots,p,$ are 
non-monomial irreducible polynomials. Let $G(\bz)$ be
the $\bz$-transform of another finite array $g^0(\bn)$. 
%vanishing outside ${\mathbf 0}\leq \bn\leq \bN$.
Suppose 
$|F(e^{-\im 2\pi\bw})|=|G(e^{-\im 2\pi\bw})|,\forall \bw\in [0,1]^2$. Then \beq
\label{21'}
G(\bz)=|\alpha| e^{\im \theta} \bz^{-\bp}
\lt(\prod_{k\in I} F_k(\bz)\rt)
\lt(\prod_{k\in I^c} \overline{F_k(1/\bar{\bz})}\rt),\quad\mbox{for some}\quad \bp\in \IN^2,\, \theta\in \IR, 
\eeq
 where $I$ is a subset of $\{1,2,\dots,p\}$. 
\end{prop}

\begin{rmk}\label{rmk1}
The undetermined monomial factor $\bz^{-\bp}$ in \eqref{21'} corresponds to the 
translation invariance of the Fourier intensity data while 
the altered factors $\overline{F_k(1/\bar{\bz})}$ corresponds to the conjugate inversion invariance
of the Fourier intensity data (see Corollary \ref{cor1} below). 
The conjugate inversion of $f^0$, called the twin image, in $\cM^0$ is defined by  $\mb{\rm Twin} (f^0) (\bn)= \bar f^0((m,m)-\bn)$. 

\end{rmk}

Next consider  a random mask $\mu^0$ and assume that $f^0$ is not a line object. An object is a line
object  if its support  is a subset of  a line segment. 
We recall a result in \cite{unique} that the $z-$transform of the non-line masked object $\tilde f^0(\bn) =f^0(\bn) \mu^0(\bn)$
is irreducible, up to a monomial. 
\begin{prop}\cite{unique}
Suppose $f^0$ is not a line object and let $\mu^0$ be the phase mask with phase at each point
 continuously and independently distributed. 
Then with probability one
the $z$-transform of the masked object $\tilde f^0 =f^0\odot \mu^0$ does not have any non-monomial irreducible
polynomial factor. 
\label{prop2}
\end{prop}
A similar result can be proved for masks whose phases are discrete random variables 
by using more advanced tools from algebraic geometry (e.g.
\cite{Bodin}, Proposition 4.1).

The following corollary is what we will need for proving the local uniqueness theorems. 
\begin{cor}\label{cor1} Under the assumptions of Proposition \ref{prop2}, if another masked object $\tilde g^0:=\nu^0g^0$  produces
the same diffraction pattern as $\tilde f^0=\mu^0f^0$, then for some $\bp$ and $\theta$
\beq\label{r1}
 \tilde f^0(\bn+\bp)&=& e^{-\im \theta}\tilde g^0(\bn) \quad\mbox{or}\quad
 e^{\im \theta}\, \mb{\rm Twin}(\tilde g^0)(\bn)
\eeq
for all $ \bn \in \cM^0$.
\end{cor}
\begin{proof} Let $\tilde F$ and $\tilde G$ be the $z$-transforms of $\tilde f^0$ and $\tilde g^0$, respectively. 
By Proposition  \ref{prop2} and \eqref{21'}, 
\beqn
\tilde G(\bz)=e^{\im \theta} \bz^{-\bp}
\tilde F(\bz)\quad\mbox{or}\quad e^{\im \theta} \bz^{-\bp}
\overline{\tilde F(1/\bar{\bz})},\quad\mbox{for some}\,\,\bp,\, \theta\,\,\mbox{and all}\,\,\bz. 
\eeqn
which after substituting $\bz=\exp{(-\im 2\pi \bw)}$ becomes 
\beqn
\tilde G(e^{-\im 2\pi\bw})=e^{\im \theta} e^{\im \bw\cdot\bp}
\tilde F(e^{-\im 2\pi\bw})\quad\mbox{or}\quad e^{\im \theta} e^{\im \bw\cdot\bp}
\overline{\tilde F(e^{-\im 2\pi\bw})},\quad\mbox{for some}\,\,\bp,\, \theta\,\,\mbox{and all}\,\,\bz. 
\eeqn

Note that $\tilde G(e^{-\im 2\pi\bw})$ and $\tilde F(e^{-\im 2\pi\bw})$ are the Fourier transforms of $\tilde g^0$ and
$\tilde f^0$, respectively. 
Therefore in view of Remark \ref{rmk1} we have 
\beqn
\tilde g^0(\bn)&=& e^{\im \theta} \tilde f^0(\bn - \bp)\quad\mbox{\rm or}\quad  e^{\im \theta}\, \mbox{\rm Twin}(\tilde f^0)(\bn-\bp),\quad\forall \bn \in \cM^0, 
\eeqn
which is equivalent to \eqref{r1}. 
\end{proof}
\section{Two-part ptychography}\label{sec:two}

Now consider the simplest setting for ptychography where $\cM=\cM^0\cup \cM^\bt$.   


We introduce
two constraints: one on the mask phase and one on the anchoring object part.
The former is used throughout the multi-part ptychography. But the latter is only
required on a particular part called the anchor.  

 {\bf  Assumption I (Mask Phase Constraint):}
{\em  Let $\mu^0$ be a nonvanishing random  mask, defined on $\cM^0$, with phase at each pixel 
continuously and independently distributed according to a probability density function $p_\gamma$  nonvanishing in $(-\gamma \pi,\gamma\pi]$ with a constant $\gamma\le 1$. 

 Let 
\beq
\label{2mask}
\alpha(\bn)\exp[\im \phi(\bn)]=\nu^0(\bn)/\mu^0(\bn), \quad \alpha(\bn)>0,\quad \forall \bn \in \cM^0.
\eeq
We say 
that $\nu^0$ satisfies the Mask Phase Constraint (MPC) if, for all $\bn\in \cM^0$ and some constant $\phi_0$ 
 \beq
\label{u1}
&|\phi(\bn)-\phi_0|\le \delta\pi&  \mod 2\pi,
%&|\phi(\bn)-\phi_0|< \pi/2  & \mod 2\pi, \quad\mbox{\rm if}\quad \gamma> 1/2.\label{u2}
 \eeq
 where 
 \beq
 \label{u2}
\delta<\min\lt(\gamma,1/2\rt).
\eeq
}

The larger $\gamma$ is, the more phase diversity there is in the mask; the
larger $\delta$ is, the weaker the MPC is. When $\gamma>1/2$, MPC can be written simply as
\beq
\label{mpc2}
\Re(\bar\nu^0(\bn)\mu^0(\bn))>0,\quad\forall \bn\in \cM^0.
\eeq

We demonstrate the necessity of MPC in Example \ref{ex0}. 

{\bf Assumption II (Object Support Constraint):}
{\em We say that $g^0$ satisfies the Object Support Constraint (OSC) with respect to a given set of shifts $
T_0
$ 
 if  $\mbm\in T_0$ whenever
 \beq
 \label{shifts2}
 %\supp(g^0)\mb{\rm\quad or \quad } \supp(\mb{\rm Twin}(g^0))\subseteq\mb{\rm Box}[\supp(f^0)]-T_0,\\
\commentout{%09/21/2018
 && \supp(g^0)\cup   \supp(\mb{\rm Twin}(g^0))\subseteq\mb{\rm Box}[\supp(f^0)]-T_0
 }
 \supp(g^0) \quad\mb{\rm or}\quad  \supp(\mb{\rm Twin}(g^0)) \subseteq\mb{\rm Box}[\supp(f^0)]-\mbm.
%\label{shifts2'}   \supp(\mb{\rm Twin}(g^0))\subseteq\mb{\rm Box}[\supp(f^0)]-T_0 %\label{shifts2'} \supp(g^\bt)\mb{\rm \quad or \quad} \supp(\mb{\rm Twin}(g^\bt))\subseteq\mb{\rm Box}[\supp(f^\bt)]-\cS',
%\label{shifts2'}\mb{\rm or\quad}&& \supp(g^\bt)\bigcup \supp(\mb{\rm Twin}(g^\bt))\subseteq\mb{\rm Box}[\supp(f^\bt)]-T_1
\eeq

Here  $\mb{\rm Box}[E]$ is the box hull  of $E$, the smallest rectangle containing $E$.
}

We use OSC to describe the precision of our prior knowledge about $ \mb{\rm Box}[\supp(f^0)]$ which is then used to help construct the object estimate $g^0$. The smaller the set $T_0$ is, the more precise the OSC is. In the extreme case of a tight box hull prior,  $\mb{\rm Box}[\supp(f^0)]=\cM^0$,  we can set $T_0=\{(0,0)\}$ since the condition \eqref{shifts2} becomes
\beq
\label{osc2}
\commentout{%09/21/2018
\supp(g^0)\cup   \supp(\mb{\rm Twin}(g^0))\subseteq \cM^0
}
 \supp(g^0) \quad\mb{\rm or}\quad  \supp(\mb{\rm Twin}(g^0))\subseteq \cM^0
\eeq
which is null and gives  no new information. Clearly, $f^0$ has a tight box hull if and only if $\mb{\rm Twin}(f^0)$ does  since  $\mb{\rm Box}[\supp(f^0)]=\mb{\rm Box}[\supp(\mb{\rm Twin}(f^0))]+\mbm$ for some $\mbm$. 

We call the part $f^0$ with OSC, the {anchoring} part or the anchor. The above comment makes clear that a tightly supported part is an anchor. 
We demonstrate in Example \ref{ex3.1} that often OSC requires much less than a tight box hull.  





The following theorem gives sufficient conditions of the local uniqueness for 2-part ptychography. 

\begin{theorem}
\label{thm:u}
Let $f^0$ and $f^\bt$ be  non-line objects. Suppose that an arbitrary object $g=g^0\vee g^\bt$, where $g^0$ and $g^\bt$ are defined on $\cM^0$ and $\cM^\bt$, respectively,  and an arbitrary mask $\nu^0$ defined on $\cM^0$ produce the same ptychographic data as $f$ and $\mu^0$. Moreover, suppose that $\nu^0$ satisfies MPC and that $g^0$ satisfies OSC. 

Let  \beq
 \label{3.2.1}
s=\min_{\mbm,\mbm'\in T_0}|S_0(\mbm)|\wedge |S'_0(\mbm')|\ge 2
\eeq
where $T_0$ is the set of shifts in OSC and 
 \beq
S_{0}(\mbm)&=&\cM^0\cap \cM^\bt\cap (\supp(f^0)-\mbm)\nn\\
%S_1(\mbm)&=& \cM^0\cap \cM^\bt\cap [\supp(f^\bt)-\mbm)]\nn\\
S'_{0}(\mbm)&=&\cM^0\cap \cM^\bt\cap (\supp( \mb{\rm Twin}(f^0))+\mbm).\nn
%S'_{1}(\mbm)&=&\cM^0\cap \cM^\bt\cap [\supp(\mb{\rm Twin}(f^\bt))+\mbm].\nn
\eeq



Then 
 \beq
\label{masked1}
\nu^0(\bn)g^0(\bn)&=&e^{\im\theta_1}\mu^0(\bn)f^0(\bn  ),\quad\bn\in \cM^0,\\
\nu^\bt(\bn)g^\bt(\bn)&=&e^{\im \theta_2}\mu^\bt(\bn) f^\bt(\bn),\quad\bn\in \cM^\bt, 
\label{masked2}
\eeq
for some constants $\theta_1, \theta_2\in \IR,$ 
holds true
with  probability at least 
\beq
\label{high}
1-c^s,\quad c<1, 
\eeq
with
 the positive constant $c$ depending only on $\delta,\gamma, p_\gamma$ in MPC. 


\end{theorem}
The proof of Theorem \ref{thm:u} is given in Appendix \ref{sec:proof}.


As commented below Assumption II, if  $\mb{\rm Box}[\supp(f^0)]=\cM^0$, then
OSC becomes null. So we have the following corollary. 
\begin{cor} \label{thm:u0} Suppose that
$f^0$  has a tight box hull in $\cM^0$. 
Then \eqref{masked1}-\eqref{masked2} hold with probability at least $1-c^s$, for some constant $ c\in (0,1)$,  with 
\beq
\label{sss}
s=|\cM^0\cap \cM^\bt\cap\supp(f^0)|\wedge |\cM^0\cap \cM^\bt\cap \supp(\mb{\rm Twin}(f^0))|.
\eeq
\end{cor}

In \eqref{masked1}-\eqref{masked2}, $\theta_1-\theta_2$ is called the {\em phase drift} and can accumulate from one block to the next. We note here a simple fact that will be useful later. 
\begin{corollary}
\label{cor:u}
Under the assumptions of Theorem \ref{thm:u}, for all $\bn\in  \cM^0 \cap \cM^\bt\cap \supp(f)$
\beq
\label{factor2}
\alpha(\bn-\bt)&=&\alpha(\bn)\\
 \theta_1+ \phi(\bn-\bt)&= & \theta_2+ \phi(\bn) \mod 2\pi \label{factor2'}
\eeq
with high probability \eqref{high}. If, in addition,  $\phi(\bn-\bt)=\phi(\bn)$ for some $\bn\in  \cM^0 \cap \cM^\bt\cap \supp(f)$, then $\theta_1=\theta_2$. 
\end{corollary}
\begin{proof}
According to Theorem \ref{thm:u}, 
\beq\label{r101}
g(\bn)={e^{\im\theta_1}f^0(\bn )\mu^0(\bn)/\nu^0(\bn)}
&=&e^{\im \theta_2}  f^\bt(\bn )\mu^0(\bn-\bt )/\nu^0(\bn-\bt)
\eeq
holds with high probability for all $\bn\in \cM^0\cap \cM^\bt\cap \supp(f)$. 

We obtain by taking logarithm on both sides of \eqref{r101} that  \beqn
\im\theta_2-\im\theta_1  -\ln{f^0(\bn)}+\ln{f^\bt(\bn)}+\ln \alpha(\bn)-\ln \alpha(\bn-\bt)+\im\phi(\bn)-\im\phi(\bn-\bt)=0\nn
\eeqn
modulo  $\im 2\pi$. This implies 
that for $\bn\in  \cM^0 \cap \cM^\bt\cap \supp(f)$
\[
\im\theta_2-\im\theta_1 +\ln \alpha(\bn)-\ln \alpha(\bn-\bt)+\im\phi(\bn)-\im\phi(\bn-\bt)=0\mod \im 2\pi\nn
\]
which is equivalent to \eqref{factor2}-\eqref{factor2'}. 
\end{proof}


\subsection{Ambiguity without MPC or OSC}

First we give an example where \eqref{masked1}-\eqref{masked2} fails in the absence of MPC.

\begin{ex}\label{ex0} Let $\cM=\IZ_n^2$. 
Let $m=2n/3$ and $\bt=(m/2, 0)$. Evenly partition $f^0$ and $f^\bt$ into two  $m\times m/2$ parts as 
$f^0=[f^0_0,f^0_{1}]$ and $f^\bt=[f^1_{0},  f^1_1]$ 
with the overlap $f^0_{1}=f^1_{0}$. Likewise, partition the mask as
$\mu^0=[\mu^0_0,\mu^0_1], \mu^\bt=[\mu^1_0,\mu^1_1]$  where $\mu^\bt$ is just the $\bt$-shift of $\mu^0$,
i.e. $\mu^\bt(\bn+\bt)=\mu^0(\bn)$. 

Suppose $f^0_0=f^1_1$ and consider the mask estimate $\nu^0=\mbox{\rm Twin}(\mu^0)$ and the following object estimate: Let 
\beqn
g^0&=&\mbox{\rm Twin}(f^0)=[g^0_0,g^0_1]\\
 g^\bt&=&\mbox{\rm Twin}(f^\bt)=[g^1_0,g^1_1]
 \eeqn
  where
$g^0_1=g^1_0$ due to $f^0_0=f^1_1$, i.e. $g=g^0\vee g^\bt$ is a well-defined object. 
The mask estimate $\nu^0$ violates  MPC because 
\[
{\mbox{\rm Twin}(\mu^0)(\bn)\over \mu^0(\bn)}={\bar\mu^0(\bN-\bn)\over\mu^0(\bn)},\quad\bn\in\cM^0,
\]
has the maximum phase range $(-2\gamma\pi,2\gamma\pi]$. 

Clearly we have 
\beqn
\nu^0\odot g^0&=&\mbox{\rm Twin}(\mu^0\odot f^0)\\
\nu^\bt\odot g^\bt &=&\mbox{\rm Twin}(\mu^\bt\odot f^\bt)
\eeqn
so $\nu^0$ and $g$ produce the same ptychographic data as do $\mu^0$ and $f$ but
violate \eqref{masked1}-\eqref{masked2}. 

The same ptychographic ambiguity  persists for the different set-up with $m=n$ and $\bt=(m/2, 0)$
for the object parts $f^0=[f^0_0,f^0_{1}]$ and $f^\bt=[f^1_{0},  f^1_1]$ where the periodic boundary condition is imposed on $\IZ_n^2$. The periodic boundary condition implies
$f^0_0=f^1_1$ by definition. The above construction of the object and the estimates carries over here. 


\end{ex}




The argument in the proof of Theorem \ref{thm:u} suggests the following counterexamples
in which \eqref{masked1}-\eqref{masked2} fails and which  illustrate the translational and twin-like ambiguities associated with a loose object support.  An object does not have a tight support if and only it has a loose support.


\begin{ex}\label{ex3.1}
Assume the same set-up as in Example \ref{ex0} with the additional prior $f^0_0=f^1_1=0$. 

Let $
\nu^0=\mu^0, \nu^\bt=\mu^\bt$
 and $g^0=[g^0_{0}, 0], g^\bt=[0, g^1_{1}]$  where
\beq
\label{11.1}
g^0_{0}&= &f^0_{1}\odot \mu^0_1/\mu^0_0,\\
g^1_{1}&=& f^1_{0}\odot \mu^1_0/\mu^1_1.\label{11.2}
\eeq
Clearly, $g=[g^0_{0}, 0, g^1_{2}]$ is different from $f=[0,f^0_{1}, 0]$.

It is straightforward to check that for $\mbm=(m/2,0)$
\beq
\label{3.24}g^0(\bn)\nu^0(\bn)=f^0(\bn+\mbm) \mu^0 (\bn+\mbm),\quad\bn\in \cM^0\\
\label{3.25}g^\bt(\bn)\nu^\bt(\bn)=f^\bt(\bn-\mbm) \mu^\bt (\bn-\mbm),\quad\bn\in \cM^\bt
\eeq
and hence $g^0\odot\mu^0$ and $ g^\bt \odot\mu^\bt$ produce  the same  diffraction patterns
as $f^0\odot\mu^0$ and $f^\bt\odot\mu^\bt$. By setting $\nu^0=\mu^0$, we satisfy the mask phase constraint 
with $\delta=0$. 

On the other hand, $g^0(\bn) \nu^0 (\bn)\neq e^{\im \theta_0}f^0(\bn)\mu^0(\bn)$ 
and $g^\bt(\bn) \nu^\bt (\bn)\neq e^{\im \theta_\bt} f^\bt(\bn) \mu^\bt (\bn)$ in general.  Hence \eqref{masked1}-\eqref{masked2} are violated. 

For the twin-like ambiguity, consider the same set-up with
\beq
\label{3.26}
g^0(\bn)&= &\bar f^0(\bN-\bn)\bar\mu^0(\bN-\bn)/\mu^0(\bn),\quad\forall\bn\in \cM^0\\
\label{3.27}g_{\bt}(\bn)&= &\bar f^\bt(\bN+2\bt-\bn)\bar \mu^\bt(\bN+2\bt-\bn)/\mu^\bt(\bn), \quad\forall\bn\in \cM^\bt. 
\eeq
Clearly, $g=[g^0_{0}, 0, g^1_{2}]$ is different from  $f=[0,f^0_{1}, 0]$ but because  
\beqn
g^0(\bn)\nu^0(\bn)&=&\bar f^0(\bN-\bn) \bar \mu^0 (\bN-\bn),\quad\bn\in \cM^0\\
g^\bt(\bn)\nu^\bt(\bn)&=&\bar f^\bt(\bN+2\bt-\bn) \bar\mu^\bt (\bN+2\bt-\bn),\quad\bn\in \cM^\bt
\eeqn
\eqref{masked1}-\eqref{masked2} are violated.$g^0\odot\mu^0$ and $ g^\bt \odot\mu^\bt$ produce  the same  diffraction patterns
as $f^0\odot\mu^0$ and $f^\bt\odot\mu^\bt$. 
By setting $\nu^0=\mu^0$, we satisfy the mask phase constraint 
with $\delta=0$ but \eqref{masked1}-\eqref{masked2} are violated.


Both above constructions violate \eqref{masked1}-\eqref{masked2} but satisfy the OSC \eqref{shifts2} with 
\[
T_0=\Big\{(a,0): a=0,\dots, m/2\Big\}.%\quad \cS'= \Big\{(a,0): a=-m/3,\dots, 0\Big\}  
\]
On the other hand, if  $f^{0}_{1}, f^{1}_{0}$ are non-vanishing, then it can be verified 
that 
$s=0$, consistent with
the fact that the probability for ambiguity is one as shown in the above construction. 

If we enhance the precision of the support knowledge by tightening  $T_0$ by any amount $l\ge 1$ as 
\beq
\label{3.30}
T_0= \Big\{(a,0): a=0,\dots, m/2-l\Big\},%\quad \cS'=\Big\{(a,0): a=-m/3+l,\dots, 0\Big\},\quad l\ge 1
\eeq
then the above constructions  would violate the OSC \eqref{shifts2}, and be rejected. Moreover, for \eqref{3.30}, $s=ml$ with nonvanishing $f^{0}_{1}, f^{1}_{0}$ so  the probability of uniqueness is closed to one  for
$m\gg 1$ as predicted by Theorem \ref{thm:u}. 

 
\end{ex}




\section{Multi-part ptychography}\label{sec:multi}

Theorem \ref{thm:u} can be readily extended  to the case of multi-part ptychography as follows.

 Let $\cT=\{\bt_k \in \IZ^2: k=0,\dots,Q-1\}$ denote the set of all shifts in a ptychographic measurement where $\bt_0=(0,0)$. Let $\cM^k\equiv\cM^{\bt_k},$ $f^k\equiv f^{\bt_k}$ and $f=\bigvee_k f^k$.
 
We say that $f^k$ and $f^l$ are $s$-connected if 
\beq
\label{s-conn}
%\min\lt\{|\cM^k\cap \cM^{l}\cap\supp(f^k)|, |\cM^k\cap \cM^{l}\cap \supp(\mb{\rm Twin}(f^k))|\rt\}\ge s\ge 2
|\cM^k\cap \cM^{l}\cap\supp(f)|\ge s\ge 2
\eeq
and that $\{ f^k: k=1,\cdots, Q-1\}$ are $s$-connected if there is an $s$-connected chain between any
two elements. 

\begin{thm}\label{thm:many} 
Let $\{f^k, k=0,\cdots,Q-1\} $ be $s$-connected and every element of the set is a non-line object.
  %Let \beq\nn
%s_{\rm min}=\min_{k=0,\dots,q-2}\min\Big\{|\cM^k\cap \cM^{k+1}\bigcap\supp(f^k)|, |\cM^k\cap \cM^{k+1}\cap \supp(\mb{\rm Twin}(f^k))|\Big\}.  
%\eeq

 
Suppose that an arbitrary object $g=\bigvee_k g^k$, where $g^k$ are defined on  $\cM^k$,  and a mask $\nu^0$ defined on $\cM^0$ produce the same ptychographic data as $f$ and $\mu^0$.   Suppose that $\nu_0$ satisfies the MPC (Assumption I). 

In addition, suppose that for some ${\ell_0}\in \{0,1,\dots,Q-1\}$
\beq
\label{3.101}
\nu^{\ell_0}\odot g^{\ell_0}=e^{\im\theta_{\ell_0}}\mu^{\ell_0}\odot f^{\ell_0}. 
\eeq
Then  with probability at least $1-2Qp^{s}$, we have
\beq
\label{3.100}
\nu^{k}\odot g^k=e^{\im\theta_{k}}\mu^{k}\odot f^k,\quad k=0,\dots,Q-1, 
\eeq
for some constants $\theta_k\in \IR$ 
where
\beq
\label{pgamma}
p:=\max_{a\in \IR}\mbox{\rm Pr} \{\Theta\in (a-2\delta\pi, a+2\delta\pi]\}<1
\eeq
with $\Theta$ distributed according to the probability density function $p_\gamma \star p_\gamma.$
\end{thm}
\begin{rmk} For \eqref{3.101},  either the OSC (Theorem \ref{thm:u}) or
the tight box hull constraint (Corollary \ref{thm:u0}) on $f^{\ell_0}$ suffices. 

\end{rmk}
\begin{proof}

Without loss of generality, we may assume $\ell_0=0$.

Let $\cM^{\ell(k)}$ denote an adjacent block of $\cM^k$ such that
$f^{\ell(k)}$ and $f^k$ are $s-$connected. When the $s$-connected neighbor of $\cM^k$ is not unique, we make an arbitrary selection  $\ell(k)$ such that $\ell(\ell(k))=k$. Let $L_j= \{f^k, f^{\ell(k)}: k=0,\dots, j\}$. 

We prove \eqref{3.100} 
by induction. Suppose that \eqref{3.100} holds for $k=0,\dots,j$. We wish to show that there is another  part, say $f^{j+1}\not\in L_j$, such that \eqref{3.100} holds for $k=0,\dots,j, j+1,$ unless $j=Q-1$. 
Since $\{f^k:k=0,\cdots, Q-1\}$ is $s$-connected,  at least some $f^{j+1}$ is $s$-connected to, say $f^l\in L_j$ if $j<Q-1$. 

Denote $S_0:=\cM^l\cap \cM^{j+1}\cap\supp(f)$.  %and $S_0':=\cM^l\cap \cM^{j+1}\cap \supp(\mb{\rm Twin}(f^l))$.
Applying  Corollary \ref{cor1} to $\cM^{j+1}$
we have the following alternatives: For  some $\mbm\in \IZ, \theta\in \IR$,
\beq
\label{1.70'}
g^{j+1}(\bn)&=&e^{\im \theta} f^{j+1}(\bn + \mbm)\mu^{j+1}(\bn + \mbm)/\nu^{j+1}(\bn) \\
\nn\mb{\rm or\quad Twin}(g^{j+1})(\bn)&=& e^{-\im \theta} f^{j+1}(\bn+\mbm) \mu^{j+1}(\bn +\mbm)/\mb{\rm Twin}(\nu^{j+1})(\bn),\quad\forall \bn \in \cM^{j+1}.
\eeq
Let $\cM^{j+1}=\cM^l+\bt$ for some shift $\bt$. 


Consider the first alternative for $\bn\in \cM^l\cap \cM^{j+1}$:
\beq
\label{1.9'}
{e^{\im\theta_l}f^{l}(\bn)\mu^{l}(\bn)/\nu^{l}(\bn)}
&=&e^{\im \theta}  f^{j+1}(\bn + \mbm)\mu^{j+1}(\bn+ \mbm)/\nu^{j+1}(\bn)\\
&=&e^{\im \theta}  f^{j+1}(\bn + \mbm)\mu^{l}(\bn-\bt+ \mbm)/\nu^{l}(\bn-\bt)\nn
\eeq
provided that $f^l(\bn)$ and $f^{j+1}(\bn+\mbm)$ are both zero or nonzero. 

Suppose $ f^l(\bn)\cdot f^{j+1}(\bn+\mbm)\neq 0$. 
We obtain by taking logarithm on both sides of \eqref{1.9'} that  \beq
\label{1.10'}
&&\ln{\mu^l(\bn-\bt)}-\ln{\mu^l(\bn-\bt+\mbm)}\\
&=&\im\theta-\im\theta_l  -\ln{f^l(\bn)}+\ln{f^{j+1}(\bn+\mbm)}+\ln \alpha(\bn)-\ln \alpha(\bn-\bt)\nn+\im\phi(\bn)-\im\phi(\bn-\bt)\nn
\eeq
modulo  $\im 2\pi$. We want to show that if $s$ is sufficiently large
then \eqref{1.10'} holds with at most exponentially small probability unless $\mbm=0$. 


Since $\bn\in \cM^l\cap\cM^{j+1}$ and $\bn+\mbm\in \cM^{j+1}$,  $ \bn-\bt$ and $\bn+\mbm-\bt$  belong in $ \cM^l$. 
Hence  the lefthand side of \eqref{1.10'} is well-defined and has a finite value. 

Unless $\mbm=0$, 
the imaginary part $\Theta_1$ of the  lefthand side of \eqref{1.10'} 
\beqn
\Theta_1:=\theta(\bn-\bt)- \theta(\bn-\bt+\mbm)
\eeqn
is the sum of two independent random variables and hence the support set of its probability density contains $(-2\gamma\pi,2\gamma\pi]$. 

On the righthand side of \eqref{1.10'}, however, as $f^l(\bn)$ and $f^{j+1}(\bn+\mbm)$ are deterministic, the phase fluctuation is determined by $\phi(\bn)-\phi(\bn-\bt)$ which is limited to the interval $(-2\delta\pi,2\delta\pi]$ due to
MPC. Consequently  \eqref{1.10'} holds true with
probability at most 
\beqn
p_1:=\max_{a\in \IR}\mbox{\rm Pr} \{\Theta_1\in (a-2\delta\pi, a+2\delta\pi]\}<1,
\eeqn
for each $\bn$, since $ \delta<\min\{\gamma,1/2\}$. 


For all $\bn \in S_0$,  there are at least $|S_0|/2$ statistically independent  instances, corresponding to the number of  {\em non-intersecting} $
 \{\bn-\bt, \bn+\mbm-\bt\}$. 
 Therefore \eqref{1.10'} holds true 
 with probability at most $p_1^{|S_0|/2}$ unless $\mbm=0$. 
On the other hand, for $\mbm=0$, the desired result \eqref{3.100} for $k=j+1$ follows directly from \eqref{1.70'}.

Consider the second alternative  in \eqref{1.70'} and note that
\[
\mbox{\rm Twin}(g^{j+1})(\bn)=\bar g^{j+1}(\bN+2\bt_{j+1}-\bn),\quad \mbox{\rm Twin}(\nu^{j+1})(\bn)=\bar \nu^{j+1}(\bN+2\bt_{j+1}-\bn). 
\]
Rewriting the second alternative  we obtain  for $\bn\in \cM^l\bigcap\cM^{j+1}$ 
\beq\label{1.12''}
\lefteqn{e^{\im \theta_l} f^l(\bn)\mu^l(\bn)/\nu^l(\bn)}\\
&=&e^{\im \theta} \bar f^{j+1}(\bN+2\bt_{j+1}-\bn +\mbm)\bar \mu^{j+1}(\bN+2\bt_{j+1}-\bn +\mbm)/\nu^{j+1}(\bn),\nn\\
&=&e^{\im \theta} \bar f^{j+1}(\bN+2\bt_{j+1}-\bn +\mbm)\bar \mu^{l}(\bN+2\bt_{l}-\bt-\bn +\mbm)/\nu^l(\bn-\bt),\nn
\eeq
provided that $f^l(\bn )$ and $\bar f^{j+1}(\bN+2\bt_{j+1}-\bn +\mbm)$ are  
both zero or nonzero.

Consider  any $ \bn\in S_0$ (hence  
$f^l(\bn)\neq 0$) and  assume $\bar f^{j+1}(\bN+2\bt_{j+1}-\bn+\mbm)\neq 0$. Otherwise \eqref{1.12''} is false and can be ruled out. 


Taking logarithm and rearranging terms in \eqref{1.12''} we have
\beq\label{1.12+}
&&\ln{\mu^l(\bn-\bt)}-\ln{\bar\mu^l(\bN+2\bt_l-\bt-\bn+\mbm)}\\
&=&\im\theta-\im\theta_l-\ln{f^l(\bn)}+\ln{\bar f^{j+1}(\bN+2\bt_{j+1}-\bn+\mbm)}+\ln \alpha(\bn)-\ln \alpha(\bn-\bt)\nn\\
&&+ \im \phi(\bn)-\im\phi(\bn-\bt).\nn
\eeq
The imaginary parts of the lefthand side of \eqref{1.12+} 
\beqn
\Theta_2:=\theta(\bn-\bt)+\theta(\bN+2\bt_l-\bt-\bn+\mbm)
\eeqn
is the sum of two independent random variables unless
\beqn
\bn=\bt_l+\half(\bN+\mbm)
\eeqn
in which case $\Theta_2=2\theta(\bn-\bt)$ is not a sum of two independent random variables. Hence the support of the probability density function
of $\Theta_2$ contains $(-2\gamma\pi,2\gamma\pi]$. 
By the same argument as above, \eqref{1.12+} holds true  with  probability at most $p_2^{|S_0|/2}$ where
\[
p_2:=\max_{a\in \IR}\mbox{\rm Pr} \{\Theta_2\in (a-2\delta\pi, a+2\delta\pi]\}<1 
\]
since $\delta<\min(\gamma,\half)$. 



Combining the analysis of the two alternatives,  \eqref{3.100} fails for $k=j+1$
with probability at most $p_1^{|S_0|/2}+p_2^{|S_0|/2}\leq 2p^{|S_0|/2}$ conditioned on the event
that \eqref{3.100} holds true for $k=0,\dots, j$ where $p$ is as  given in \eqref{pgamma}. 
Therefore, the desired result \eqref{3.100} holds with probability
at least $
1-2 Q p^{|S_0|/2}
$ after subtracting the failure probability for each additional block. 


\end{proof}


Under  the assumptions of Theorem \ref{thm:many}, 
\beq
\label{200.2}
\nu^{k}\odot g^k=e^{\im\theta_{k}}\mu^{k}\odot f^k,\quad \forall k
\eeq
for some constants $\theta_k\in \IR$  with high probability. We can rewrite \eqref{200.2} as  
\beq
\label{200.1}
h(\bn+\bt_k)&\equiv& \ln g(\bn+\bt_k)-\ln f(\bn+\bt_k)\\ %&=&\im \theta_k -\ln \alpha^k(\bn-\bt_k)-\im \phi^k(\bn-\bt_k)\\
\nn &=&\im \theta_k-\ln\alpha(\bn)-\im \phi(\bn) \mod \im 2\pi,\quad \forall \bn \in \cM^0,
\eeq
if   $g(\bn+\bt_k)f(\bn+\bt_k)\neq 0.$
If $g(\bn+\bt_k)=0$ and $f(\bn+\bt_k)=0$, then $h(\bn+\bt_k)$ may not be well defined.
% shall be set to maintain eq. \eqref{200.1} whose righthand side is always well-defined since $\alpha(\bn)\neq 0$ by assumption.

\begin{prop}
\label{well-defined} Suppose that $\cT$ forms an additive group. Then 
the relation
\beq
\label{200.2'}
h(\bn+\bt_k)
=\im \theta_k-\ln\alpha(\bn)-\im \phi(\bn) \mod \im 2\pi,\quad \forall \bn \in \cM^0,
\eeq
can be maintained consistently under the assumptions of Theorem \ref{thm:many}.
\commentout{%10/04/2018
Moreover, if
\beq
\label{200.20}
\{f(\bn+\bt_k): k=0,\dots,Q-1\}\neq \{0\},\quad\forall \bn\in \cM^0
\eeq
then \eqref{200.2'} uniquely defines $h$. 
}

\end{prop}
\begin{proof}
To show that \eqref{200.2'} can be maintained consistently when $g(\bn+\bt_k)=f(\bn+\bt_k)=0$, we need to establish that
\beq
\label{200.23}
\im \theta_1-\ln\alpha(\bn_1)-\im \phi(\bn_1) =\im \theta_2-\ln\alpha(\bn_2)-\im \phi(\bn_2) \mod \im 2\pi
\eeq
for any $\bn_1+\bt_1=\bn_2+\bt_2$ where $\bt_1,\bt_2\in \cT$. 

Noting  $\bn_2=\bn_1-\bt$ with $\bt=\bt_2-\bt_1\in \cT$, we have by Corollary \ref{cor:u} that 
\beq
\label{200.21}\alpha(\bn_2)&=&\alpha(\bn_1)\\
\phi(\bn_2)&=&\phi(\bn_1)+\theta_\bt-\theta_0\mod 2\pi.
\eeq
Since the block phases have an affine profile, $\theta_\bt-\theta_0=\theta_2-\theta_1$  and hence
\beq
\label{200.22}\phi(\bn_2)&=&\phi(\bn_1)+\theta_2-\theta_1\mod 2\pi.
\eeq

Together \eqref{200.21} and \eqref{200.22} imply \eqref{200.23}. 

%For any $\bn\in \cM^0$ suppose $f(\bn+\bt_k)\neq 0$ for some $k$. Then $h(\bn+\bt_k)$ is uniquely defined by \eqref{200.1}. 

\end{proof}

However, we are interested in more general schemes than those forming additive groups so
we will assume that $f$ does not vanish in $\cM$ for the rest of the paper.

By  \eqref{200.1} with $\bt_0=(0,0)$,
\beq
\label{200.4'}
h(\bn)=\im \theta_0-\ln\alpha(\bn)-\im \phi(\bn), \quad \forall \bn \in \cM^0
\eeq
and hence 
\beq
\label{200.4}
h(\bn+\bt_k)-h(\bn)=\im\theta_k-\im\theta_0\mod\im 2\pi, \quad\forall k=1,\cdots,Q,\quad \forall\bn\in \cM^0. 
\eeq
We can  rewrite  \eqref{200.4} in the more useful form:  for any $k,l$
 \beq
 \label{200.5}
 h(\bn+\bt_k)-h(\bn+\bt_l)=\im \theta_k-\im\theta_l \mod \im2\pi,\quad \forall \bn\in \cM^0,
 \eeq
 or equivalently 
 \beq
 \label{200.5'}
 h(\bn+\bt_k-\bt_l)-h(\bn)=\im \theta_k-\im\theta_l \mod \im2\pi,\quad \forall \bn\in \cM^l. 
 \eeq


%For simplicity, we impose the periodic boundary condition  on the object domain $\IZ_n^2$. 
We have the following observation  (cf. Corollary \ref{cor:u}).
\begin{corollary}\label{cor:u2}
Under the assumptions of Theorem \ref{thm:many}, 
if, in addition,  $h(\bn)=h(\bn+\bt_k)$ for some $\bn\in \cM^0$, then $\theta_k=\theta_0$. 

\end{corollary}




\section{The mixing schemes}\label{sec:blind}

The local uniqueness  \eqref{3.100} is local in the sense that the undetermined  block phase can vary from block
to block arbitrarily, resulting in an uncontrollable phase drift as  
\eqref{3.100} relies entirely on
two-part connectivity.  In this section, we account for the interaction among multiple object parts
 to derive a global uniqueness result. 

 \subsection{Three-part coupling}  We continue to use the set-up and notation of Section \ref{sec:multi}. Without loss of generality, we assume that $\bt_0=(0,0)$. 
 

%Without loss of generality, we assume that $\bt_0=(0,0)$ and that $\{f^1,\cdots, f^k\}$ is the neighborhood of $f^0$, consisting of  all the adjacent nodes in $\Gamma_s$. Suppose $\sum_{i=1}^k p_i\bt_i=\ba$ for some $p_i\in \IZ$ and $\ba\in \IZ^2$. 
First we analyze how 3-part interactions affect the phase drift relation.  Consider two neighbors $f^1$ and $f^2$ in $\Gamma_s$ of $f^0$. Suppose $p_1\bt_1-p_2\bt_2=\ba$ for some $p_1, p_2\in \IN$, $\bt_1,\bt_2\in \cT$, and $\ba\in \IZ^2$.

There are several paths for reducing   $f(\bn+p_1\bt_1-p_2\bt_2)$ to $f(\bn)$.
For example, by repeatedly applying  \eqref{200.4} we have the following calculation 
\beq\label{r20}
h(\bn+p_1\bt_1-p_2\bt_2)&=& h(\bn+p_1\bt_1-(p_2-1)\bt_2)-\im\theta_2+\im\theta_0,\\
&&\quad \forall \bn\in (\cM^0-p_1\bt_1+p_2\bt_2),\nn\\
&=&h(\bn+p_1\bt_1-(p_2-2)\bt_2)-\im 2 \theta_2+\im 2 \theta_0,\nn\\
&&\quad\forall \bn\in (\cM^0-p_1\bt_1+p_2\bt_2)\cap (\cM^0-p_1\bt_1+(p_2-1)\bt_2),\nn\\
&=&\cdots\nn\\
&=&h(\bn+p_1\bt_1)-\im p_2\theta_2+\im p_2\theta_0,\quad \forall \bn \in  \bigcap_{j=1}^{p_2} (\cM^0-p_1\bt_1+j\bt_2), \nn
\eeq
modulo $\im 2\pi$,  where we keep track of the domain of validity for each equality.

Continuing the similar  reduction of $p_1\bt_1$ from \eqref{r20}, we have 
\beqn
h(\bn+\ba)&=&h(\bn+(p_1-1)\bt_1)+\im\theta_1-\im p_2\theta_2+\im p_2\theta_0,\\
&& \quad \forall \bn\in  \bigcap_{j=1}^{p_2} (\cM^0-p_1\bt_1+j\bt_2)\cap (\cM^0-(p_1-1)\bt_1)\\
&=&\cdots\\
&=&h(\bn)+\im p_1\theta_1-\im p_2 \theta_2+\im (p_2-p_1)\theta_0,\\
&& \forall \bn\in  \bigcap_{j=1}^{p_2} (\cM^0-p_1\bt_1+j\bt_2) \bigcap_{i=0}^{p_1-1} (\cM^0-i\bt_1), \eeqn
 modulo $\im2\pi$. 
 
 
\begin{figure}
\centering
\includegraphics[width=10cm,height=6.7cm]{lattice-path2}
\caption{Shortest paths from $(2,-2)$ to $(0,0)$ (upper-left corner) where the grid points represent integer multiples of $\bt_1$ and $\bt_2$. The upper-leftmost path corresponds to $\sigma_1$ in \eqref{path1'} and the lower-rightmost path corresponds to $\sigma_2$ in \eqref{path2'}.  Many other paths  (not shown) are outside of the $3\times 3$ grid  most of which give rise to an empty $\Sigma_0$ and contribute nothing to \eqref{D55}. The dotted circles represent the grid points in the definition of $\Sigma_0$; they are all the grid points along the path except for the upper right corner/end points.  }
\label{fig2}
\end{figure}

 
 We can represent the above path of reduction by
 \beq\label{path1'}
&\sigma_1:&p_1\bt_1-p_2\bt_2\longrightarrow p_1\bt-(p_2-1)\bt_2\longrightarrow \cdots \\&&\longrightarrow p_1\bt_1\longrightarrow (p_1-1)\bt_1\longrightarrow \cdots\longrightarrow \bt_1\longrightarrow (0,0)\nn
 \eeq
 which leads to
 \beq\label{53}
 h(\bn+\ba)= h(\bn)+\im p_1\theta_1-\im p_2 \theta_2+\im (p_2-p_1)\theta_0
 \eeq
 in the set
 \beq
 \label{path1}
\Sigma_0(\sigma_1,\bt_1,\bt_2)
&=& \bigcap_{j=0}^{p_2} (\cM^0-p_1\bt_1+j\bt_2)\bigcap_{i=0}^{p_1-1} (\cM^0-i\bt_1)
%&= &\bigcap_{j=0}^{p_2-1} (\cM^0-\ba- j\bt_2) \bigcap_{i=0}^{p_1-1} (\cM^0-i\bt_1)\nn
 \eeq

Motivated by the above example, we can represent a path
of reduction from $p_1\bt_1-p_2\bt_2$ to $(0,0)$ by a directed path
on the lattice $\IZ^2$ spanned by $\bt_1$ and $\bt_2$ from $(p_1,-p_2)$ to $(0,0)$ as in Figure \ref{fig2} (for $p_1=2, p_2=2$). 
The set of validity $\Sigma_0(\sigma,\bt_1,\bt_2)$ along  the path $\sigma$ is the intersection of the shifted blocks that are $\cM^0 $ minus the vectors  corresponding to the grid points on the {\em left
or lower} end of any edge on the path. 

For example, the path of reduction 
\beq
\label{path2'}
&\sigma_2:&p_1\bt_1-p_2\bt_2\longrightarrow (p_1-1)\bt_1-p_2\bt_2\longrightarrow \cdots\\
&&\longrightarrow -p_2\bt_2\longrightarrow -(p_2-1)\bt_2\longrightarrow \cdots\longrightarrow -\bp_2\longrightarrow  (0,0)\nn
\eeq
leads to \eqref{53} in the set
\beq
\label{path2}
\Sigma_0(\sigma_2,\bt_1,\bt_2)&=&\bigcap_{j=0}^{p_1-1}(\cM^0- j\bt_1+p_2\bt_2)\bigcap_{j=1}^{p_2}(\cM^0+j\bt_2)
%&=&\bigcap_{i=1}^{p_1}(\cM^0-\ba+i\bt_1) \bigcap_{j=1}^{p_2} (\cM^0+j\bt_2)\nn
\eeq
and the  path 
\beqn
&\sigma_3:&
p_1\bt_1-p_2\bt_2\longrightarrow (p_1-1)\bt_1-p_2\bt_2\longrightarrow (p_1-1)\bt_1-(p_2-1)\bt_2\\
&& \longrightarrow (p_1-2)\bt_1-(p_2-1)\bt_2\longrightarrow \cdots\longrightarrow (0,0)
\eeqn
leads to \eqref{53} in the set
\[
\Sigma_0(\sigma_3,\bt_1,\bt_2)=[\cM^0-(p_1-1)\bt_1+p_2\bt_2]\cap [\cM^0-(p_1-2)\bt_1+(p_2-1)\bt_2]\cap\cdots. 
\]

We denote the set of all directed paths from $(p_1,-p_2)$ to $(0,0)$
 as $\Pi(p_1,- p_2)$. For many of these paths, the corresponding sets $\Sigma_0$ are empty,  depending on the overlapping ratio between adjacent blocks (see Fig. \ref{fig2}). 


By repeatedly applying \eqref{200.4} we can extend \eqref{53} to a larger region as follows.
\begin{prop}
The relation  
 \beq
 \label{57}
h(\bn+\ba)
&=&h(\bn)+\im p_1\theta_1-\im p_2 \theta_2+\im (p_2-p_1)\theta_0\mod \im2\pi
\eeq
holds true in the set
\beq
\label{59}
\bigcup_{\bt\in \cT}\bigcup_{\sigma\in \Pi(p_1,-p_2)}\lt[\bt+\Sigma_0(\sigma,\bt_1,\bt_2)\cap \cM^0\cap (\cM^0-\ba)\rt]. 
\eeq
\end{prop}
\begin{proof}
For any fixed $\sigma$, let $\bn\in \Sigma_0(\sigma,\bt_1,\bt_2)\cap \cM^0\cap (\cM^0-\ba)$.

By \eqref{57} and \eqref{200.4}, 
\beq
h(\bn+\bt_k)&=&h(\bn+\ba)-\im p_1\theta_1+\im p_2\theta_2-\im(p_2-p_1)\theta_0
+\im\theta_k-\im\theta_0,\label{58}
\eeq
Hence,  by \eqref{200.4} and \eqref{58}, 
\beqn
h(\bn+\ba+\bt_k)&=&h(\bn+\ba)+\im\theta_k-\im\theta_0\\
&=& h(\bn+\bt_k)+\im p_1\theta_1-\im p_2\theta_2+\im (p_2-p_1)\theta_0.
\eeqn
In other words, \eqref{57} has been extended to $\bt_k+\Sigma_0(\sigma,\bt_1,\bt_2)\cap \cM^0\cap (\cM^0-\ba)$. 
Taking the union over all shifts and paths, we obtain the desired result.
\end{proof}
\commentout{%10/21/2018
However, since different points of any set $S$ may be in the intersection of different groups of neighboring blocks $\{\cM^{k_j}\}$, the extension by \eqref{200.5'} should be carried out point by point. 
Define \[
\bt\oplus \bn:= \bigcup_j (\bt-\bt_{k_j}+ \bn),
\]
where $\{\cM^{k_j}\}$ are {\em all} the neighboring blocks containing the point $\bn$,  
and $\bt\oplus S : =\{\bt\oplus \bn: \bn\in S\}.$
}

%Let $R_0(\sigma,\bt_1,\bt_2):=\cup_{\bt\in \cT} (\bt\oplus \Sigma_0(\sigma,\bt_1,\bt_2))$. 

\commentout{%10/14/2018
We have first
\beqn
h(\bn+p_1\bt_1-p_2\bt_2) &=&h(\bn+(p_1-1)\bt_1-p_2\bt_2)+\im\theta_1-\im\theta_0,\quad\forall \bn\in (\cM^0-\ba+\bt_1)\\
&=&\cdots\\
&=&h(\bn-p_2\bt_2)+\im p_1\theta_1-\im p_1 \theta_0,\quad \forall \bn\in \bigcap_{i=1}^{p_1}(\cM^0-\ba+i\bt_1)
\eeqn
and then
\beqn
h(\bn+p_1\bt_1-p_2\bt_2)&=&h(\bn-(p_2-1)\bt_2)-\im \theta_2+\im p_1\theta_1+\im (1-p_1) \theta_0,\\
&&\quad\forall \bn\in \bigcap_{i=1}^{p_1}(\cM^0-\ba+i\bt_1) \cap (\cM^0+p_2\bt_2)\\
&=&\dots\\
&=& h(\bn)+\im p_1\theta_1-\im p_2 \theta_2+\im (p_2-p_1)\theta_0,\quad\forall \bn\in R_2 
\eeqn
modulo $\im2\pi$. 
}


 
 We collect the preceding analysis into a lemma. 
\begin{lemma} \label{lem1} \commentout{%10/20/2018Suppose that for all $k$
\beq
\label{200.1'}
h(\bn+\bt_k)=\im \theta_k-\ln\alpha(\bn)-\im \phi(\bn) \mod\im 2\pi,\quad \forall \bn \in \cM^0. 
\eeq
}
Suppose $\supp(f)=\cM$. Suppose  
\beq
\label{400.13}
p_1(\bt_{\ell_1}-\bt_{\ell_0})-p_2(\bt_{\ell_2}-\bt_{\ell_0})=\ba\in \IZ^2
\eeq
 for some $p_1, p_2\in \IZ$, $\ba\in \IZ^2$ and triplet 
$\bt_{\ell_0}, \bt_{\ell_1}, \bt_{\ell_2} \in \cT$.
\commentout{%10/14/2018
 \beq
 \label{D}
{D_0(\ba,\bt_1,\bt_2,p_1,p_2)}
 &:=& \lt\{\bigcap_{j=0}^{p_2-1} (\cM^0-\ba- j\bt_2) \bigcap_{i=0}^{p_1-1} (\cM^0-i\bt_1)\rt\}\\
 &&\bigcup\lt\{ \bigcap_{i=1}^{p_1}(\cM^0-\ba+i\bt_1) \bigcap_{j=1}^{p_2} (\cM^0+j\bt_2)\rt\} \nn\\
 &\neq &\emptyset.\nn
 \eeq
 }
Then 
\beq
\label{200.10}\label{200.112}
h(\bn+\ba)=h(\bn)+\im p_1(\theta_{\ell_1}-\theta_{\ell_0})-\im p_2(\theta_{\ell_2}- \theta_{\ell_0}) \mod \im 2\pi
\eeq
for all $\bn$ in the region 
\beq
 \label{D55}\label{domain}
\lefteqn{ D_{\ell_0}(\ba, \bt_{\ell_1}-\bt_{\ell_0}, \bt_{\ell_2}-\bt_{\ell_0},p_1,p_2)}\\
&:=&\bigcup_{\sigma\in \Pi(p_1,-p_2)}\bigcup_{\bt\in \cT} (\bt-\bt_{\ell_0}+\cM^{\ell_0}\cap(\cM^{\ell_0}-\ba)\cap \Sigma_{\ell_0}(\sigma,\bt_{\ell_1}-\bt_{\ell_0}, \bt_{\ell_2}-\bt_{\ell_0})) \nn
 \eeq 
 where $\Sigma_{\ell_0}(\sigma,\bt_{\ell_1}-\bt_{\ell_0}, \bt_{\ell_2}-\bt_{\ell_0})$ is the set of validity associated with the path $\sigma$. 
\end{lemma}
\commentout{%10/18/2018
\begin{rmk}
In practical applications,  $D_0(\ba,\bt_1,\bt_2,p_1,p_2)\neq\emptyset $ only for small integers $p_1, p_2$ depending on the extend of overlap between adjacent blocks. 
For example  with the overlap ratio of about $50\%$, this  requires $p_1, p_2$ to be small integers less than 3.

\end{rmk}
}

\commentout{%10/20/2018

Lemma \eqref{lem1} implies the following result.

\begin{thm}Suppose $\supp(f)=\cM$.  If,  for some $p^j_1,p_2^j \in \IZ$ and two triplets $\bt_{\ell_0^j},\bt_{\ell_1^j},\bt_{\ell_2^j}\in \cT$, 
\[
p^j_1(\bt_{\ell^j_1}-\bt_{\ell^j_0})-p^j_2(\bt_{\ell^j_2}-\bt_{\ell^j_0})=\ba^j,\quad j=1,2, 
\]
where $\ba^1=(1,0), \ba^2=(0,1), $ and if  
\[
{D_{\ell^j_0}(\ba^j,\bt_{\ell^j_1}-\bt_{\ell^j_0},\bt_{\ell^j_2}-\bt_{\ell^j_0},p^j_1,p^j_2)}=\cM,\quad j=1,2,
\] 
then 
\eqref{300.1} and \eqref{200.116} hold with
\beqn
\br=\lt[\begin{matrix}
p^1_1 \theta_{\ell^1_1}-p^1_2 \theta_{\ell^1_2}+(p^1_2-p^1_1)\theta_{\ell^1_0}\\
p^2_1 \theta_{\ell^2_1}-p^2_2\theta_{\ell^2_2}+(p^2_2-p^2_1)\theta_{\ell^2_0}
\end{matrix}\rt].
\eeqn


\end{thm}
}



\commentout{%10/14/2018
\begin{proof}
 By assumption, either
\[
R_1=\bigcap_{j=0}^{p_2-1} (\cM^0-\ba- j\bt_2) \bigcap_{i=0}^{p_1-1} (\cM^0-i\bt_1)\neq\emptyset
\]
or
\[
R_2=\bigcap_{i=1}^{p_1}(\cM^0-\ba+i\bt_1) \bigcap_{j=1}^{p_2} (\cM^0+j\bt_2)\neq\emptyset.
\]
 
Combining the above two cases, we obtain the desired result \eqref{200.10}. 
\end{proof}
}

 \commentout{%10/14/2018 
\beq
 \label{D2}
{D_{\ell_0}(\ba,\bs_1,\bs_2,p_1,p_2)}
 &:=& \lt\{\bigcap_{j=0}^{p_2-1} (\cM^{\ell_0}-\ba- j\bs_2) \bigcap_{i=0}^{p_1-1} (\cM^{\ell_0}-i\bs_1)\rt\}\\
 &&\bigcup\lt\{ \bigcap_{i=1}^{p_1}(\cM^{\ell_0}-\ba+i\bs_1) \bigcap_{j=1}^{p_2} (\cM^{\ell_0}+j\bs_2)\rt\}\nn\\
 &\neq& \emptyset.  \nn
 \eeq
 }

\commentout{%10/14/2018
The question is whether the relation \eqref{200.112} can be extended to the whole object domain $\IZ_n^2$ from
nonempty $D_{\ell_0}(\ba, \bt_{\ell_1}-\bt_{\ell_0}, \bt_{\ell_2}-\bt_{\ell_0},p_1,p_2)$. 
The answer is in the affirmative. 

\begin{lemma}\label{lem:mix}
%If \eqref{D2} is true, then \eqref{200.112} holds in $\IZ^2_n$. 

\end{lemma}
}
\commentout{%10/14/2018
\begin{proof} 
To extend  \eqref{200.10} from $D_{\ell_0}$  to all $\bn\in \IZ_n^2$ by applying \eqref{200.4} for all $\bt\in\cT$,  it suffices to show 
\beq
\label{cover}
\IZ_n^2= \bigcup_{\bt\in \cT} (D_{\ell_0}+\bt). 
\eeq
%where the shift is under the periodic boundary condition on $\IZ_n^2$. 
which follows from  
\[
R\subseteq  \bigcup_{\bt\in \cT} (D_{\ell_0}+\bt)
\]
 for any $R$ congruent to $\IZ_m^2$
since $\IZ_n^2$ can then be covered by $\{R+\bt: \bt\in \cT\}$. 




Denote  $\bs_1=\bt_{\ell_1}-\bt_{\ell_0}, \bs_2=\bt_{\ell_2}-\bt_{\ell_0}$.  By assumption, either
\[
R_1=\bigcap_{j=0}^{p_2-1} (\cM^{\ell_0}-\ba- j\bs_2) \bigcap_{i=0}^{p_1-1} (\cM^{\ell_0}-i\bs_1)\neq\emptyset
\]
or
\[
R_2=\bigcap_{i=1}^{p_1}(\cM^{\ell_0}-\ba+i\bs_1) \bigcap_{j=1}^{p_2} (\cM^{\ell_0}+j\bs_2)\neq\emptyset. 
\]





If $R_1\neq\emptyset$, then 
 \[
\bigcap_{i=0}^{p_1-1} (\cM^{\ell_0}-i\bs_1)\neq \emptyset,\quad  \bigcap_{j=0}^{p_2-1} (\cM^{\ell_0}-\ba- j\bs_2)\neq\emptyset.
\]
By \eqref{200.5},  for $(k,l)=(\ell_1,\ell_0), (\ell_2,\ell_0)$, we can extend \eqref{200.112} from  $\bigcap_{i=0}^{p_1-1} (\cM^{\ell_0}-i\bs_1)$ to $\cM^0$
 and from $\bigcap_{j=0}^{p_2-1} (\cM^{\ell_0}-\ba- j\bs_2)$ to $\cM^0-\ba$ by repeatedly applying \eqref{200.5}.  In other words, \eqref{200.112} holds
 in $\cM^{\ell_0}\cap (\cM^{\ell_0}-\ba).$ 
 
 For $\cM^0-\ba$, since $\ba=p_1\bs_1-p_2\bs_2$ is a linear combination of
 $\bs_1$ and $\bs_2$ with integer coefficients, by repeatedly using \eqref{200.4}, we can continue the extension of \eqref{200.112} to $\cM^0$
 and eventually the whole object domain. 
 



\end{proof}
}

\commentout{%09/23/2018
Lemma \ref{lem:mix} and Eq. \eqref{200.4'} imply the following result.
\begin{cor} \label{cor10} If \eqref{D2} is true, then for all $\bn\in \cM^0$
\beqn
\alpha(\bn)&=&\alpha(\bn+\ba)\\
 \phi(\bn+\ba)&=&\phi(\bn)-p_1(\theta_{\ell_1}-\theta_{\ell_0})+p_2(\theta_{\ell_2}-\theta_{\ell_0}) \mod 2\pi.
\eeqn

\end{cor}
}


We can generalize the above analysis to 4-, 5- or higher-coupling. 
Instead, we will pursue an alternative route of combining the 3-part coupling for different triplets $\bt_{\ell_0},\bt_{\ell_1}, \bt_{\ell_2}$.

\subsection{Mixing schemes}
We now introduce the {\em mixing } property built on the 3-part interactions.
To simplify the analysis, we assume $\cM=\IZ_n^2, n\ge m,$ endowed with the periodic boundary condition (i.e a discrete torus).
The periodic boundary condition refers to the measurement scheme when the mask crosses over the boundaries of 
the object domain $\IZ_n^2$ and 
should not be taken as 
the assumption of $f$ being a periodic object. The latter implies the former but the converse is false. 


{\bf The Mixing Property}.
{\em 
Let  $ \bu_i:=(u_{i1},u_{i2}), i=1,2,$ where the four integers $u_{11}, u_{12}, u_{21}, u_{22} $ satisfy 
\beq
\label{basis}
u_{11}u_{22}-u_{12}u_{21}=1. 
\eeq

 There exist  $c^i(\ell_0,\ell_1,\ell_2)\in \IZ$ and $\ba^i(\ell_0,\ell_1,\ell_2)\in \IZ^2, i=1,2,$ such that
\beq
\label{mix}
\sum_{(\ell_0,\ell_1,\ell_2)} c^i(\ell_0,\ell_1,\ell_2) \ba^i(\ell_0,\ell_1,\ell_2)
=\bu_i,\quad i=1,2 
\eeq
over   all triplets  $(\ell_0,\ell_1,\ell_2)$ from $\cT$ 
that satisfy  \beq
\label{200.13}
&&p^j_1(\bt_{\ell_1}-\bt_{\ell_0})-p^j_2(\bt_{\ell_2}-\bt_{\ell_0})=\ba^j(\ell_0,\ell_1,\ell_2)\\
\label{D22}\&&& D_{\ell_0}(\ba^j, \bt_{\ell_1}-\bt_{\ell_0}, \bt_{\ell_2}-\bt_{\ell_0},p^j_1,p^j_2)=\cM
\eeq
for some integers $p^j_1(\ell_0,\ell_1,\ell_2)$, $p^j_2(\ell_0,\ell_1,\ell_2)$ and
for  either $j=1$ or $j=2$. 
}

The definition is designed for generalization to irregular scanning schemes practiced
in applications  \cite{circle, optimal, scan1}. The purpose behind the complex and daunting look of the definition
is to extend the 3-part interactions to
multi-part interactions in a two-tier approach. 

Before giving concrete examples, let us state our main results following from the mixing assumption.
\begin{theorem}\label{thm:mix} Suppose $\supp(f)=\cM=\IZ_n^2$, endowed with the periodic boundary condition.
If $\cT$ satisfies the mixing property, then $h(\bn)$ is an affine function
\beq\label{300.1}
h(\bn)=h(0)+\im \bn\cdot\br \mod \im 2\pi,\quad\bn\in \cM,
\eeq
with
\beq
\label{300.2}
\br=\lt[\begin{matrix}
\sum_{i=1}^2  b_{1i}\sum_{(\ell_0,\ell_1,\ell_2)} c^i\lt[p^i_1
(\theta_{\ell_1}-\theta_{\ell_0})-p^i_2 (\theta_{\ell_2}-\theta_{\ell_0})\rt]\\
\sum_{i=1}^2  b_{2i}\sum_{(\ell_0,\ell_1,\ell_2)} c^i\lt[p^i_1
(\theta_{\ell_1}-\theta_{\ell_0})-p^i_2 (\theta_{\ell_2}-\theta_{\ell_0})\rt]
\end{matrix}\rt].
\eeq
 and hence by \eqref{200.4'}
\beq
\label{200.116}\label{phase-error}
\alpha(\bn)=\alpha(0),\quad \phi(\bn)&=&\phi(0)-\bn\cdot\br \mod 2\pi,\quad \forall \bn\in \cM^0.
\eeq
\end{theorem}
\begin{proof}
By Lemma \ref{lem1},  \eqref{200.13} and \eqref{D22}  imply   that for $i=1,2,$ \beq
\label{200.115'}
h(\bn+\ba^i)=h(\bn)+\im p^i_1(\theta_{\ell_1}-\theta_{\ell_0})-\im p^i_2(\theta_{\ell_2}-\theta_{\ell_0}) \mod \im 2\pi, \quad\bn\in \IZ_n^2.
\eeq


By repeatedly applying \eqref{200.115'} according to \eqref{mix} (i.e. shifting by $c^i$ units of $\ba^i$ and summing)  we obtain that for $i=1,2,$ 
\beqn
h(\bn+\bu_i)=h(\bn)+\im\sum_{(\ell_0,\ell_1,\ell_2)} c^i\lt[p^i_1
(\theta_{\ell_1}-\theta_{\ell_0})-p^i_2 (\theta_{\ell_2}-\theta_{\ell_0}) \rt]\eeqn
where the periodic boundary condition is used to ensure the validity of \eqref{200.115'} in the reduction procedure. 

Since $u_{11}u_{22}-u_{12}u_{21}=1$, there exist integers $b_{ij},i,j=1,2,$ such that 
\[
b_{11} \bu_1+b_{12}\bu_2=\be_1:=(1,0),\quad
b_{21}\bu_1+b_{22}\bu_2=\be_2:=(0,1). 
\]
Hence for $j=1,2$,
\beq
\label{300.3}
{h(\bn+\be_j)}
&=&h(\bn)+ \im \sum_{i=1}^2  b_{ji}\sum_{(\ell_0,\ell_1,\ell_2)} c^i\lt[p^i_1
(\theta_{\ell_1}-\theta_{\ell_0})-p^i_2(\theta_{\ell_2}-\theta_{\ell_0}) \rt]
%&=&h(\bn)+\im \br\cdot\be_j.\nn
\eeq
and the desired result \eqref{300.1} with \eqref{300.2}
 follows from repeatedly applying \eqref{300.3}.  

\end{proof}

By specializing to the case $\ba^1=(1,0), \ba^2=(0,1)$ in Theorem \ref{thm:mix}, we have the following corollary. 
\begin{cor}In addition to the assumptions in Theorem \ref{thm:mix}, if,  for some $p^j_1,p_2^j \in \IZ$ and two triplets $\bt_{\ell_0^j},\bt_{\ell_1^j},\bt_{\ell_2^j}\in \cT$, 
\[
p^j_1(\bt_{\ell^j_1}-\bt_{\ell^j_0})-p^j_2(\bt_{\ell^j_2}-\bt_{\ell^j_0})=\lt\{\begin{matrix} (1,0),&j=1\\
(0,1),& j=2
\end{matrix}\rt.
\] and if  
\[
{D_{\ell^j_0}(\ba^j,\bt_{\ell^j_1}-\bt_{\ell^j_0},\bt_{\ell^j_2}-\bt_{\ell^j_0},p^j_1,p^j_2)}=\cM,\quad j=1,2,
\] 
then 
\eqref{300.1} and \eqref{200.116} hold with
\beqn
\br=\lt[\begin{matrix}
p^1_1 \theta_{\ell^1_1}-p^1_2 \theta_{\ell^1_2}+(p^1_2-p^1_1)\theta_{\ell^1_0}\\
p^2_1 \theta_{\ell^2_1}-p^2_2\theta_{\ell^2_2}+(p^2_2-p^2_1)\theta_{\ell^2_0}
\end{matrix}\rt].
\eeqn


\end{cor}



Another corollary of Theorem \ref{thm:mix} is that the
block phases $\theta_k$ have an affine profile.  
\begin{cor} \label{cor:mix} \label{cor:blind2} Under the assumptions of Theorem \ref{thm:mix},  the block phases have an affine
profile 
\beq
\label{200.117}
\theta_k=\theta_0
+(\bt_k-\bt_0)\cdot\br\mod 2\pi,\quad\forall k.
\eeq

If, in addition,  $\theta_k=\theta_0$ for all $k$ then
$\br=0$ and hence $\phi(\bn)=\phi(0), h(\bn)=h(0)$ for all $\bn$.
\end{cor}

\begin{proof}

By \eqref{200.1} and the constancy of $\alpha$
\beq
\label{200.113}
h(\bn+\bt_k)
&=&\im \theta_k-\ln\alpha(0)-\im \phi(\bn)  \mod \im 2\pi,\quad\bn\in \cM^0,\quad \forall k.
\eeq
Hence
\[
h(\bn+\bt_k)-h(\bn+\bt_0)=\im\theta_k-\im\theta_0,\quad\forall \bn\in \cM^0.
\]
The sought after result \eqref{200.117} then follows immediately from \eqref{300.1}.

 To prove $\br=0$ from the assumption $\theta_k=\theta_0, \forall k$, we only need to show the existence of two linearly independent $\bt_k$ and $\bt_{k'}$ in $\cT$. 
This follows easily from the mixing condition. 

\end{proof}

\subsection{Examples of mixing schemes}


The following examples should make the mixing property more concrete and clear, and at the same time demonstrate the versatility of the
definition. 
The first example shows that the raster scan is decidedly not a mixing scheme unless the step size is 1.
\begin{ex}
\label{ex:raster} For the raster scan we use two indices to describe the shifts \beqn
\bt_{kl}=\tau(k,l), \quad k,l=0,\dots, q-1,
\eeqn
where $\tau=n/q$ is the constant step size of the raster scan and $\bt_{ql}=\bt_{0l},\bt_{kq}=\bt_{0l}$ to satisfy the periodic boundary condition. 

Regardless of $\tau$ and the condition \eqref{D22},
the quantities $\ba^j$ have a common factor $\tau$ so  \eqref{mix} with \eqref{basis} can
not be satisfied unless $\tau=1$. It is well known that ambiguities known as raster grid pathology are present in blind ptychography 
with the raster scan of $\tau>1$ \cite{probe09}. 


When $\tau=1$ ($q=n$), 
 \eqref{200.13} with $\ba^1=(1,0),\ba^2=(0,1)$ is satisfied for the triplets 
 \beq
 \label{triple}
 (\bt_{kl},\bt_{k+1,l},\bt_{k+2,l}), \quad (\bt_{kl},\bt_{k,l+1},\bt_{k,l+2})
 \eeq
  with $p^1_1=p^2_1=2, p^1_2=p^2_2=1$ and for 
 condition \eqref{mix} we only need to invoke one triplet for each direction:  $c^1=c^2=1$ for $(k,l)=(0,0)$ and zero otherwise. 
 
For  \eqref{D22} with $\ba^1=(1,0)$, it suffices to consider just one path $\sigma^1: (1,0)\longrightarrow (0,0)$, which
has  one edge and one grid point, $(0,0)$, at the left end of the edge. Hence
$\Sigma_{00}(\sigma^1, (1,0), (2,0))= \IZ_m^2$. Let $\lb a,b\rb$ denote the integers
between and including $a$ and $b$. We have $\IZ_m^2=\lb 0, m-1\rb^2$.

We wish to show
that
\beqn
\bigcup_{k,l=0}^{q-1}(\bt_{kl}+\IZ_m^2\cap (\IZ_m^2-(1,0))=\bigcup_{k,l=0}^{q-1}\lt((k,l)+\lb 0,m-2\rb \times \lb 0,m-1\rb \rt)=\IZ_n^2.
\eeqn
which is trivially true for $q=n$. Hence $D_{00}(\sigma^1, (1,0), (2,0))=\IZ_n^2$
 
 Likewise, the path $\sigma^2: (0,1)\longrightarrow (0,0)$ gives rise to 
 \[
 \Sigma_{00}(\sigma^2, (0,1), (0,2))= \IZ_m^2,\quad D_{00}(\sigma^2, (0,1), (0,2))=\IZ_n^2.
 \] Hence
\eqref{D22} with $\ba^1=(0,1), \ba^2=(0,1)$, and \eqref{mix} with $\bu_1=(1,0), \bu_2=(0,1)$ are satisfied. 

 
\commentout{ %10/18/2018 
But the raster scan with $\tau=1$ has too much redundancy and  is impractical.
 On the other hand, we can obtain a mixing scheme by slightly perturbing 
 the raster scan with an arbitrary stepsize $\tau<m$ (i.e. positive overlap) as follows.
 Keeping all $\bt_{kl}$ unchanged except that  $\bt_{20}=(2\tau-1,0), \bt_{02}=(0,2\tau-1)$ and
 setting $p^1_1=p^2_1=2, p^1_2=p^2_2=1$, we satisfy \eqref{200.13} with $\ba^1((0,0), (1,0), (2,0))=(1,0),\ba^2((0,0),(0,1), (0,2))=(0,1)$
  as well as
 \eqref{mix} with $\bu_1=(1,0),\bu_2=(0,1)$ and all $c^i=0$ except that $c^1((0,0), (1,0), (2,0))=
 c^2((0,0),(0,1), (0,2))=1$. Also \eqref{D22} becomes
 \beqn
\lt[ \cM^{00}\cap (\cM^{00}-(1,0))\cap (\cM^{00}-(\tau,0))\rt] \bigcup \lt[(\cM^{00}+(\tau-1,0))\cap (\cM^{00}+(2\tau-1,0)\rt]&\neq& \emptyset\\
\lt[ \cM^{00}\cap (\cM^{00}-(0,1))\cap (\cM^{00}-(0,\tau))\rt] \bigcup \lt[(\cM^{00}+(0,\tau-1))\cap (\cM^{00}+(0,2\tau-1)\rt]&\neq&\emptyset
 \eeqn
 which hold for any $\tau<m$. 
}

\end{ex}
\commentout{
\begin{ex}\label{ex:perturb} Consider the irregular perturbations to the raster scan:
\beq
\label{perturb2}
\bt_{kl}=\tau(k,l)+(\delta^1_k, \delta^2_l), \quad k,l=0,\dots, q-1 
\eeq
where $ \delta^1_k, \delta^2_l \in \IZ$ represent irregular perturbations to the raster scan of stepsize $\tau$. 
Consider the triplets of shifts, $(\bt_{k,l}, \bt_{k,l+1}, \bt_{k,l+2}), (\bt_{kl}, \bt_{k+1,l}, \bt_{k+2,l})$,  and choose small integers, e.g.
$p^1_1=p^2_1=2, p^1_2=p^2_2=1$.  We have
\beq
2(\bt_{k+1,l}-\bt_{kl})-(\bt_{k+2,l}-\bt_{kl})&=&(2\delta_{k+1}^1-\delta^1_{k}-\delta^1_{k+2}, 0)\\
2(\bt_{k,l+1}-\bt_{kl})-(\bt_{k,l+2}-\bt_{kl})&=&(0,2\delta_{l+1}^2-\delta^2_{l}-\delta^2_{l+2})
\eeq
to satisfy \eqref{200.13} with the righthand side $\ba^1(k,l)$ and $\ba^2(k,l)$.


Consider the simple choice $\bu_1=(1,0), \bu_2=(0,1).$ Then the mixing condition \eqref{mix} says   to find $ c_j(k,l), j=1,2,$ such that
\beq
\sum_{k=0}^{q-1} c_1(k)(2\delta_{k+1}^1-\delta^1_{k}-\delta^1_{k+2}) &=&1\\
\sum_{l=0}^{q-1} c_2(l)(2\delta_{l+1}^2-\delta^2_{l}-\delta^2_{l+2}) &=&1.
\eeq
Such solutions always exist if the elements of both $\{2\delta_{k+1}^1-\delta^1_{k}-\delta^1_{k+2}: k=0,\dots, q-1\}$
and $\{2\delta_{l+1}^2-\delta^2_{l}-\delta^2_{l+2}:l=0,\dots, q-1\}$ are co-prime, which is highly probable  for sufficiently large $q$. 



\end{ex}
}

The next example concerns slightly perturbed raster scan.

\begin{ex}\label{ex:mix}
Consider small perturbations to the raster scan:
\beq
\label{perturb}
\bt_{kl}=\tau (k,l)+(\delta^1_{k},\delta^2_{l}),\quad k,l=0,\dots,q-1
\eeq
where $\tau=n/q$, $\bt_{ql}=\bt_{0l},\bt_{kq}=\bt_{0l}$ (the periodic boundary condition) and $ \delta^1_{k}, \delta^2_{l}$ are small integers. 

Consider the triplets 
\[
 (\bt_{k-1, l},\bt_{k,l},\bt_{k+1,l}), \quad (\bt_{k,l-1},\bt_{k,l},\bt_{k,l+1})
 \]
and set
$p^1_1=p^2_1=1, p^1_2=p^2_2=1$. For $k,l=1,\cdots, q-2$, 
\beqn
(\bt_{k+1,l}-\bt_{kl}) + (\bt_{k-1,l}-\bt_{kl})&=&(\delta_{k+1}^1+\delta^1_{k-1}-2\delta^1_{k},0):= \ba^1_{kl}\\
(\bt_{k,l+1}-\bt_{kl})+(\bt_{k,l-1}-\bt_{kl})&=&(0,\delta_{l+1}^2+\delta^2_{l-1}-2\delta^2_{l}):= \ba^2_{kl}
\eeqn
 satisfy \eqref{200.13} with the righthand side equal to $\ba^1_{kl}$ and $\ba^2_{kl}$.
  Define
\beqn
\bs^{1+}_{kl}=\bt_{k+1,l}-\bt_{kl} &=& (\tau,0)+(\delta^1_{k+1}-\delta^1_{k},0)\\
\bs^{1-}_{kl}=\bt_{k-1,l}-\bt_{kl}& = & (-\tau,0)+(\delta^1_{k-1}-\delta^1_{k},0)\\
\bs^{2+}_{kl}= \bt_{k,l+1}-\bt_{kl}&=& (0,\tau)+(0,\delta^2_{l+1}-\delta^2_{l})\\
\bs^{2-}_{kl}=\bt_{k,l-1}-\bt_{kl}&= &(0,- \tau)+(0,\delta^2_{l-1}-\delta^2_{l}).
\eeqn




 
 For \eqref{D22} consider for $j=1,2$ just two paths 
 \beqn
 \sigma^j_1: (1,1)\longrightarrow (1,0)\longrightarrow (0,0)\\
  \sigma^j_2: (1,1)\longrightarrow (0,1)\longrightarrow (0,0)
  \eeqn
   with the respective sets of validity 
\beq
\Sigma_{kl}(\sigma^j_1,\bs^{j+}_{kl},\bs^{j-}_{kl})&=&\cM^{kl}\cap (\cM^{kl}-\bs^{j+}_{kl})\\
\Sigma_{kl}(\sigma^j_2, \bs^{j+}_{kl},\bs^{j-}_{kl})&=&\cM^{kl}\cap (\cM^{kl}-\bs^{j-}_{kl}).
\eeq
Then
\beqn
\Sigma_{kl}(\sigma^j_1, \bs^{j+}_{kl},\bs^{j-}_{kl})\cap\cM^{kl}\cap  (\cM^{kl}-\ba^j_{kl})\supseteq (\cM^{kl}-\bs^{j+}_{kl})\cap (\cM^{kl}+|\ba^j_{kl}|)\\
\Sigma_{kl}(\sigma^j_2, \bs^{j+}_{kl},\bs^{j-}_{kl})\cap\cM^{kl}\cap  (\cM^{kl}-\ba^j_{kl})\supseteq (\cM^{kl}-\bs^{j-}_{kl})\cap (\cM^{kl}-|\ba^j_{kl}|) 
\eeqn
provided that
\beq
\label{small3}
|\bs^{j\pm}_{kl}|\ge |\ba_{kl}^j| 
\eeq
where $|\cdot|$ is taking the absolute value component-wise.  

We hope to show that for each $(k,l)$
\beq
\label{81}
\bigcup_{\bt\in \cT} \lt[\bt-\bt_{kl}+(\cM^{kl}-\bs^{j+}_{kl})\cap (\cM^{kl}+|\ba^j_{kl}|)\cup (\cM^{kl}-\bs^{j-}_{kl})\cap (\cM^{kl}-|\ba^j_{kl}|) \rt]=\IZ_n^2.
\eeq
For $j=1$, \eqref{81} becomes
\beq\label{80'}
&&\bigcup_{k',l'}\lt[\lt(\lb \|\ba^1_{kl}\|, m-1-\tau-\delta^1_{k+1}+\delta^1_k\rb \cup\lb \tau-\delta^1_{k-1}+\delta^1_k, m-1-\|\ba^1_{kl}\|\rb\rt) \rt.\\
&&\quad \quad \lt. \times \lb 0, m-1\rb+\tau(k'-k,l'-l)+(\delta_{k'}^1-\delta^1_k,\delta^2_{l'}- \delta^2_l) \rt]=\IZ_n^2.\nn
\eeq
Note that if 
\beq
\label{small1}
m&\ge &2\tau+\delta^1_{k+1}-\delta^1_{k-1}
\eeq
then
\[
\lb \|\ba^1_{kl}\|, m-1-\tau-\delta^1_{k+1}+\delta^1_k\rb \cup\lb \tau-\delta^1_{k-1}+\delta^1_k, \|\ba^1_{kl}\|\rb=\lb \|\ba^1_{kl}\|, m-1-\|\ba^1_{kl}\|\rb
\]
and if, for all $k'$, 
\beq
\tau+\delta^1_{k'+1}-\delta^1_{k'}+\|\ba^1_{kl}\|\le m-1 - \|\ba^1_{kl}\|\label{small4} 
\eeq
then the terms on the left side of \eqref{80'} overlap with their neighbors and hence \eqref{81} holds for $j=1$.  
%Hence \eqref{D22} is satisfied. 
 Likewise \eqref{81} holds for $j=2$ under 
 \beq
 m&\ge & 2\tau+\delta^2_{l+1}-\delta^2_{l-1},\quad\forall l, \label{small2}
 \eeq
 and
 \beq
\tau+\delta^2_{l'+1}-\delta^2_{l'}+\|\ba^2_{kl}\|\le m-1 - \|\ba^2_{kl}\|,\quad\forall k, \ell, \ell'.\label{small5} 
\eeq


To satisfy \eqref{mix} with $\bu_1=(1,0), \bu_2=(0,1)$, we only need $\ba^j_{kl}$ to be coprime, i.e.
\beq
\label{gcd}
\gcd_{k,l}\{\|\ba^j_{kl}\|\}=1, \quad  j=1,2, 
\eeq
which is highly probable for large number of small random integers. 


The moral of the perturbation conditions: \eqref{small3} and \eqref{small4}-\eqref{small5} mean that
the perturbations are small relative to $\tau$ and $m-\tau$ while \eqref{small1} and \eqref{small2} mean 
that adjacent blocks overlap at least $50\%$ in both directions. Under these conditions and \eqref{gcd}, the perturbed raster scan
is a mixing scheme. 



\end{ex}



\commentout{%10/22/2018
\begin{ex}\label{ex:mix}
Consider small perturbations to the raster scan:
\beq
\label{perturb}
\bt_{kl}=\tau (k,l)+(\delta^1_{kl},\delta^2_{kl}),\quad k,l=0,\dots,q-1
\eeq
where $\bt_{ql}=\bt_{0l},\bt_{kq}=\bt_{0l}$ (the periodic boundary condition) and $ \delta^1_{kl}, \delta^2_{kl}$ are small integers. 

Consider the triplets 
\[
 (\bt_{k-1, l},\bt_{k,l},\bt_{k+1,l}), \quad (\bt_{k,l-1},\bt_{k,l},\bt_{k,l+1})
 \]
and set
$p^1_1=p^2_1=1, p^1_2=p^2_2=1$. For $k,l=1,\cdots, q-2$, 
\beqn
(\bt_{k+1,l}-\bt_{kl}) + (\bt_{k-1,l}-\bt_{kl})&=&(\delta_{k+1,l}^1+\delta^1_{k-1, l}-2\delta^1_{kl}, \delta_{k+1,l}^2+\delta^2_{k-1, l}-2\delta^2_{kl}):= \ba^1_{kl}\\
(\bt_{k,l+1}-\bt_{kl})+(\bt_{k,l-1}-\bt_{kl})&=&(\delta_{k,l+1}^1+\delta^1_{k,l-1}-2\delta^1_{k,l},\delta_{k,l+1}^2+\delta^2_{k,l-1}-2\delta^2_{k,l}):= \ba^2_{kl}
\eeqn
 satisfy \eqref{200.13} with the righthand side equal to $\ba^1_{kl}$ and $\ba^2_{kl}$.
 
 To simplify the discussion,  we design the scheme so that for a number of  $(k,l)$
\beq
\label{78}
\delta^2_{k+1,l}-\delta^2_{kl}=\delta^2_{k-1,l}-\delta^2_{kl}=0,\quad \delta^1_{k,l+1}-\delta^1_{kl}=\delta^1_{k,l-1}-\delta^1_{kl}=0
\eeq
and hence
\beqn
 \ba^1_{kl}&=& (\delta_{k+1,l}^1+\delta^1_{k-1, l}-2\delta^1_{kl}, 0)\\
 \ba^2_{kl}&=&(0,\delta_{k,l+1}^2+\delta^2_{k,l-1}-2\delta^2_{k,l}).
 \eeqn
 Define
\beqn
\bs^{1+}_{kl}=\bt_{k+1,l}-\bt_{kl} &=& (\tau,0)+(\delta^1_{k+1,l}-\delta^1_{kl},0)\\
\bs^{1-}_{kl}=\bt_{k-1,l}-\bt_{kl}& = & (-\tau,0)+(\delta^1_{k-1,l}-\delta^1_{kl},0)\\
\bs^{2+}_{kl}= \bt_{k,l+1}-\bt_{kl}&=& (0,\tau)+(0,\delta^2_{k,l+1}-\delta^2_{kl})\\
\bs^{2-}_{kl}=\bt_{k,l-1}-\bt_{kl}&= &(0,- \tau)+(0,\delta^2_{k,l-1}-\delta^2_{kl}).
\eeqn




 
 For \eqref{D22} consider for $j=1,2$ just two paths 
 \beqn
 \sigma^j_1: (1,1)\longrightarrow (1,0)\longrightarrow (0,0)\\
  \sigma^j_2: (1,1)\longrightarrow (0,1)\longrightarrow (0,0)
  \eeqn
   with the respective sets of validity 
\beq
\Sigma_{kl}(\sigma^j_1,\bs^{j+}_{kl},\bs^{j-}_{kl})&=&\cM^{kl}\cap (\cM^{kl}-\bs^{j+}_{kl})\\
\Sigma_{kl}(\sigma^j_2, \bs^{j+}_{kl},\bs^{j-}_{kl})&=&\cM^{kl}\cap (\cM^{kl}-\bs^{j-}_{kl}).
\eeq


Then
\beqn
\Sigma_{kl}(\sigma^j_1, \bs^{j+}_{kl},\bs^{j-}_{kl})\cap\cM^{kl}\cap  (\cM^{kl}-\ba^j_{kl})\supseteq (\cM^{kl}-\bs^{j+}_{kl})\cap (\cM^{kl}+|\ba^j_{kl}|)\\
\Sigma_{kl}(\sigma^j_2, \bs^{j+}_{kl},\bs^{j-}_{kl})\cap\cM^{kl}\cap  (\cM^{kl}-\ba^j_{kl})\supseteq (\cM^{kl}-\bs^{j-}_{kl})\cap (\cM^{kl}-|\ba^j_{kl}|) 
\eeqn
provided that
\beq
\label{small1}
|\bs^{j\pm}_{kl}|\ge |\ba_{kl}^j| 
\eeq
where $|\cdot|$ is taking the absolute value component-wise.  

We hope to show that for each $(k,l)$
\beq
\label{81}
\bigcup_{\bt\in \cT} \lt[\bt-\bt_{kl}+(\cM^{kl}-\bs^{j+}_{kl})\cap (\cM^{kl}+|\ba^j_{kl}|)\cup (\cM^{kl}-\bs^{j-}_{kl})\cap (\cM^{kl}-|\ba^j_{kl}|) \rt]=\IZ_n^2
\eeq
if 
%$ m-\tau-\delta^1_{k+1,l}+\delta^1_{kl}\ge \tau- \delta^1_{k-1,l}+\delta^1_{kl}$ or equivalently
\beq
\label{small1}
m\ge 2\tau+\delta^1_{k+1,l}-\delta^1_{k-1,l}\\
m\ge 2\tau+\delta^2_{k,l+1}-\delta^2_{k,l-1} \label{small2}
\eeq
which means approximately $50\%$ overlapping ratio between adjacent blocks in both directions
 for small $\delta^1_{k+1,l}-\delta^1_{k-1,l}$, $\delta^2_{k,l+1}-\delta^2_{k,l-1}$.

The domain $D_{kl}(\ba^j_{kl})$ in \eqref{domain} contains \[
\bigcup_{\bt\in \cT}[\bt\oplus (\Sigma_{kl}(\sigma^j_1)\cup \Sigma_{kl}(\sigma^j_2))]\supseteq \bigcup_{\bt\in \cT}[\bt\oplus \cM^{kl}]\supseteq\IZ_n^2
\]
where the last inequality is true for any $(k,l)$. Hence \eqref{D22} is satisfied. 

To satisfy \eqref{mix} with $\bu_1=(1,0), \bu_2=(0,1)$, we only need $\ba^j_{kl}$ to be coprime, i.e.
\[
\gcd(\{|\ba^j_{kl}|\})=1, \quad  j=1,2, 
\]
which is highly probable for large number of small random integers. 

\commentout{%10/18/2018
 As in Example \ref{ex:raster} consider the triplets \eqref{triple}, set
$p^1_1=p^2_1=2, p^1_2=p^2_2=1$ and reduce the indices from three ($\ell_0,\ell_1,\ell_2$) to two ($k,l$) in the definition of the mixing property. We have
\beqn
2(\bt_{k+1,l}-\bt_{kl})-(\bt_{k+2,l}-\bt_{kl})&=&(2\delta_{k+1,l}^1-\delta^1_{kl}-\delta^1_{k+2,l}, 2\delta_{k+1,l}^2-\delta^2_{kl}-\delta^2_{k+2,l}):= \ba^1_{kl}\\
2(\bt_{k,l+1}-\bt_{kl})-(\bt_{k,l+2}-\bt_{kl})&=&(2\delta_{k,l+1}^1-\delta^1_{kl}-\delta^1_{k,l+2},2\delta_{k,l+1}^2-\delta^2_{kl}-\delta^2_{k,l+2}):= \ba^2_{kl}
\eeqn
to satisfy \eqref{200.13} with the righthand side equal to $\ba^1_{kl}$ and $\ba^2_{kl}$.
 
 For \eqref{D22} consider for $j=1,2$ just the three paths $\sigma^j_1, \sigma^j_2,\sigma^j_3$ with
\beq
\Sigma_{kl}(\sigma^j_1)&=&\cM^{kl}\cap (\cM^{kl}-\bs^{j1}_{kl})\cap (\cM^{kl}-\ba^j_{kl})\\
\Sigma_{kl}(\sigma^j_2)&=&(\cM^{kl}-\bs^{j1}_{kl}+\bs^{j2}_{kl})\cap (\cM^{kl}+\bs^{j2}_{kl})\\\
\Sigma_{kl}(\sigma^j_3)&=&\cM^{kl}\cap (\cM^{kl}-\bs^{j1}_{kl}+\bs^{j2}_{kl})
\eeq
where 
\beqn
\bs^{11}_{kl}&=&(\tau,0)+(\delta^1_{k+1,l}-\delta^1_{kl},\delta^2_{k+1,l}-\delta^2_{kl})\\
\bs^{12}_{kl}&=&(2\tau,0)+(\delta^1_{k+2,l}-\delta^1_{kl},\delta^2_{k+2,l}-\delta^2_{kl})\\
\bs^{21}_{kl}&=& (0,\tau)+(\delta^1_{k,l+1}-\delta^1_{kl},\delta^2_{k,l+1}-\delta^2_{kl})\\
\bs^{22}_{kl}&=& (0,2\tau)+(\delta^1_{k,l+2}-\delta^1_{kl},\delta^2_{k,l+2}-\delta^2_{kl}).
\eeqn
Here we omit writing the dependence on $\bt_{k+1,l}-\bt_{kl}, \bt_{k+2,l}-\bt_{kl}, \bt_{k,l+1}-\bt_{kl}$ and $\bt_{k,l+2}-\bt_{kl}$ for ease of notation. 
}


\commentout{%10/18/2018
For simplicity of presentation, set $\bu_1=(1,0), \bu_2=(0,1), \delta^1_{kl}=\delta^1_k, \delta^2_{kl}=\delta^2_{l}$ for all $k,l,$ 
to have $\ba^1_{kl}=(2\delta_{k+1}^1-\delta^1_{k}-\delta^1_{k+2},0), \ba^2_{kl}=(0, 2\delta_{l+1}^2-\delta^2_{l}-\delta^2_{l+2})$. 
Then the mixing condition \eqref{mix} says   to find $ c^j_{i}$ such that
\beq\label{r11}
\sum_{k=0}^{q-1} c^1_{k}(2\delta_{k+1}^1-\delta^1_{k}-\delta^1_{k+2}) &=&1\\
\label{r12}\sum_{l=0}^{q-1} c^2_{l}(2\delta_{l+1}^2-\delta^2_{l}-\delta^2_{l+2}) &=&1.
\eeq

In general, \eqref{r11}-\eqref{r12} have solutions if $\{2\delta_{i+1}^j-\delta^j_{i}-\delta^j_{i+2}\}_{i=0}^{q-1}$
are co-prime, a highly probable statement for  independently distributed small integers $\delta^j_{i}$ (e.g. $\in \{-1,0,1\}$) 
and sufficiently large $q$. 
}


\end{ex}
}

\commentout{%10/18/2018
\subsection{Five-part coupling}
Without full generality, we discuss 5-part coupling in
the setting of the perturbed raster scan in Example \ref{ex:mix}. The purpose is to extend Theorem \ref{thm:mix} and Corollary \ref{cor:mix} to the case without the assumption \eqref{78}. 


For  the quintuples
\[
(\bt_{k-2,l}, \bt_{k-1,l}, \bt_{kl}, \bt_{k+1,l}, \bt_{k+2,l}),\quad
(\bt_{k,l-2}, \bt_{k, l-1}, \bt_{kl}, \bt_{k,l+1}, \bt_{k, l+2})
\]
we have
\beqn
&&\bt_{k-2,l}+\bt_{k-1,l}+\bt_{k+1,l}+ \bt_{k+2,l}-4\bt_{kl}\\
&&=(\delta^1_{k-2,l}+\delta^1_{k-1,l}+\delta^1_{k+1,l}+\delta^1_{k+2,l}-4\delta^1_{kl}, \delta^2_{k-2,l}+\delta^2_{k-1,l}+\delta^2_{k+1,l}+\delta^2_{k+2,l}-4\delta^2_{kl})\\
&&\bt_{k,l-2}+\bt_{k,l-1}+\bt_{k,l+1}+ \bt_{k,l+2}-4\bt_{kl}\\
&&=(\delta^1_{k,l-2}+\delta^1_{k,l-1}+\delta^1_{k,l+1}+\delta^1_{k,l+2}-4\delta^1_{kl}, \delta^2_{k,l-2}+\delta^2_{k,l-1}+\delta^2_{k,l+1}+\delta^2_{k,l+2}-4\delta^2_{kl}).
\eeqn
The paths of reduction are constructed in the lattice $\IZ^4$ with
the bases 
\[
\{\bt_{k-2,l}-\bt_{kl}, \bt_{k-1,l}-\bt_{kl}, \bt_{k+1,l}-\bt_{kl}, \bt_{k+2,l}-\bt_{kl}\}
\]
and 
\[
\{\bt_{k,l-2}-\bt_{kl}, \bt_{k,l-1}-\bt_{kl}, \bt_{k,l+1}-\bt_{kl}, \bt_{k,l+2}-\bt_{kl}\}
\] for the respective directions. 

}

\commentout{%09/19/2018
 
\section{Absence of phase drift}
\label{sec:u2}

In this section, we discuss a way to eliminate the affine phase ambiguity in the lattice scheme. This is accomplished by the imposing the size of the random mask
and the observation that for any cyclic group $\cT$ the block phases form an arithmetic progression. 

\begin{theorem} \label{thm:u2} In addition to the assumptions of Theorem \ref{thm:mix} or Theorem \ref{lem2}, suppose that 
\beq
\label{u2}
n\delta \le 2(m-\tau),\quad \mbox{(equivalently,  $q\delta \le 2(p-1)$)}.
\eeq
Then 
\beq
\label{40}
\nu^{k}\odot g^k=e^{\im \theta}\mu^{k}\odot f^k,\quad\forall k=0,\dots,q-1,
\eeq
for some constant $\theta\in \IR$ independent of $k$. 

\end{theorem}
\begin{proof}

Without loss of generality, we focus on the case of the lattice scheme.
The theorem follows easily from the arithmetic progression of $\{\theta_k\}$ and
MPC. 


By \eqref{200.4'}-\eqref{200.4}, 
\beqn
e^{\im \theta_k}\nu^k(\bn)/\mu^k(\bn)=e^{\im \theta_{k+1}}\nu^{k+1}(\bn)/\mu^{k+1}(\bn),\quad
\forall \bn\in \cM^k\cap \cM^{k+1}\cap \supp(f^k)
\eeqn
and by Theorem \ref{lem2}
\[
 \theta_k=k\Delta \theta,\quad k=0,\dots,q-1
 \]
where $\Delta \theta$ is any $q$-th root of unity. 

If $\Delta \theta$ is an integer multiple of $2\pi$, then the phase of 
$\nu^0(\bn)/\mu^0(\bn)$ 
would grow out of the mask phase constraint  under the constraint $q\delta \le 2(p-1)$.  

\end{proof}
}


\section{Conclusion}\label{sec:con}
Under the mask phase constraint and for a strongly connected object with an anchoring part, we have proved that ambiguities in blind ptychography are manifest in the block phase which can vary from block to block (Theorem \ref{thm:u}, Corollary \ref{thm:u0}  and Theorem \ref{thm:many}). We have shown by examples (Examples \ref{ex0} and \ref{ex3.1}) that
both the mask phase constraint and the anchoring assumption are necessary. 

We have introduced the mixing schemes for which the object and mask can be simultaneously
recovered up to
 a scaling constant factor and an affine phase factor (Theorem \ref{thm:mix}, Corollary \ref{cor:mix}). 
We have  given concrete examples  (Examples \ref{ex:raster} and \ref{ex:mix}) of the mixing schemes including irregular perturbations
of the raster scan. Our uniqueness theory gives a rigorous explanation for the minimum overlapping ratio of $50\%$ for empirical blind ptychography  \cite{overlap,ePIE09}.  

Recently \cite{DRS-ptych}, we have developed ptychographic reconstruction algorithms based on the uniqueness
theory developed here and demonstrated excellent performance with the measurement schemes discussed in Example  \ref{ex:mix}.
In particular, the mask phase constraint enables an initialization method that yields global, geometrical convergence
of the iteration. 

\commentout{%09/19/2018
For the lattice scheme, we have shown that the block phases along any cyclic subgroup forms an arithmetic progression
(Theorem \ref{lem2}).  However, additional ambiguities are inherent to the lattice scheme: First, the raster grid pathology
of  degrees of freedom  proportional to the squared stepsize (Theorem \ref{thm:recovery}) and, second, an arithmetically progressing phase shift from block to block that directly mimics the block phase structure (Example \ref{ex4} and \ref{ex5}). 


For both the lattice and the mixing schemes, the affine phase ambiguity in the block phases disappear under a mask-size constraint (Theorem \ref{thm:u2}). 
}

 \appendix
 
 \section{Proof of Theorem \ref{thm:u}}\label{sec:proof}
%\begin{proof} (Theorem \ref{thm:u})

Let  $\bN=(m,m)$. Applying  Corollary \ref{cor1} to both $\cM^0$ and $\cM^\bt$
we have the following alternatives: For  some $\mbm_1,\mbm_2\in \IZ^2, \theta_1,\theta_2\in \IR$.
\beq
\label{1.60}
g^0(\bn)&=& e^{\im \theta_1} f^0(\bn + \mbm_1)\mu^0(\bn + \mbm_1)/\nu^0(\bn) \\
\nn\mb{\rm or\quad Twin}(g^0)(\bn)&=& e^{-\im \theta_1} f^0(\bn+\mbm_1) \mu^0(\bn +\mbm_1)/\mb{\rm Twin}(\nu^0)(\bn),\quad\forall \bn \in \cM^0
\eeq
and
\beq
\label{1.70}
g^\bt(\bn)&=&e^{\im \theta_2} f^\bt(\bn + \mbm_2)\mu^\bt(\bn + \mbm_2)/\nu^\bt(\bn) \\
\nn\mb{\rm or\quad Twin}(g^\bt)(\bn)&=& e^{-\im \theta_2} f^\bt(\bn+\mbm_2) \mu^\bt(\bn +\mbm_2)/\mb{\rm Twin}(\nu^\bt)(\bn),\quad\forall \bn \in \cM^\bt.
\eeq
Note that $\mbox{\rm Twin}(g^\bt)(\bn)=\bar g^\bt(\bN+2\bt-\bn)$ so  we can write
\beq
\label{1.6}
g^0(\bn)&=& e^{\im \theta_1} f^0(\bn + \mbm_1)\mu^0(\bn + \mbm_1)/\nu^0(\bn) \\
\nn&\mbox{\rm or}& e^{\im \theta_1} \bar f^0(\bN-\bn+\mbm_1)\bar \mu^0(\bN-\bn +\mbm_1)/\nu^0(\bn),\quad\forall \bn \in \cM^0
\eeq
and
\beq
\label{1.7}
g^\bt(\bn)&=&e^{\im \theta_2} f^\bt(\bn + \mbm_2)\mu^0(\bn + \mbm_2-\bt)/\nu^0(\bn-\bt) \\
\nn&\mbox{\rm or}& e^{\im \theta_2} \bar f^\bt(\bN+2\bt-\bn +\mbm_2)\bar\mu^0(\bN+\bt-\bn +\mbm_2)/\nu^0(\bn-\bt),\quad\forall \bn \in \cM^\bt
\eeq
for  some $\mbm_1,\mbm_2\in \IZ, \theta_1,\theta_2\in \IR$ where
we have used the relation $\mu^\bt(\cdot)=\mu^0(\cdot-\bt),\nu^\bt(\cdot)=\nu^0(\cdot-\bt)$. Note that
$\bN$ and $\bN+\bt=(m+t_1, m+t_2)$  are the upper-right corners of $\cM^0$ and $\cM^\bt$, respectively. 
\commentout{
\beq
\label{1.6}
g^0(\bn)&=& e^{\im \theta_1} f^0(\bn + \mbm_1)\mu^0(\bn + \mbm_1)/\nu^0(\bn) \\
\nn\mb{\rm or\quad Twin}(g^0)(\bn)&=& e^{-\im \theta_1} f^0(\bn+\mbm_1) \mu^0(\bn +\mbm_1)/\mb{\rm Twin}(\nu^0)(\bn),\quad\forall \bn \in \cM^0
\eeq
and
\beq
\label{1.7}
g^\bt(\bn)&=&e^{\im \theta_2} f^\bt(\bn + \mbm_2)\mu^\bt(\bn + \mbm_2)/\nu^\bt(\bn) \\
\nn\mb{\rm or\quad Twin}(g^\bt)(\bn)&=& e^{-\im \theta_2} f^\bt(\bn+\mbm_2) \mu^\bt(\bn +\mbm_2)/\mb{\rm Twin}(\nu^\bt)(\bn),\quad\forall \bn \in \cM^\bt
\eeq
for some $\mbm_1,\mbm_2, \theta_1,\theta_2$. 
}

In view of  \eqref{shifts2}, \eqref{1.60} implies 
$\mbm_1\in T_0$. 


We now focus on the intersection $\cM^0\cap \cM^\bt$ where \eqref{1.6} and \eqref{1.7}
both hold. We have then four possible ambiguities from the crossover of the alternatives in \eqref{1.6} and \eqref{1.7}.  

{\bf Case (i).} The combination of the first alternatives in \eqref{1.6} and \eqref{1.7} imply that for all $\bn\in \cM^0\cap \cM^\bt$
\beq
\label{1.9}
{e^{\im\theta_1}f^0(\bn + \mbm_1 )\mu^0(\bn + \mbm_1)/\nu^0(\bn)}
&=&e^{\im \theta_2}  f^\bt(\bn + \mbm_2 )\mu^0(\bn-\bt + \mbm_2)/\nu^0(\bn-\bt)\nn
\eeq
provided that $f^0(\bn+\mbm_1)$ and $f^\bt(\bn+\mbm_2)$ are both zero or nonzero. 

We now show that with high probability \eqref{1.9} fails to hold  for some  $\bn\in \cM^0\cap \cM^\bt$.  

Consider any $ \bn\in S_0(\mbm_1)$ (hence  
$f^0(\bn+\mbm_1)\neq 0$) and assume that $f^\bt(\bn+\mbm_2)\neq 0$. Otherwise, 
\eqref{1.9} holds with probability zero. 

We obtain by taking logarithm on both sides of \eqref{1.9} that  \beq
\label{1.10}
&&\ln{\mu^0(\bn+\mbm_1)}+\ln{\mu^0(\bn-\bt)}-\ln{\mu^0(\bn-\bt+\mbm_2)}-\ln{\mu^0(\bn)}\\
&=&\im\theta_2-\im\theta_1  -\ln{f^0(\bn+\mbm_1)}+\ln{f^\bt(\bn+\mbm_2)}+\ln \alpha(\bn)-\ln \alpha(\bn-\bt)\nn\\
&&+\im\phi(\bn)-\im\phi(\bn-\bt)\nn
\eeq
modulo  $\im 2\pi$. We want to show that if $\lt|S_0(\mbm_1)\rt|$ is sufficiently large
then \eqref{1.10} holds with at most exponentially small probability. 


Since $\bn\in \cM^0\cap\cM^\bt$,  $\bn+\mbm_1\in \cM^0$ and $\bn+\mbm_2\in \cM^\bt$,  the four points associated with the lefthand side of \eqref{1.10}, $\bn+\mbm_1, \bn-\bt, \bn+\mbm_2-\bt,\bn$,  belong in $ \cM^0$. 
Hence the four random variables on the lefthand side of \eqref{1.10} are well-defined and have a finite value. 

The two sub-sets $
\{\bn+\mbm_1, \bn-\bt\}, \{\bn+\mbm_2-\bt,\bn\}$  can not be identical unless
$\mbm_1=\mbm_2=0$. In other words,  if either $\mbm_1\neq 0$ or $\mbm_2\neq 0$, then
the imaginary part $\Theta_1$ of the  lefthand side of \eqref{1.10} 
\beq
\label{r3}
\Theta_1:=\theta(\bn+\mbm_1)+\theta(\bn-\bt)- \theta(\bn-\bt+\mbm_2)-\theta(\bn)
\eeq
is the sum of two, three or four independent random variables and hence the support set of its probability density contains $(-2\gamma\pi,2\gamma\pi]$. 

On the righthand side of \eqref{1.10}, however, as $f^0(\bn+\mbm_1)$ and $f^\bt(\bn+\mbm_2)$ are deterministic, the phase fluctuation is determined by $\phi(\bn)-\phi(\bn-\bt)$ which ranges over the interval $(-2\delta\pi,2\delta\pi]$ due to
the constraint \eqref{u1}. Consequently  \eqref{1.10} holds true with
probability at most 
\beqn
p_1:=\max_{a\in \IR}\mbox{\rm Pr} \{\Theta_1\in (a-2\delta\pi, a+2\delta\pi]\}<1,
\eeqn
for each $\bn$, since $\delta<\min(\gamma,\half)$. 

For all $\bn \in S_0(\mbm_1)$,  there are at least $|S_0(\mbm_1)|/4!$ statistically independent  instances, corresponding to the number of  {\em non-intersecting} $
 \{\bn+\mbm_1,\bn-\bt, \bn+\mbm_2-\bt,\bn\}$. 
 Therefore \eqref{1.10} holds true 
 with probability at most $p_1^{|S_0(\mbm_1)|/4!}$ unless $\mbm_1=\mbm_2=0$. 

On the other hand, for $\mbm_1=\mbm_2=0$, the desired result \eqref{masked1}-\eqref{masked2} follows directly from the first alternatives in \eqref{1.6} and \eqref{1.7}. 

{\bf Case (ii).}  Consider the combination of the first alternative in \eqref{1.6} and the second alternative in \eqref{1.7} that for $\bn\in \cM^0\bigcap\cM^\bt$ 
\beq\label{1.12'}
g(\bn)&=&e^{\im \theta_1} f^0(\bn + \mbm_1 )\mu^0(\bn + \mbm_1)/\nu^0(\bn)\\
&=&e^{\im \theta_2} \bar f^\bt(\bN+2\bt-\bn +\mbm_2)\bar \mu^0 (\bN+\bt-\bn +\mbm_2)/\nu^0(\bn-\bt),\nn
\eeq
provided that $f^0(\bn + \mbm_1 )$ and $\bar f^\bt(\bN+2\bt-\bn +\mbm_2 )$ are  
both zero or nonzero.

Consider  any $ \bn\in S_0(\mbm_1)$ (hence  
$f^0(\bn+\mbm_1)\neq 0$) and  assume $\bar f^\bt(\bN+2\bt-\bn+\mbm_2)\neq 0$. Otherwise \eqref{1.12'} is false and can be ruled out. 


Taking logarithm and rearranging terms in \eqref{1.12'} we have
\beq\label{1.12}
&&{\ln{\mu^0(\bn+\mbm_1)}+\ln{\mu^0(\bn-\bt)}-\ln{\bar\mu^0(\bN+\bt-\bn+\mbm_2)}}-  \ln{\mu^0(\bn)}\\
&=&\im\theta_2-\im\theta_1-\ln{f^0(\bn+\mbm_1)}+\ln{\bar f^\bt(\bN+2\bt-\bn+\mbm_2)}+\ln \alpha(\bn)-\ln \alpha(\bn-\bt)\nn\\
&&+ \im \phi(\bn)-\im\phi(\bn-\bt).\nn
\eeq
The imaginary parts of the lefthand side of \eqref{1.12} 
\beq
\label{1.120}
\Theta_2:=\theta(\bn+\mbm_1)+\theta(\bn-\bt)+\theta(\bN+\bt-\bn+\mbm_2)-\theta(\bn)
\eeq
is the sum of two, three or four independent random variables unless
\beqn
\mbm_1=0,\quad \bn=\bt+\half(\bN+\mbm_2)
\eeqn
or
\beqn
\mbm_1=-\bt,\quad 2\bn=\bN+\bt+\mbm_2,
\eeqn
(in both cases  $\Theta_2=2\theta(\bn-\bt)$). Since $|S_0(\mbm_1)|\ge 2$,  there exists some $\bn\in S_0(\mbm_1)$ such that $\Theta_2$ is the sum of at least
two independent random variables and hence the support of its probability density function
contains $(-2\gamma\pi,2\gamma\pi]$. 
By the same argument as above, \eqref{1.12} holds true  with  probability at most $p_2^{|S_0(\mbm_1)|/4!}$ where
\[
p_2:=\max_{a\in \IR}\mbox{\rm Pr} \{\Theta_2\in (a-2\delta\pi, a+2\delta\pi]\}<1 
\]
since $\delta<\min(\gamma,\half)$. 

{\bf Case (iii).}  Consider the combination of the second alternative in \eqref{1.6} and the first alternative in \eqref{1.7}  that for $\bn\in \cM^0\bigcap\cM^\bt$ 
\beq\label{r7'}
g(\bn)&=& e^{\im \theta_1} \bar f^0(\bN-\bn +\mbm_1)\bar \mu^0 (\bN-\bn +\mbm_1)/\nu^0(\bn)\\
&=&e^{\im \theta_2} f^\bt(\bn + \mbm_2)\mu^0(\bn -\bt +\mbm_2)/\nu^0(\bn-\bt)  \nn
\eeq
provided that $f^0(\bn + \mbm_1 )$ and $f^\bt(\bN+2\bt-\bn +\mbm_2 )$ are  
both zero or nonzero.
Consider any $ \bn\in S'_0(\mbm_1)$ (hence  
$ \bar f^0(\bN-\bn +\mbm_1)\neq 0$) and assume $f^\bt(\bn+\mbm_2)\neq 0$. Otherwise \eqref{r7} can be ruled out. 


Taking logarithm and rearranging terms in \eqref{r7'} we have
\beq
\label{r7}
&&{\ln{\bar\mu^0(\bN- \bn+\mbm_1)}+\ln{\mu^0(\bn-\bt)}-\ln{\mu^0(\bn-\bt+\mbm_2)}}-  \ln{\mu^0(\bn)}\\
&=&\im\theta_2-\im\theta_1-\ln{\bar f^0(\bN-\bn+\mbm_1)}+\ln{f^\bt(\bn+\mbm_2)}+\ln \alpha(\bn)-\ln \alpha(\bn-\bt)\nn\\
&&+ \im \phi(\bn)-\im\phi(\bn-\bt).\nn
\eeq
The imaginary parts of the lefthand side of \eqref{r7} 
\beq
\label{r8}
\Theta_3:=-\theta(\bN-\bn+\mbm_1)+\theta(\bn-\bt)-\theta(\bn-\bt+\mbm_2)-\theta(\bn)
\eeq
is the sum of two, three or four independent random variables unless
\beqn
\mbm_2=\bt,\quad \bn=\half(\bN+\mbm_1+\bt)
\eeqn
or
\beqn
\mbm_2=0,\quad \bn=\half(\bN+\mbm_1)
\eeqn
(in both cases $\Theta_3=2\theta(\bn)$). Since $S'_0(\mbm_1)\ge 2$,  there exists some $\bn\in S_0(\mbm_1)$ such that $\Theta_2$ is the sum of at least
two independent random variables and hence the support of its probability density function
contains $(-2\gamma\pi,2\gamma\pi]$. 
By the same argument as above, \eqref{r7} holds true  with  probability at most $p_3^{|S'_0(\mbm_1)|/4!}$ where
\[
p_3:=\max_{a\in \IR}\mbox{\rm Pr} \{\Theta_3\in (a-2\delta\pi, a+2\delta\pi]\}<1 
\]
since $\delta<\min(\gamma,\half)$. 


{\bf Case (iv).}  Now consider the combination of the second alternatives in \eqref{1.6} and \eqref{1.7} that for $\bn\in \cM^0\bigcap\cM^\bt$ 
\beq
\label{r5}
g(\bn)&=&e^{\im \theta_1} \bar f^0(\bN-\bn +\mbm_1)\bar \mu^0 (\bN-\bn +\mbm_1)/\nu^0(\bn)\\
&=& e^{\im \theta_2} \bar f^\bt (\bN+2\bt-\bn +\mbm_2)\bar \mu^0 (\bN+\bt-\bn +\mbm_2)/\nu^0(\bn-\bt)\nn
\eeq
provided that $\bar f^0(\bN-\bn + \mbm_1 )$ and $\bar f^\bt(\bN+2\bt-\bn +\mbm_2 )$ are  
both zero or nonzero.


Consider any $ \bn\in S'_0(\mbm_1)$ (hence  
$ \bar f^0(\bN-\bn +\mbm_1)\neq 0$) and assume $ \bar f^\bt(\bN+2\bt-\bn+\mbm_2)\neq 0$. Otherwise \eqref{r5} is ruled out.

 After taking logarithm and rearranging terms for $\bn\in S_0'(\mbm_2)$  \eqref{r5} becomes
 \beq
\label{1.13}
&&{\ln{\bar\mu^0(\bN-\bn+\mbm_1)}+\ln{\mu^0(\bn-\bt)}-\ln{\bar\mu^0(\bN+\bt-\bn+\mbm_2)} -\ln{\mu^0(\bn)}}\\
&=&\im\theta_2-\im\theta_1- \ln{\bar f^0(\bN-\bn+\mbm_1)}+\ln{\bar f^\bt(\bN+2\bt-\bn+\mbm_2)}\nn\\
&& +\ln \alpha(\bn)-\ln \alpha(\bn-\bt)+\im\phi(\bn)-\im\phi(\bn-\bt).\nn
\eeq
The imaginary part of the lefthand side of \eqref{1.13} 
\beq
\label{1.130}
\Theta_4:=-\theta(\bN-\bn+\mbm_1)+\theta(\bn-\bt)+\theta(\bN+\bt-\bn+\mbm_2)-\theta(\bn)
\eeq
 is the sum of two, three or four independent random variables
unless 
\beqn
\bN+\bt-\bn+\mbm_2&=&\bn\\
\bN-\bn+\mbm_1&=& \bn-\bt
\eeqn
or equivalently
\beqn
\mbm_1&=2\bn-\bN-\bt&=
\mbm_2
\eeqn
which can not hold true simultaneously for more than one $\bn$ for any given $\mbm_1,\mbm_2$. 
Since $|S'_0(\mbm_1)|\ge 2$, the support of the probability density of $\Theta_4$
contains  $(-2\gamma\pi,2\gamma\pi]$. 

The same analysis then implies that  \eqref{1.13} holds true 
with  probability at most $p_4^{|S'_0(\mbm_1)|/4!}$ where
\[
p_4:=\max_{a\in \IR}\mbox{\rm Pr} \{\Theta_4\in (a-2\delta\pi, a+2\delta\pi]\}<1 
\]
since $\delta<\min(\gamma,\half)$. 


In summary, ambiguities (i)-(iv) are present with probability at most $c^s$ and 
hence the desired result \eqref{masked1}-\eqref{masked2} holds true with probability greater than $1-c^s$ where the positive constant $c<1$ depends only on $\delta$ and  the probability density function of the mask phase. 
%\end{proof}




\section*{Acknowledgments}
The research of A. F. is supported by  the US National Science Foundation  grant DMS-1413373.  The  present work was initiated during a stimulating and fruitful visit of A.F. to National Center for
Theoretical Sciences (NCTS), Taiwan,  in October 2017.  Research of P. C. is supported in part by the Grant 
105-2115-M-005-005-MY2 from Ministry of Science and Technology, Taiwan. \\


\begin{thebibliography}{plain}
\bibitem{keyhole}

B. Abbey, K. A. Nugent, G. J. Williams, J.N. Clark, A.G. Peele , M.A. Pfeiffer, M. De Jonge \& I. McNulty, ``Keyhole coherent diffractive imaging." {\em Nat. Phys.} {\bf 4} (2008) 394-398.


\bibitem{AH}
P. F. Almoro and S. G. Hanson, `` Random phase plate for wavefront sensing via phase retrieval and a volume speckle field," {\em Appl. Opt.} {\bf 47} (2008) 2979-2987.

  \bibitem{Alm}
  P. F. Almoro, G. Pedrini, P. N. Gundu, W.  Osten,  S. G. Hanson,
  ``Enhanced wavefront reconstruction by random phase modulation with a phase diffuser," {\em Opt. Laser Eng.}
  {\bf 49} (2011) 252-257.

\bibitem{Bates}
R. H. T. Bates, ``Fourier phase problems are uniquely solvable in more than one dimension. 1. Underlying theory.", {\em Optik} {\bf 61(3)} (1982), 247-262. 

\bibitem{Bodin}
A. Bodin, P. D\`ebes and S. Najib, ``Irreducibility of hypersurfaces" 
{\em Comm. Alg.} {\bf 37} (2009) 1884-1900. 

%\bibitem{BW}%
%M. Born and E. Wolf, {\em Principles of Optics}, 7-th edition, 
%Cambridge University Press,  1999 (pages 199-201). 

 \bibitem{BWW}
 R. Br\"{a}uer, U. Wojak, F. Wyrowski, O. Bryngdahl, `` Digital diffusers for optical
holography," {\em Opt. Lett.} {\bf 16} (1991), 1427-1429.

\bibitem{BS}
Yu. M. Bruck and L. G. Sodin, "On the ambiguity of the image reconstruction problem," {\em Opt. Commun.}{\bf 30}(1979),  304-308.




\bibitem{overlap}%
O. Bunk, M. Dierolf, S. Kynde, I. Johnson, O. Marti, F. Pfeiffer, ``Influence of the overlap parameter on the convergence of the ptychographical iterative engine," {\em  Ultramicroscopy} {\bf 108} (5) (2008) 481-487.




\bibitem{CDI}%
H.N. Chapman \& K.A. Nugent, ``Coherent lensless X-ray imaging," {\em Nat. Photon.} {\bf 4} (2010) 833-839.

% "Microscopy: A new phase for X-ray imaging". {\em Nature.} {\bf 467} (2010), 409-410.



%\bibitem{DR-phasing}%
%P. Chen and  A. Fannjiang, ``Phase retrieval with a single mask 
%by Douglas-Rachford algorithms," {\em Appl. Comput. Harmon. Anal.} 2016, {\tt http://dx.doi.org/10.1016/j.acha.2016.07.003.}

\bibitem{ptych-unique}
P. Chen and A. Fannjiang, `` Coded-aperture ptychography: uniqueness and reconstruction", {\em Inverse Problems} {\bf 34 }(2018) 025003.


%\bibitem{AP-phasing}%
%P. Chen, A. Fannjiang and G. Liu, ``Phase retrieval with one or two coded diffraction patterns by alternating projection with the null initialization," {\em J. Fourier Anal. Appl.} 2017, DOI 10.1007/s00041-017-9536-8. 



\bibitem{Conway}
H.H. Conway  \& N.J.A. Sloane, {\em Sphere Packings, Lattices and Groups}, 3rd ed., Berlin, New York: Springer-Verlag, 
1999. 

\bibitem{ptycho10}%
M. Dierolf, A. Menzel, P. Thibault, P. Schneider, C. M. Kewish, R. Wepf, O. Bunk, and F. Pfeiffer, `` Ptychographic x-ray computed tomography at the nanoscale,'' {\em Nature} {\bf 467} (2010), 436-439.

\bibitem{circle}
M. Dierolf, P. Thibault, A. Menzel, C. Kewish, K. Jefimovs, I. Schlichting, K. Kong, O. Bunk, and F. Pfeiffer, ``Ptychographic coherent diffractive imaging of weakly scattering specimens,"{\em  New J. Phys.} {\bf 12} (2010), 035017.

\commentout{\bibitem{FAK}
C. Falldorf, M. Agour, C. V. Kopylow and R. B. Bergmann,
``Phase retrieval by means of a spatial light modulator in the Fourier domain of an imaging system," {\em Appl. Opt.} {\bf 49}, 1826-1830 (2010). 
}

\bibitem{Horisaki2}
R. Egami, R. Horisaki, L. Tian \& J. Tanida,
``Relaxation of mask design for single-shot phase imaging with a coded aperture,"
{\em Appl. Opt.} {\bf 55} (2016) 1830-1837. 
\bibitem{rand}
A. Fannjiang, ``Exact localization and superresolution with noisy data and random illumination," {\em Inverse Problems} {\bf 27} (2011) 065012. 
\bibitem{unique} %
A. Fannjiang, \lq\lq Absolute uniqueness of phase retrieval with random illumination," {\em Inverse Problems} {\bf 28} (2012), 075008. 

\bibitem{rpi} 
A. Fannjiang and W. Liao, \lq\lq Phase retrieval with random phase illumination," {\em J. Opt. Soc. A} {\bf 29}(2012),   1847-1859.  

%\bibitem{rpi} %
%A. Fannjiang and W. Liao, \lq\lq Phase retrieval with random phase illumination," {\em J. Opt. Soc. A} {\bf 29} (2012),   1847-1859.  

\bibitem{pum}%
A. Fannjiang and W. Liao, ``Fourier phasing with phase-uncertain mask," {\em Inverse Problems} 
{\bf 29} (2013) 125001.

\bibitem{DRS-ptych}
A. Fannjiang and Z. Zhang, ``Blind ptychography by Douglas-Rachford splitting," {arXiv:1809.00962v2.}


\bibitem{PIE104}%
H.M.L. Faulkner and J.M. Rodenburg, ``Movable aperture lensless transmission microscopy: A novel phase retrieval algorithm," {\em Phys. Rev. Lett.}{\bf 93} (2004), 023903. 

\bibitem{PIE05}%
H.M.L. Faulkner and J.M. Rodenburg,
``Error tolerance of an iterative phase retrieval algorithm for moveable illumination microscopy,"
{\em Ultramicroscopy} {\bf 103:2} (2005), 153-164. 

%\bibitem{Fie82}
%Fienup, J. R. 1982 Phase retrieval algorithms|a comparison. {\em Appl. Opt. } 21, 2758-2769. 
%\bibitem{Fie97}
%Fienup, J. R. 1987 Reconstruction of a complex-valued object from the modulus of its Fourier-transform using a support constraint. {\em J. Opt. Soc. Am. A} 4, 118-123.
\bibitem{EM-ptych1}
S. Gao, P. Wang,  F.  Zhang, G. T. Martinez, P. D. Nellist, X. Pan \& A. I. Kirkland,
``Electron ptychographic microscopy for three-dimensional imaging,"
{\em Nat. Comm.} {\bf 18}(2017) 163. 


\bibitem{Fie08}%
M. Guizar-Sicairos,  J.R. \& Fienup,  ``Phase retrieval with transverse translation diversity: a nonlinear optimization approach." {\em Opt. Express} {\bf 16} (2008), 7264-7278.

\bibitem{linear}
M. Guizar-Sicairos, A. Diaz, M. Holler, M. S. Lucas, A. Menzel, R. A. Wepf, and O. Bunk, ``Phase tomography from x-ray coherent diffractive imaging projections,"  {\em Opt. Exp.}{\bf 19} (2011), 21345-21357.

\bibitem{optimal}
K. Guo, S. Dong, P. Nanda and G. Zheng,
``Optimization of sampling pattern and the design of Fourier ptychographic illuminator,"
 {\em Opt. Exp.} {\bf 23} (2015) 6171-6180. 
 
\bibitem{Hayes}%
M. Hayes, ``The reconstruction of a multidimensional sequence from the phase or magnitude of its Fourier
transform," {\em IEEE Trans. Acoust. Speech Signal Process.} {\bf 30} (1982), 140-154. 

\bibitem{Hesse}%
R. Hesse, D. R. Luke, S. Sabach, and M.K. Tam,
``Proximal heterogeneous block implicit-explicit method and application to blind ptychographic diffraction imaging," {\em SIAM J. Imag. Sci.} {\bf 8} (2015) 426-457. 

\bibitem{scan1}
X. Huang, H. Yang, R. Harder, Y. Hwu, I.K. Robinson \& Y.S. Chu,``Optimization of overlap uniformness for ptychography," {\em Opt. Express} {\bf 22} (2014), 12634-12644.

%\bibitem{scan2}
%X. Huang, H. Yan, M. Ge, H.  \"Ozt\"urk, , E. Nazaretski, I. K. Robinson, \& Yong S. Chu, ``Artifact mitigation of ptychography integrated with on-the-fly scanning probe microscopy," {\em Appl. Phys. Lett.} {\bf 111} (2017) 023103. 



\bibitem{Hoppe1}%
W. Hoppe, ``Beugung im inhomogenen Primärstrahlwellenfeld. I. Prinzip einer Phasenmessung von Elektronenbeungungsinterferenzen". {\em Acta Cryst.. A.} {\bf 25}(1969) 495.

\bibitem{Hoppe2}%
W. Hoppe, ``Beugung im inhomogenen Primärstrahlwellenfeld. III. Amplituden- und Phasenbestimmung bei unperiodischen Objekten", {\em Acta Cryst. A}. {\bf 25} (4) (1969) 508.

\bibitem{Horisaki1}
R. Horisaki, R. Egami \& J. Tanida, ``Single-shot phase imaging with randomized light (SPIRaL)". {\em Opt. Express} {\bf 24}(2016), 3765-3773.

\bibitem{meta1}%
 J. Hunt, T. Driscoll, A. Mrozack, G. Lipworth, M. Reynolds, D. Brady, and D. R. Smith, "Metamaterial Apertures for Computational Imaging," {\em Science} {\bf 339} (2013), 310-313.
 
 \bibitem{Iwen}%
M. A. Iwen, A. Viswanathan, and Y. Wang, 
``Fast phase retrieval from local correlation measurements,"
{\em SIAM J. Imaging Sci.} {\bf 9(4)}(2016) 1655-1688. 

 \bibitem{EM-ptych2}
Y. Jiang,  Z.  Chen,  Y. Han, P. Deb, H. Gao, S. Xie, P. Purohit, M. W. Tate, J. Park, S. M. Gruner, V.  Elser \& D. A. Muller
``Electron ptychography of 2D materials to deep sub-angstrom resolution," {\em Nature} {\bf 559}(2018) 343-349. 
\bibitem{meta3}%
 G. Lipworth, A. Mrozack, J. Hunt, D.L. Marks, T. Driscoll, D. Brady, "Metamaterial apertures for coherent computational imaging on the physical layer," {\em J. Opt. Soc. Am. A} {\bf 30} (2013), 1603-1612.

\bibitem{supres-PIE}%
A. M. Maiden, M. J. Humphry, F. Zhang and J. M. Rodenburg, ``Superresolution imaging via ptychography,"
{\em J. Opt. Soc. Am. A} {\bf 28} (2011), 604-612. 

\bibitem{rPIE17}
A. Maiden, D. Johnson and P. Li, 
``Further improvements to the ptychographical iterative engine," {\em Optica}
{\bf 4} (2017), 736-745.

\bibitem{ptycho-rpi}%
A.M. Maiden,	 G.R. Morrison,	 B. Kaulich,	 A. Gianoncelli	 \& J.M. Rodenburg,
``Soft X-ray spectromicroscopy using ptychography with randomly phased illumination,"
{\em Nat. Commun.} {\bf 4} (2013), 1669. 


\bibitem{ePIE09}%
A.M. Maiden \& J.M. Rodenburg, ``An improved ptychographical phase retrieval algorithm for diffractive imaging," {\em Ultramicroscopy} {\bf 109} (2009), 1256-1262.

\bibitem{ePIE10}%
A. M. Maiden, J. M. Rodenburg and M. J. Humphry,
``Optical ptychography: a practical implementation with useful resolution," {\em Opt. Lett.}
{\bf 35} (2010), 2585-2587. 

\bibitem{Miao}
J. Miao, D. Sayre, and H. N. Chapman. ``Phase retrieval from the magnitude of the Fourier transforms of nonperiodic objects.", {\em J. Opt. Soc. Am. A} {\bf15(6)} (1998) 1662-1669.
\bibitem{parallel}
Y. S. G. Nashed, D. J. Vine, T. Peterka, J. Deng,
R. Ross  and C. Jacobsen, 
``Parallel ptychographic reconstruction," {\em Opt. Express} {\bf 22} (2014) 32082-32097. 

%\bibitem{Popescu}
%M. Mir, B. Bhaduri, R. Wang, R. Zhu and
%G.  Popescu, ``Quantitative Phase Imaging", {\em Progress in Optics} {\bf 57} 133-217 (2012)
\bibitem{EM0}
P.D. Nellist, B.C. McCallum \& J.M. Rodenburg, ``Resolution beyond the information limit in transmission electron microscopy, " {\em Nature} {\bf 374} (1995) 630-632. 

\bibitem{EM1}
P.D. Nellist and J.M. Rodenburg, `` Electron ptychography. I. Experimental demonstration beyond the conventional resolution limits," {\em Acta Cryst. A} {\bf 54} (1998), 49-60. 

\bibitem{Nugent}
K.A. Nugent, ``Coherent methods in the X-ray sciences, " {\em Adv. Phys.} {\bf 59} (2010) 1-99. 

\bibitem{Yang14}
X. Ou, G. Zheng and C. Yang, ``Embedded pupil function recovery for Fourier ptychographic microscopy,"
{\em Opt. Exp.} {\bf 22} (2014) 4960-4972. 


%\bibitem{ptycho-alg}
%J. Qian, C. Yang, A. Schirotzek, F. Maia, and S. Marchesini, Efficient algorithms for ptychographic
%phase retrieval, Inverse Probl. Appl., Contemp. Math, 615 (2014), pp. 261Ð280.


\bibitem{random-aperture}
X. Peng, G.J. Ruane, M.B. Quadrelli \& G.A. Swartzlander, `` Randomized apertures: high resolution imaging in far field," {\em Opt. Express} {\bf 25} (2017) 296187. 

\bibitem{Pfeiffer}
F. Pfeiffer, ``X-ray ptychography," {\em Nat. Photon.} {\bf 12} (2017) 9-17. 

\bibitem{EM2}
T. Plamann \& J.M. Rodenburg, ``Electron ptychography. II. Theory of three-dimensional propagation effects," {\em Acta Cryst.  A} {\bf 54} (1998), 61-73. 

\bibitem{Rod08}
J.M. Rodenburg, ``Ptychography and related diffractive imaging methods," {\em Adv. Imaging  Electron Phys.} {\bf 150} (2008) 87-184. 


\bibitem{PIE204}%
J.M.  Rodenburg and H.M.L.  Faulkner, ``A phase retrieval algorithm for shifting illumination". {\em Appl. Phys.  Lett.} {\bf 85} (2004), 4795.

%\bibitem{SA}
%A. Sakdinawat \& D. Attwood, `` Nanoscale X-ray imaging." {\em Nat. Photon.} {\bf 4} (2010) 840-848.

\bibitem{RCM}
M.H. Seaberg, A. d'Aspremont \& J.J. Turner, ``Coherent diffractive imaging using randomly coded masks," {\em Appl. Phys. Lett.} {\bf 107} (2015) 231103.

\bibitem{FROG}
P. Sidorenko, O. Lahav, Z. Avnat \& O. Cohen,
``Ptychographic reconstruction algorithm for frequency-resolved optical gating: super-resolution and supreme robustness," {\em Optica} {\bf 3} (2016) 1320-1330.

\bibitem{diffuser}
M. Stockmar, P. Cloetens, I. Zanette, B. Enders, M. Dierolf, F. Pfeiffer, and P. Thibault,``Near-field ptychography: phase retrieval for inline holography using a structured illumination," {\em Sci. Rep.} {\bf 3} (2013), 1927.


\bibitem{random-coding}
D. Sylman, V. Mic\'o, J. Garca \& Z. Zalevsky,
``Random angular coding for superresolved imaging,"
{\em Appl. Opt.}{\bf 49} (2010), 4874-4882. 

\bibitem{probe09}%
P. Thibault, M. Dierolf, O. Bunk, A. Menzel, F. Pfeiffer, 
``Probe retrieval in ptychographic coherent diffractive imaging,"
{\em Ultramicroscopy}
{\bf 109} (2009),  338-343.

\bibitem{DM08}%
P. Thibault, M. Dierolf, A. Menzel, O. Bunk, C. David, F. Pfeiffer, ``High-resolution scanning X-ray diffraction microscopy", {\em Science} {\bf 321} (2008),  379-382.

\bibitem{ML12}
P. Thibault and M. Guizar-Sicairos, `` Maximum-likelihood refinement for coherent diffractive imaging". {\em New J. Phys.} {\bf 14} (2012), 063004.

\bibitem{terahz}
L. Valzania, T. Feurer, P. Zolliker \& E. Hack,
``Terahertz ptychography," {\em Opt. Lett.} {\bf 43} (2018), 543-546. 

\bibitem{meta2}%
 C. M. Watts, D. Shrekenhamer, J. Montoya, G. Lipworth, J. Hunt, T. Sleasman, S. Krishna, D. R. Smith, and W. J. Padilla, ``Terahertz compressive imaging with metamaterial spatial light modulators," {\em Nat. Photon.}  {\bf 8} (2014), 605-609.

\bibitem{Waller15}
L. Yeh, J. Dong, J. Zhong, L.Tian, M. Chen, G. Tang, M. Soltanolkotabi,  and L.  Waller,
``Experimental robustness of Fourier  ptychography phase retrieval algorithms," {\em Optics Express}
{\bf 23} (2015) 33214-33240.

%\bibitem{ADM}
%Z. Wen, C. Yang, X. Liu and S. Marchesini,  ``Alternating direction methods for classical and ptychographic phase retrieval," {\em  Inverse Problems} {\bf 28} (2012),  115010.

\bibitem{Fucai2}
F. Zhang, B. Chen, G. R. Morrison, J. Vila-Comamala, M. Guizar-Sicairos
\& I. K. Robinson, ``Phase retrieval by coherent modulation imaging,"
{\em Nat. Comm.} {\bf 7} (2016) 13367. 


\bibitem{Fucai1}
F. Zhang, G. Pedrini \& W. Osten,
``Phase retrieval of arbitrary complex-valued fields through aperture-plane modulation," {\em Phys. Rev. A} {\bf 75} (2007), 043805.  


\bibitem{Spread}%
X. Zhang, J. Jiang, B. Xiangli, G.R. Arce,
``Spread spectrum phase modulation for coherent X-ray diffraction imaging,"
 {\em Optics Express} {\bf 23} (2015), 25034-25047.
 
 
 
 \bibitem{FPM13}
 G. Zheng, R. Horstmeyer and C.Yang, ``Wide-field, high-resolution Fourier ptychographic microscopy," {\em Nature Photonics} {\bf 7} (2013), 739-745.
 
 \bibitem{adaptive}
C. Zuo, J. Sun and Q. Chen, ``Adaptive step-size strategy for noise-robust Fourier ptychographic microscopy," {\em Optics Express} {\bf 24} (2016), 20724-20744.
 
\end{thebibliography}

\end{document}

