# Closed-Form Method for Atmospheric Correction (CMAC) of SmallSat Data Using Scene Statistics
## 2 Materials and Methods
### Data Analysis  
CMAC and Sen2 Cor corrections were run for the area within each QIA polygon for each image tile. Pixel values were extracted for the four VNIR bands from each QIA for three treatments: TOAR, CMAC-corrected and Sen2 Cor-corrected. To provide easy-to-follow documentation, all statistical analyses were performed in Excel spreadsheets. For both analyses, statistical distributions for these treatments were recorded, by band, for each image as cumulative percentiles starting at 0.1, 1, 3 and 5, then continuing in five-percentile increments to the cumulative reflectance at the 95 th percentile. The suite of 22 separate statistics for each QIA permitted assessment of AC performance across the range from dark to bright reflectance. Statistical analyses were treated separately for each QIA because the reflectance within each QIA was internally consistent, but variable compared to the other QIAs. Statistical dispersion (therefore, also its antonym, precision) was evaluated for each QIA dataset using the coefficient of variation expressed as a percent (CV%) and calculated from the ratio of standard deviation to the mean for the suite of 28 images.  
Estimation error was evaluated for Analysis 2 in an initial step assessed per QIA by averaging the percentile-wise values of the three lowest Atm-I images. The resulting averages per QIA were treated as the standard to estimate error for each percentile of each image within that QIA according to  
\[\%\ \text{error}=100\ \times(\text{value}-\text{standard})/\text{standard}\]  
Figure 9: Google Earth closeup images of six QIAs: (**a**) Chino; (**b**) Ontario; (**c**) Highgrove; (**d**) Fontana; (**e**) Redlands; and (**f**) Rochester.  
The resulting values of % error for each band were then pooled from the six QIAs to evaluate error statistics for the operational range of Atm-I and from dark to bright reflectance for both CMAC and Sen2 Cor. These error statistics were tracked for each cumulative percentile for each image and were included in the pooled sample that was then ranked from low to high to provide for graphical assessment of CMAC and Sen2 Cor error distribution. The pooled sample resulted in suites of \(n=3696\) (6 QIAs \(\times\) 28 images \(\times\) 22 percentiles) error estimates for each band of both treatments.  
Data extracted from the 46 total S2 images were exported to and analyzed in Excel spreadsheets where figures were generated. A list of these images is presented in Appendix A. All Atm-I data quoted in this paper are median values for the region within each QIA boundary. The data presented in this section are excerpted from over 4000 individual extracted median estimates of surface reflectance from 22 cumulative percentile steps of the reflectance distributions for each of three treatments: TOAR, CMAC and Sen2 Cor. These data were examined for the 18 images of the Reno QIA (Analysis 1) and the 28 images of the six Southern California QIAs (Analysis 2).  
The workflow for this assessment was comprised of the following steps: (1) clipping the Atm-I, TOAR, Sen2 Cor, and CMAC-corrected image bands from the image tiles to each QIA boundary and extracting the median statistics from the clipped areas; (2) aggregating the treatment data for each QIA, sorting it by band and in order of increasing Atm-I; (3) generating Excel spreadsheets containing the aggregated data and (4) analyzing the spreadsheet data within Excel to generate the summary plots and tables. The interested reader is invited to download the Excel data analysis spreadsheets that are available in Supplementary Materials and to test correct 4-band VNIR Sentinel 2 images using the S2 Cloud Pipeline. Instructions for access are given in Supplementary Materials.