## 3 Proposed Method  
In this work, a new method is proposed based on acquiring more than two measurements of the same wafer in order to accurately produce a gravity-removed measurement with greater immunity to misplacement and/or misalignment. In the proposed method, named Modal Gravity Removal (MGR), one measurement in normal orientation must be acquired as described in Equation (1). The main benefit of this method is its immunity against the lack of even symmetry of the gravity effect, which appears due to the misalignment or misplacement of the wafer over the support pins [5]. After acquiring the measurement in normal orientation, a set of measurements must also be acquired in inverse orientation, whereas the number of measurements \(N\) is a variable. In every measurement, the wafer in inverse orientation is rotated at an angle with respect to the \(z\)-axis. This set of measurements is finally averaged:  
\[y_{b}(x,y)=\frac{1}{N}\sum_{i=0}^{N-1}\big{(}g_{i}(x,y)\ -\ F_{\Phi_{i}}(s(x,y)) \big{)} \tag{6}\]  
where \(\Phi_{i}\) takes the equally distributed angles in the whole circumference; \(\Phi_{i}=i\ 360/N\). Then, the first estimation of the actual shape of the wafer \(\hat{s}(x,y)\) can be derived using the following assumption: the gravity induced deformation is independent of the rotation of the wafer:  
\[g(x,y)=g_{f}(x,y)=g_{b}(x,y)=\frac{1}{N}\sum_{i=0}^{N-1}g_{i}(x,y) \tag{7}\]  
Then, the estimated shape \(\hat{s}(x,y)\) can be composed by subtracting the front and back measurements:  
\[\hat{s}(x,y)=g_{f}(x,y)+s(x,y)-\frac{1}{N}\sum_{i=0}^{N-1}(g_{i}(x,y)-F_{\Phi} (s(x,y)))=s(x,y)+\frac{1}{N}\sum_{i=0}^{N-1}F_{\Phi}(s(x,y)) \tag{8}\]  
The shape \(s(x,y)\) can be split into two components: the non-rotational symmetric (NR) component and the rotational symmetric (RS) component. The NR component moves toward zero when rotated and averaged over an infinite number of angles, while the RS component remains unchanged. \[s(x,y)=s_{NR}(x,y)+s_{RS}(x,y) \tag{9}\]  
\[\lim_{N\to\infty}\frac{1}{N}\sum_{i=0}^{N-1}F_{\Phi}(s_{NR}(x,y))=0 \tag{10}\]  
\[\lim_{N\to\infty}\frac{1}{N}\sum_{i=0}^{N-1}F_{\Phi}(s_{RS}(x,y))=s_{RS}(x,y) \tag{11}\]Taking all the above into consideration, the first estimation of the shape \(\hat{s}(x,y)\) can be written as follows:  
\[\hat{s}(x,y)=s_{NR}(x,y)+s_{RS}(x,y)+\frac{1}{N}\sum_{i=0}^{N-1}F_{\Phi}(s_{NR}(x,y)+s_{RS}(x,y))=s_{NR}(x,y)+2s_{RS}(x,y) \tag{12}\]  
Then, the estimation of the shape \(\hat{s}(x,y)\) can be calculated as a subtraction of the front and back measurements, and then it can be split into its NR and RS components. The actual shape \(s(x,y)\) can then be rewritten as follows:  
\[s(x,y)=\hat{s}_{NR}(x,y)+\frac{\hat{s}_{RS}(x,y)}{2} \tag{13}\]  
To split any 2D function into its NR and RS components, the Zernike polynomials are chosen as a base. Zernike \(Z_{n}^{m}\) polynomials are defined by two indexes, namely, \(m\) and \(n\), which are nonnegative integers; the polynomials are defined only when \(m\ \leq\ n\) (Figure 2). Any Zernike polynomial with an even value of \(n\) and with \(m=0\) shows rotational symmetry [8]. Finally, any shape \(s(x,y)\) can be rewritten as the sum of Zernike polynomials:  
\[s(x,y)=\sum_{m,n}c_{m,n}Z_{n}^{m}=\sum_{m^{*},n_{e}}c_{m^{*},n_{e}}Z_{n_{e}}^{ m^{*}}+\sum_{m,n_{e}}c_{m,n_{e}}Z_{n_{e}}^{m}+\sum_{n_{e}}c_{0,n_{e}}Z_{n_{e}}^{0 }=s_{NR}(x,y)+s_{RS}(x,y) \tag{14}\]  
where \(c_{m,n}\) represents real-valued coefficients; \(m^{*}\) represents integer values larger than 0; and \(n_{e}\) and \(n_{o}\) are the even and odd positive integers, respectively. To limit the processing burden of the method, in this work, the value of \(n\) is limited to 10. To find the best coefficients \(c_{m,n}\), any minimization or least squares method can be applied to solve it. \[\operatorname*{arg\,min}_{c_{m,n}\in\mathbb{R}}\sum_{m,n}c_{m,n}Z_{n}^{m} \tag{15}\]  
\[g(x,y)=g_{f}(x,y)=g_{b}(x,y)=\frac{1}{N}\sum_{i=0}^{N-1}g_{i}(x,y) \tag{7}\]0 Zernike modes from \(Z_{0}^{0}\) to \(Z_{4}^{4}\).