# Ghost Imaging by a Proportional Parameter to Filter Bucket Data
## 2 Experimental Setup and Principle
Here, we introduced a proportional parameter \(C\) to filter the bucket data so as to get fewer and more useful data for the reconstruction, and \(C\) was defined as:  
\[C=\frac{N_{T}}{N} \tag{2}\]  
where \(N\) is the total number of data groups, and \(N_{T}\) is the number of data groups screened from the \(N\) sets of data. Hundreds of groups of data were processed according to the frequency statistics histogram of \((B_{n}-\langle B_{n}\rangle)\) to determine the proportion parameter \(C\) before each experiment, and then we selected two threshold values according to \(C\). In the experiments, we combined the screening process with the sampling process to filter each group of the sampled data and put the data corresponding to the \(B_{n}\) within the threshold range into the data pool to participate in the operation. On the contrary, the data out of range were abandoned. The proposed method was tested in SMGI and PGI to verify its effectiveness. Assuming that the object image and the optical fields distribution of the reference beam were both \(p\times q\) pixels, the light field distribution of each measurement could be turned into a row vector, then these \(N\) row vectors were pieced together into a matrix denoted as observation matrix \(\mathbf{\Phi}\) as below:  
\[\mathbf{\Phi}=\left[ \begin{array}{cccc}I_{1}(1,1)&I_{1}(1,2)&\cdots&I_{1}(p,q)\\ I_{2}(1,1)&I_{2}(1,2)&\cdots&I_{2}(p,q)\\ \vdots&\vdots&\cdots&\vdots\\ I_{N}(1,1)&I_{N}(1,2)&\cdots&I_{N}(p,q)\end{array} \right] \tag{3}\]  
The total light intensity \(B_{n}\) in \(N\) times of measurements and the transmission coefficient \(\mathbf{T}(x,y)\), of the object were rewritten into corresponding vector forms. By constructing the observation matrix, the GI formula could also be transformed into a matrix form:  
\[\mathbf{T}_{GI}=\frac{1}{N}\mathbf{\Phi}^{T}\!\left(\left[ \begin{array}{c}B _{1}\\ B_{2}\\ \vdots\\ B_{N}\end{array} \right]-\left[ \begin{array}{c}\langle B_{n}\rangle\\ \langle B_{n}\rangle\\ \vdots\\ \langle B_{n}\rangle\end{array} \right]\right)=\frac{1}{N}\mathbf{\Phi}^{T} \mathbf{\Phi}\left[ \begin{array}{c}T(1,1)\\ T(1,2)\\ \vdots\\ T(p,q)\end{array} \right]-\frac{1}{N}\mathbf{\Phi}^{T}\langle B_{n}\rangle \tag{4}\]  
where \(\mathbf{\Phi}_{T}\) is the transpose of \(\mathbf{\Phi}\). \(N\) is the total sampling number. SMGI modifies the observation matrix \(\mathbf{\Phi}\) by subtracting a matrix \(\mathbf{\Phi}_{x}\) to make the calculation result of \((\mathbf{\Phi}^{T}-\mathbf{\Phi}_{x})\mathbf{\Phi}\) more similar to a scalar matrix, expressed as [19]:  
\[\mathbf{T}_{SMGI}=\frac{1}{N}(\mathbf{\Phi}^{T}-\mathbf{\Phi}_{x})\mathbf{ \Phi}\left[ \begin{array}{c}T(1,1)\\ T(1,2)\\ \vdots\\ T(p,q)\end{array} \right]-\frac{1}{N}(\mathbf{\Phi}^{T}-\mathbf{\Phi}_{x}) \langle B_{n}\rangle \tag{5}\]  
Similarly, PGI replace \(\mathbf{\Phi}\) with its pseudo-inverse matrix \(\mathbf{\Phi}^{\dagger}\)[17, 18] as below:  
\[\mathbf{T}_{PGI}=\frac{1}{N}\mathbf{\Phi}^{\dagger}\mathbf{\Phi}\left[ \begin{array}{c}T(1,1)\\ T(1,2)\\ \vdots\\ T(p,q)\end{array} \right]-\frac{1}{N}\mathbf{\Phi}^{\dagger}\langle B_{n}\rangle \tag{6}\]  
From Equations (5) and (6), it was known that all the modifications only change the \(\mathbf{I_{n}}(x,y)\) part of the formulas rather than the part containing \((B_{n}-\langle B_{n}\rangle)\), so theoretically, our method was equally effective for SMGI and PGI.