## 2 LiCSAR and LiCSBAS
### Time Series Analysis
#### 2.4.2 Step 1-2: Network Refinement by Loop Closure  
Unwrapped data may include unwrapping errors, which can cause significant errors in the derived time series and should therefore be removed or corrected beforehand. Several approaches have been proposed to identify and correct unwrapping errors, taking advantage of the redundancy of a network of interferograms and loop phase closure [21, 49, 50]. However, manual identification or correction is too time-consuming for a full stack of LiCSAR interferograms [49]. Automatic correction can work well only if the redundancy of the network of interferograms is sufficiently high and not too many unwrapping errors exist [21, 50], which may not always be the case for large-scale, automatic processing. Moreover, automatic unwrapping error correction can produce false corrections, which are difficult to identify and result in worse errors in the derived time series. Therefore, for now, we have decided to take a conservative approach; we automatically detect and completely remove interferograms that have many unwrapping errors by evaluating the loop phase closure on an image-by-image basis, rather than correcting unwrapping errors on a pixel-by-pixel basis.  
Supposing that we have three images (\(\phi_{1}\), \(\phi_{2}\), and \(\phi_{3}\)) and three unwrapped interferograms (\(\phi_{12}\), \(\phi_{23}\), and \(\phi_{13}\)), a loop phase (also called closure phase or phase triplet) is calculated by [49]  
\[\Phi_{123}=\phi_{12}+\phi_{23}-\phi_{13}. \tag{1}\]  
If there are no unwrapping errors in the three interferograms, the loop phase should be close to zero (but not exactly zero due to the effects of multilooking, filtering, soil moisture change, etc. [51]). On the other hand, if one (or more) of the interferograms contains unwrapping errors, the loop phase will usually be close to an integer multiple of \(2\pi\) (Figure 2). The root mean square (RMS) of the loop phase image indicates how many pixels with unwrapping errors are included in the loop. All possible loop phases and the RMS are calculated, and problematic loops with larger RMS than a defined threshold (e.g., 1.5 rad) can be identified. If all loops associated with an interferogram are problematic, this is considered a bad interferogram that likely includes many unwrapping errors, and it is removed from further processing (Figure 2).  
Note that this step evaluates unwrapping errors for each interferogram but not for each pixel. Interferograms that are removed during Step 1-2 may contain correctly unwrapped pixels. However, this is not a significant problem if sufficient interferograms still remain after network refinement. Conversely, remaining interferograms may still contain some unwrapping errors, which would degrade the derived time series. These errors generate unclosed loops on a pixel-by-pixel basis. We count the number of unclosed loops for each pixel and can use this for masking pixels with unwrapping errors after the small baseline (SB) inversion at Step 1-5 (Section 2.4.5).  
If two interferograms in a loop have opposite unwrapping errors in the same area, the loop phase is falsely closed, and the bad interferograms may not be automatically identified. However, network redundancy assures that other loops associated with the unidentified bad interferograms are not closed and will be counted on a pixel-by-pixel basis and identified at the later masking step (Step 1-5, Section 2.4.5). Users can also manually identify and remove the unidentified bad interferograms by checking the loop closure images (Figure 2) and then re-run Step 1-2.  
After network refinement, a preliminary reference point is selected. At the reference point, all interferograms must have valid (unmasked) and error-free unwrapped data for the following SB network inversion. To identify the reference point, the RMS of all the loop phases for each pixel is calculated, and the pixel with the smallest RMS is selected.