# Automated Rain Detection by Dual-Polarization Sentinel-1 Data
## 4 Rain Detection
### Optimization of the Heterogeneity Filter(s) for Rain Detection
The ROC is based on the analysis of True Positive Rate (TPR) and False Positive Rate (FPR) for varying \(\
u_{r,p}=[0,1]\). We recall that TPR is the proportion of S-1 heterogeneous area in the S-1 SAR images that is correctly predicted out of all heterogeneous observations (based on a given rain flag reference from NEXRAD). Similarly, FPR is the proportion of S-1 observations that are incorrectly predicted as heterogeneous out of all homogeneous observations. \[\mathrm{TPR}\big{(}\
u_{r,p}\big{)} =\frac{|F_{r,p}\ >\ \
u_{r,p}|\cap|Z\ >\ Z_{0}|}{|Z\ >\ Z_{0}|}\] \[\mathrm{FPR}\big{(}\
u_{r,p}\big{)} =\frac{|F_{r,p}\ >\ \
u_{r,p}|-|F_{r,p}\ >\ \
u_{r,p}|\cap|Z\ >\ Z_{0}|}{|Z\ >\ Z_{0}|}\]  
Here \(|.|\) denotes the cardinality of a given set, which is the number of pixels of the set in the database. Figure 8 shows that the Koch filter improves with the rain rate increasing. It is remarkable that TPR reaches 90% with low FPR of 20% when considering Z0 = 45 dBZ region (equivalent to 24 mm/h). In contrast, for the same value of TPR, FPR increases up 70% when the rain rate decreases below 30 dBZ (equivalent to 1 mm/h). It is expected that co-polarized SAR images show bright patches for base reflectivity exceeding 40 dBZ (see previous section, whereas the backscatter is dominated by sea surface winds especially at light rain). To find the best trade-off between FPR and TPR (and hence the optimal \(\
u_{r,p}^{opt}\)), the minimum distance from the ROC curve to the top left corner is calculated as proposed by [PERSON] et al. [38]. An alternative method is to calculate the maximum of the Youden index [39]. \[\
u_{r,p}^{opt}=\mathrm{argmin}\sqrt{\big{(}1-\mathrm{TPR}(\
u_{r,p})\big{)}^ {2}+\mathrm{FPR}(\
u_{r,p})^{2}} \tag{3}\]  
Figure 8: Illustration of a ROC (True Positive Rate versus False Positive Rate) as Koch filter is applied on VV SAR images at 400 m resolution. The color lines stand for the situation with the different reflectivity ranges. For \(r=400\) and \(p=\mathrm{VV},\
u^{opt}_{400,VV}\) is found to be equal to about 0.78 independently of the \(Z_{0}\) value. Beyond this first analysis, it is also of interest to investigate the potential to combine different resolutions and/or polarization channels. To this end, the same assessment based on ROC curves is extended, where the final heterogeneity mask is the intersection of each individual heterogeneity mask. All the possible pairs of processing (\(r=\{200,400,800\}\) and \(p=\{\mathrm{VV},\mathrm{VH}\}\)) are combined with a joint optimization of the two individual thresholds \(\
u^{opt}_{r1,p1}\) and \(\
u^{opt}_{r2,p2}\) (\(r1,r2\in[200,400,800]\), \(p1,p2\in\{\mathrm{VV},\mathrm{VH}\}\) ). In Figure 9, the minimum distance to the top left corner is retained as criteria (similar results are obtained with the Youden Index--not shown here) and estimated for 5 intervals of rain rates (\(Z\) ranges from 20 to 55 dBZ). Figure 9 shows the following: The filters based on co-polarized NRCS values are significantly better than the ones based on cross-polarized NRCS values. One possible explanation is that the signal-to-noise ratio at cross-polarization is much lower than at co-polarization. Indeed, this can prevent to detect the texture modification in some cases. A striking example of the noise impact in the case of two storm cells observed by Sentinel-1A C-band SAR is presented in Figures 5 and 6 in [PERSON] et al. (2017). As observed, several storm cell related features are not visible in cross-polarization images, but in co-polarization images. \(F_{400,VV}\) filter provides the best agreement when only one filter is chosen. Thus, combining co- and cross-polarization information improves the detection performance. Among all the possibilities, the joint \((F_{400,VV};F_{800,VH})\) filter exhibits the best agreement with observations with weather radars. The optimized thresholds are \(\
u^{opt}_{400,VV}=0.78\) and \(\
u^{opt}_{800,VH}=0.71\). We refer to the filter obtained by combining both co- and cross-polarization channels as dual-pol filter hereafter.