Skip to content

Repository files navigation

FireSpec

Hyperspectral wildfire analysis for Planet Tanager-1 imagery | burn severity mapping and live fuel moisture estimation for the 2025 LA wildfires.

Python License: MIT Tests

FireSpec is an open-source Python toolkit built for the Planet Tanager Open Data Competition. It turns Tanager-1's 426-band hyperspectral imagery (380–2500 nm, 30 m GSD) into wildfire products: MESMA-based burn severity (BARC), spectral water-content mapping from resolved absorption features, multi-temporal recovery trajectories, and cross-sensor comparisons against EMIT, PRISMA, and Sentinel-2 using the 2025 LA wildfires as the case study.


Results at a Glance

Figures below are generated by the notebooks in notebooks/ and exported to figures/. Run make notebooks && make figures (or execute the notebooks directly) to reproduce them locally.

Product Metric Value
Burn severity (RF classifier vs BAER SBS) ground truth BAER Soil Burn Severity (Hughes fire)
DINS cross-check (dNBR vs structure damage) F1 (any damage) / Spearman rho 0.774 / 0.358
MESMA char fraction R² — EMIT (285 bands) R² vs. native Tanager-1 0.991
MESMA char fraction R² — PRISMA (239 bands) R² vs. native Tanager-1 0.957
MESMA char fraction R² — Sentinel-2 (10 bands) R² vs. native Tanager-1 0.361

Full derivations in notebooks/02-burn-severity.ipynb, notebooks/03-fuel-moisture.ipynb, and notebooks/05-sensor-comparison.ipynb.

Burn Severity Temporal Recovery
Burn severity map Temporal recovery trajectory
MESMA-derived BARC severity classification over the Palisades burn scar (RF classifier trained on BAER SBS ground truth) NBR/NDVI/LFMC recovery trajectory across 4 Tanager scenes spanning 2 fire complexes (Palisades and Hughes), Dec 2024 – Apr 2025
Spectral Water Indices Recovery by Severity Class
Water-absorption index map NBR/NDVI recovery stratified by BARC severity class
SAI970/SAI1200 and continuum-removal water-absorption depth maps from resolved hyperspectral features NBR/NDVI trajectories split by BARC severity class, Palisades footprint
Sensor Information Loss Spectral Degradation
R² vs. native Tanager-1 retrieval as a function of simulated sensor spectral resolution Spectral degradation of a vegetated pixel across Tanager-1, EMIT, PRISMA, and Sentinel-2 band configurations
Narrow absorption-feature products (e.g., MESMA char. fraction) degrade fastest as spectral resolution coarsens; broadband ratios (NBR/NDVI) are comparatively robust Simulated band responses show Sentinel-2 has no coverage of the 1200 nm water-absorption window that EMIT/PRISMA/Tanager-1 resolve

See notebooks/05-sensor-comparison.ipynb for the full quantified improvement ratios of Tanager's 426 bands vs. coarser multispectral/hyperspectral sensors, and docs/technical-memo.md for the full write-up.


Installation

git clone https://github.com/gpriceless/tanager_wildfire.git
cd tanager_wildfire
pip install -e .

Optional extras:

# Development tooling (pytest, ruff, mypy)
pip install -e ".[dev]"

# Jupyter notebook suite (jupyter, nbformat)
pip install -e ".[notebook]"

# Everything
pip install -e ".[dev,notebook]"

Requires Python 3.10+ (CI runs on 3.12). MESMA spectral unmixing needs the optional mesma extra: pip install -e ".[mesma]".

Data

Tanager-1 scenes are accessed via Planet's public STAC catalog — no authentication required:

import tanager
scenes = tanager.list_fire_scenes()          # browse the fire collection
tanager.download_scene(scenes[0], "data/raw/fire/")

