ExamplesOverview

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 --plot

Overview

#TopicWhat you’ll learn
01Forward Modelrun_model() with defaults, overrides, multi-layer, spectral output
02Parameter Sweeps2D/3D sweeps, impurity sweeps, spectral output
03Remote Sensing.to_platform() chaining, GCM bands, multi-platform
04Building EmulatorsCustom emulator training, accuracy validation
05Emulator PredictionLoad, predict, batch prediction, speed comparison
07Spectral InversionSSA retrieval from field spectrometer data
08Satellite InversionBand-mode retrieval from Sentinel-2, Landsat, MODIS
10End-to-EndFull pipeline from observation to physical interpretation
11Subsurface LightPAR depth profiles, spectral heating rates

Dependencies

  • Examples 01–03 need only the base BioSNICAR dependencies
  • Examples 04 and 06 require scikit-learn (for Emulator.build())
  • Example 09 with --mcmc requires emcee
  • --plot requires matplotlib
  • Examples 05–10 require the pre-built default emulator at data/emulators/glacier_ice_8_param_default.npz