delta_nbr¶
- delta_nbr(pre_nir, pre_swir2, post_nir, post_swir2)[source]¶
Change in NBR (pre - post) for burn severity analysis.
- Parameters:
pre_nir (
numpy.ndarray) – Pre-event NIR and SWIR2 bands.pre_swir2 (
numpy.ndarray) – Pre-event NIR and SWIR2 bands.post_nir (
numpy.ndarray) – Post-event NIR and SWIR2 bands.post_swir2 (
numpy.ndarray) – Post-event NIR and SWIR2 bands.
- Returns:
ΔNBR array (same shape as inputs). Larger positive values generally indicate higher burn severity.
- Return type:
Notes
Inputs may be any numeric dtype; internal coercion to float64.
Overview¶
delta_nbr computes the change in the Normalized Burn Ratio (NBR) between two epochs
(e.g., pre‑fire and post‑fire). It is defined as:
where each NBR is:
Positive ΔNBR values typically indicate burn severity (larger reduction in NIR / increase in SWIR2), while near‑zero or negative values can suggest little change or recovery.
Formula¶
Compute NBR for the pre‑event bands: \((NIR_{pre} - SWIR2_{pre}) / (NIR_{pre} + SWIR2_{pre})\)
Compute NBR for the post‑event bands: \((NIR_{post} - SWIR2_{post}) / (NIR_{post} + SWIR2_{post})\)
Subtract: \(\Delta \mathrm{NBR} = \mathrm{NBR}_{pre} - \mathrm{NBR}_{post}\)
Very small denominators (|NIR + SWIR2| < 1e-10) in either epoch are guarded internally and yield a 0.0 contribution for that pixel’s NBR.
Parameters (see signature)¶
nir_pre: Near‑infrared reflectance array (pre‑event)swir2_pre: SWIR2 reflectance array (pre‑event)nir_post: Near‑infrared reflectance array (post‑event)swir2_post: SWIR2 reflectance array (post‑event)
All arrays must have identical shape (1D, 2D; higher ranks may dispatch through internal normalized difference logic but only 1D/2D are formally documented).
Returns¶
numpy.ndarray (float64) with the same shape as the input arrays, containing ΔNBR values.
Typical dynamic range is roughly [-2, 2], though interpretability focuses on relative
magnitude rather than absolute bounds.
Usage¶
import numpy as np
from eo_processor import delta_nbr
nir_pre = np.array([0.62, 0.58, 0.55])
swir2_pre = np.array([0.25, 0.22, 0.20])
nir_post = np.array([0.40, 0.37, 0.35])
swir2_post= np.array([0.30, 0.28, 0.27])
d = delta_nbr(nir_pre, swir2_pre, nir_post, swir2_post)
print(d) # Positive values -> burn impact
Interpretation (Guideline – scene & sensor dependent)¶
Higher positive ΔNBR: stronger burn / disturbance. Moderate positive: partial burn or mixed recovery. Near 0: little change. Negative: potential regrowth, moisture increase, or noise (validate with ancillary data).
Numerical Stability¶
Each epoch’s denominator uses an epsilon (~1e-10). If |NIR + SWIR2| < epsilon for that epoch,
its NBR contribution is set to 0.0, limiting ΔNBR magnitude inflation.
Error Handling¶
Shape mismatch →
ValueError.Non-numeric or unsupported ndim →
TypeError.
See Also¶
nbr()– single-epoch Normalized Burn Ratiodelta_ndvi()– vegetation change detectionndmi()– moisture index (complementary for recovery assessment)normalized_difference()– underlying primitive pattern
Notes¶
For classification of burn severity, apply published threshold schemes (e.g., USGS ΔNBR classes) on atmospherically corrected surface reflectance. Thresholds vary by sensor and preprocessing.
End of delta_nbr documentation.