No scene data ships with the repository — data/raw/ is gitignored, so a fresh clone starts empty. Download the LA wildfire scenes (pre-fire, immediate post-fire, and recovery timepoints) into data/raw/fire/ using the snippet above; see notebooks/01-data-discovery.ipynb for a full walkthrough of STAC catalog traversal and scene selection.


Quickstart

import tanager

scenes = tanager.list_fire_scenes()
ds = tanager.load_ortho_scene("data/raw/fire/20250123_185507_64_4001_ortho_sr_hdf5.h5")
nbr = tanager.nbr(ds)
tanager.plot_map(nbr, product_name="nbr")

This loads a post-fire ortho-rectified surface reflectance scene (downloaded via the Data section above), computes the Normalized Burn Ratio, and renders a georeferenced map. See docs/api-reference.md for the full public API, or the notebooks below for end-to-end workflows (severity mapping, LFMC estimation, temporal trajectories, sensor comparison).


Notebooks

Notebook Description
01-data-discovery.ipynb STAC catalog traversal and scene inventory — discovering and cataloging the LA wildfire time series
02-burn-severity.ipynb MESMA spectral unmixing and BARC burn severity classification, trained against real BAER Soil Burn Severity ground truth (Hughes fire), with RF classifier and NBR-threshold baseline comparison
03-fuel-moisture.ipynb Spectral water-content mapping via SAI, NDWI, and continuum-removal absorption depths, with Globe-LFMC data-availability assessment
04-temporal-recovery.ipynb Multi-temporal vegetation recovery trajectories across 4 downloaded Tanager scenes forming 2 disjoint fire-complex pairs (Palisades and Hughes), Dec 2024 – Apr 2025
05-sensor-comparison.ipynb Tanager-1 vs EMIT / PRISMA / Sentinel-2 spectral degradation and information-loss analysis

Notebooks ship with pre-computed outputs. To reproduce from scratch:

make install     # pip install -e ".[dev,notebook]"
make notebooks    # jupyter nbconvert --execute notebooks/*.ipynb
make figures      # export publication figures to figures/

Cross-sensor validation data (AVIRIS-3)

Burn-severity output is validated against NASA JPL AVIRIS-3 L2A reflectance (ORNL DAAC, DOI 10.3334/ORNLDAAC/2357). The raw cubes are ~24 GB and are not stored in this repo. Fetch them with a free NASA Earthdata login:

scripts/download_aviris3.sh    # reads data/raw/aviris3/aviris3_jan23_palisades_urls.txt; needs ~/.netrc

So the validation still reproduces without the full download, three derived artifacts are committed:

Artifact What it is
outputs/aviris3_validation/tanager_palisades_fractions.nc Tanager MESMA char/ash fractions over Palisades (24 MB)
outputs/aviris3_validation/cross_validation_results.json Per-granule cross-sensor accuracy metrics
data/reference/dins/palisades_dins.geojson CAL FIRE DINS structure-damage reference (public)

API Reference

Full public API — function signatures, parameters, and usage examples for all modules (config, catalog, io, spectral, masks, endmembers, unmixing, severity, lfmc, validation, visualization) — is documented in docs/api-reference.md.


Competition

Built for the Planet Tanager Open Data Competition (deadline August 31, 2026), submitted under the Code & Scripts track.


Citation

If you use FireSpec in your work, please cite it (see CITATION.cff):

@software{price_firespec_2026,
  author  = {Price, Gabriel},
  title   = {{FireSpec}: Hyperspectral Wildfire Analysis for Planet Tanager-1 Imagery},
  year    = {2026},
  url     = {https://github.com/gpriceless/tanager_wildfire},
  license = {MIT}
}

License

Released under the MIT License.

About

FireSpec: hyperspectral wildfire analysis of the January 2025 Los Angeles fires using Planet Tanager-1's 426-band imagery: burn-severity mapping (dNBR/MESMA/BARC), live fuel-moisture estimation, and multi-temporal recovery trajectories. Submission to the Planet Tanager Open Data Competition.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages