# Exploring the Spectral Variability of Estonian Lakes Using Spaceborne Imaging Spectroscopy
## 2 Materials and Methods
### Data Processing  
A structured processing workflow was designed to ensure the comparability of reflectance data across the entire dataset. The first step involved the atmospheric correction of all images, which converted top of atmosphere radiance to surface reflectance. For PRISMA images, L2C standard products supplied by ASI (land-based automatic atmospheric correction with MODTRAN [76]) were chosen for Lake Vortsjarv, considering that they are suitable for waters similar to Lake Trasimeno [77], where they have previously been validated [47]. In contrast, for images of Lake Peipsi, atmospheric correction with POLYMER [78] was performed as the standard L2C products showed poor quality. Regarding EnMAP data, the standard L2A products provided by DLR (atmospherically corrected with MIP [79]) were found to be adequate when compared with reference measurements. Table 2 provides a summary of the atmospherically corrected products employed in this study. Subsequently, spectral bands affected by noise were identified and removed, as suggested in [46]. Removing these bands ensured that only high-quality spectral information was retained for the analysis. The preserved spectral range (450-810 nm) was standardized for both sensors, resulting in 40 bands for PRISMA and 60 for EnMAP images. Applications n.1 and n.6, referring to Rrs validation in Lake Peipsi and Lake Vortsjarv, were performed by extracting spectral signatures from selected regions of interest (ROIs) in the hyperspectral images, defined as 5 \(\times\) 5 pixel windows, in order to reduce the impact of local heterogeneity and to provide representative average spectra. For spatial consistency, ROIs measuring 15 \(\times\) 15 pixels were selected in S2 images, while a single pixel was extracted in S3 images. In situ measurements affected by sunlight disturbance were corrected with the method proposed in [80]. The locations of the ROIs for the Rrs validation with both in situ measurements and Sentinel data are displayed as blue dots in Figure 1. Several statistical metrics were calculated to validate the Rrs data: these include the Root Mean Square Deviation (RMSD), the Mean Absolute Percentage Difference (MAPD), and the Spectral Angle (SA), with the latter used to determine the similarity between two spectra [44]. Application n.2, which relates to the classification of lake water pixels into OWTs, was performed with the method proposed in [81] by comparing each pixel's reflectance spectrum to the library of references, applying a spectral distance metric (i.e., SA) to assign each pixel to the closest matching OWT class. This step was essential for characterizing the variety of optical properties across different regions of the image. Applications n.3 and n.4 concern the analysis of the influence--in terms of spectral signatures--of the inflow of two rivers into Lake Peipsi [82; 83]. Spectral signatures were extracted from selected 5 \(\times\) 5 pixel ROIs, and environmental data (i.e., precipitation amount and wind speed) were downloaded from ERA5 to support the discussion. Applications n.5 and n.7, which refer to the estimation of PC concentration in Lake Peipsi and Lake Vortsjarv, were performed using the machine learning algorithm Mixture Density Network (MDN). The model was previously calibrated in [34] using in situ radiometric measurements resampled for both Hyperspectral Imager for the Coastal Ocean (HICO) and PRISMA sensors, covering water bodies around the world. Therefore, the MDN was applied in its default mode to PRISMA images, considering a specific subset of \begin{table}
\begin{tabular}{c c c} \hline
**Study Area** & **PRISMA** & **EnMAP** \\ \hline Lake Peipsi & L1 + POLYMER & L2A standard product \\ Lake Vortsjarv & L2C standard product & L2A standard product \\ \hline \end{tabular}
\end{table} 
Table 2: Atmospherically corrected products used in this study. bands from 504 to 723 nm. The cloudy pixels were masked using the threshold proposed in [84].