## 2 Materials and Methods
### Windthrow and Landslide Detection
#### 2.3.2 Spectral Angle Mapper Method  
The SAM method is a spectral classification method that considers an n-dimensional angle to match the pixel to a reference spectral signature. It calculates the angle between the spectral signature of an image and the spectral signature of a training sample by treating them as vectors.  
Figure 3: Histograms of damaged areas with the respective threshold values indicated in red. The histogram in the upper left shows _Setana North \(NDVI_{before}-NDVI_{after}\)_, and that in the top right shows _Setana North \(NDVI_{after}\)_. _Setana South \(NDVI_{before}-NDVI_{after}\)_ is displayed in the lower left corner, and _Setana South \(NDVI_{after}\)_ is displayed in the lower right corner.  
This technique is insensitive to illumination and albedo effects when used on radiometrically calibrated data. The angle \(\theta\) was defined by [PERSON] [29] (Equation (2)):  
\[\theta(x,y)\ =\ \cos^{-1}\left(\frac{\sum_{i\ =\ 1}^{n}x_{i}y_{i}}{\left(\sum_{i =\ 1}^{n}x_{i}^{2}\right)^{\frac{1}{2}}\ *\ \left(\sum_{i\ =\ 1}^{n}y_{i}^{2}\right)^{\frac{1}{2}}}\right) \tag{2}\]  
where:  
\(x\) = spectral signature vector of each pixel from the image;  
\(y\) = spectral signature vector of the training sample;  
\(n\) = number of bands.  
The pixel matches the class that has the smallest angle (Equation (3)):  
\[x\in C_{k}\Leftrightarrow\theta(x,y_{k})<\theta\big{(}x,y_{j}\big{)}Vk\
eq j \text{ and }\theta(x,y_{k})<T\ ( \tag{3}\]  
where:  
\(C_{k}\) = class \(k\);  
\(y_{k}\) = spectral signature of class \(k\);\(y_{j}\) = spectral signature of class \(j\) ;  
\(T\) = threshold to exclude pixels greater than this value.  
The SAM method was performed using the Semi-Automatic Classification Plugin [30] in QGIS 3.10 [31]. Based on composite layer stacked images used as input, training samples were defined by digitized polygons in known damaged areas and checked using the pre and posttyphoon PlanetScope data accompanied by the Worldview2 imagery, and the threshold \(T\) was defined.  
To determine the optimal numbers of training samples and threshold values for windthrow and landslide detection, we tested different numbers of training samples (1, 2, 4, 8, and 16) and different threshold values (1, 4, 7, 10, 13, and 16) and compared the overall accuracies of all combinations (Figure 4).  
Figure 4: Comparison of combinations training sample numbers (\(x\)-axis) and threshold values according to overall accuracy (\(y\)-axis).  
The criteria used to define the optimal values for classification were the highest overall accuracy, using the fewest training samples, and visual interpretation of the final classification result. For windthrow detection in Setana North, the number of selected training samples was 2, with a threshold set at 7 (overall accuracy: 92.5%). Visual interpretation of the classified map revealed some scattered false-positive misclassifications (the classified map defined the area as damaged, but the reference map showed a nondamaged area), so the size and location of the training samples were empirically adjusted to improve classification.  
For landslide detection in Setana South, 8 training samples with the threshold value set at 7 delivered the highest overall accuracy (93.5%); however, visual interpretation of the classification map revealed a large number of scattered false-positive misclassifications. Then, we selected the combination of 4 training samples with a threshold set at 7 (overall accuracy, 93%), which presented a better balance among the number of training samples, overall accuracy, and overall shape of the final map.