Examples
Worked code examples covering the full BioSNICAR workflow. These examples correspond to the scripts in the examples/ directory of the repository. Each can be run from the repository root:
python examples/01_basic_forward_model.py
python examples/05_emulator_predict.py --plot
python examples/10_end_to_end_workflow.py --plotOverview
| # | Topic | What you’ll learn |
|---|---|---|
| 01 | Forward Model | run_model() with defaults, overrides, multi-layer, spectral output |
| 02 | Parameter Sweeps | 2D/3D sweeps, impurity sweeps, spectral output |
| 03 | Remote Sensing | .to_platform() chaining, GCM bands, multi-platform |
| 04 | Building Emulators | Custom emulator training, accuracy validation |
| 05 | Emulator Prediction | Load, predict, batch prediction, speed comparison |
| 07 | Spectral Inversion | SSA retrieval from field spectrometer data |
| 08 | Satellite Inversion | Band-mode retrieval from Sentinel-2, Landsat, MODIS |
| 10 | End-to-End | Full pipeline from observation to physical interpretation |
| 11 | Subsurface Light | PAR depth profiles, spectral heating rates |
Dependencies
- Examples 01–03 need only the base BioSNICAR dependencies
- Examples 04 and 06 require
scikit-learn(forEmulator.build()) - Example 09 with
--mcmcrequiresemcee --plotrequiresmatplotlib- Examples 05–10 require the pre-built default emulator at
data/emulators/glacier_ice_8_param_default.npz