- Home
- Documentation
- Tutorials
- AVIRIS-3 walkthrough
AVIRIS-3: a source-aware walkthrough¶
This curated guide explains the actual logic of aviris3_tutorial.ipynb without presenting demonstration settings as production recommendations. Read the complete original notebook for all parameter tables, plots, and saved logs.
1. Understand the experiment¶
The example uses five AVIRIS-3 flightlines from 5 October 2023. The first line supplies a 500 × 500 output window at rows 3000–3500 and columns 400–900. Those indices are specific to this dataset. The mapped grids can be rotated, so geographic correspondence is not established by matching one-dimensional coordinate arrays alone.
2. Inspect the control panel¶
All four processing switches are enabled in the saved AVIRIS-3 notebook. Sampling defaults to SAMPLE_REGION="rows", SAMPLE_ROWS=2000, strategy="pixels", fraction 0.1, and a cap of 250,000 sampled pixels per image. The supplied fitting region spans the full swath width but not the full flightline length.
The two important extents are therefore different: a fitting region that retains angular diversity, and an export window that bounds the output size. Changing only the export window does not necessarily change the model's fitting population in every workflow; inspect how the helper constructs it.
3. Open and verify provider products¶
The notebook opens provider L2A reflectance for all five lines and identifies L1B radiance for the first. It examines geometry and demonstrates both GeoTIFF and ENVI export on a smaller 60 × 60 patch.
The shared geometry helper can diagnose and repair the stored slope convention. Retain the recorded diagnostic and do not generalize a correction found for this delivery to every instrument product.
4. Atmospheric retrieval is its own branch¶
The first-line radiance window enters atmos.process(stages=("ac",)). The saved log shows that an existing reflectance retrieval was reused. Its comparison with provider L2A near 865 nm reports RMSE 0.0023 and correlation 0.9998. These are archived single-window/single-band numbers, not a claim of full-spectrum or global accuracy.
5. Fit provider-reflectance corrections¶
Samples are built from the five provider L2A regions. Topographic models are fitted per line; none of the saved verdicts is correct. The notebook deliberately passes force_topo=True, so the displayed effects must be labeled forced examples.
Two grouped BRDF models are fitted: one on original samples (bc_plain) and one after the selected topographic treatment (bc_after). The corresponding output branches are BRDF-only and topo→BRDF. This is a comparison of different treatment branches, not a reversed BRDF→topographic experiment.
6. Export and evaluate¶
The notebook exports topo-only, BRDF-only, and combined 500 × 500 products. It also compares an overlapping pair of flightlines. Saved median-relative-agreement changes are approximately +5–6% at selected visible/NIR bands, but negative at 449 nm and the shown SWIR bands. Report the mixed result, not just successful wavelengths.
Use held-out flightlines, spatial blocks, or independent observations for stronger evaluation. The overlap pair can involve data from the model-fitting group, and the comparison area is not guaranteed to equal the training region.
7. QA and post-processing are demonstrations¶
The QA section builds flags for win_ds, then creates clear. The spectral section uses win_ds and a small computed patch of it—not automatically clear, ac, or the corrected stage products. If your scientific workflow requires corrected-and-masked inputs, explicitly pass that dataset to the spectral functions.
8. Reload the saved atmospheric product¶
A local rasterio helper reconstructs a dataset and attaches source-window geometry. The notebook then applies coefficients fitted to provider L2A, not coefficients refitted to the new retrieval. This is coefficient transfer and should be evaluated as such.
Production-oriented adaptation¶
Keep force_topo=False; inspect gates; select representative fitting populations; record source band quality and geometry; choose the exact dataset entering each analysis; validate on held-out evidence; and retain full-spectrum diagnostics and provenance. A comprehensive published benchmark remains awaiting validation.