01The idea
Spectral mixture analysis reads each pixel's six reflectances as a mix of a few pure materials, the endmembers: green vegetation (GV), non-photosynthetic vegetation (NPV: dead wood, dry leaves), soil, shade and cloud. The NDFI (Normalized Difference Fraction Index, Souza et al. 2005) combines them:
NDFI = (GVshade − (NPV + soil)) / (GVshade + NPV + soil)
where GVshade is the green vegetation normalized by the shade. Closed forest is near 1; a canopy opened by logging or a fire drops, while it still reads as forest to the NDVI; pasture and bare soil go below 0.
CODED (Continuous Degradation Detection, Bullock et al. 2020) fits a harmonic model of the NDFI over a training period, then watches every later observation: a few in a row far below the model are a change. After it, a new model; if its mean NDFI is still that of a forest, the change was degradation, otherwise deforestation.
Both need Landsat-style surface reflectance (blue, green, red, NIR, SWIR1, SWIR2) with real dates; CODED also needs at least two observations a year, and a quality band helps both.
02The example
The same Landsat 8 and 9 series as the CCDC guide: 125 dates, February 2020 to August 2026, of central Rondônia, with its QA_PIXEL band. The map is zoomed in on a forest cleared in May–June 2022, 261 × 196 pixels around it.
03The NDFI
Tools → Spectral analysis → NDFI (spectral unmixing) unmixes every observation with the endmembers of Souza et al. (2005). Run on the raster, it writes the NDFI of every date as a new series, opened as a layer over the others, ready for LandTrendr, BFAST or the agreement; and three maps: the mean NDFI, the lowest, and the observations used.
Max cloud fraction (0.05) leaves out the observations whose unmixed cloud fraction is larger: thin clouds and haze the quality band missed.
04CODED on the chart
Tools → Change detection → CODED (degradation). Its bands are found as for CCDC. On the chart, with the layer showing a normalized difference, CODED adds the NDFI of each observation, the training mean, and a vertical line at each change.
The forest opened in 2021 and partly grown back reads differently:
05The parameters
| Parameter | Default | What it does |
|---|---|---|
| Reflectance units | auto | The endmembers are reflectances: 0–1, × 10000 or Collection 2 digital numbers, detected from the values. |
| Monitoring start | 0 | The year monitoring starts; the training period is before it. 0: the training starts with the series. Here 2022. |
| Training period | 3 | Years of training, whose NDFI model the monitoring compares with. Here 2, all the series has before 2022. |
| Consecutive observations | 3 | Observations in a row beyond the threshold that make a change. |
| Threshold (RMSEs) | 3 | How far below the model, in RMSEs of the training fit. |
| Years after a change | 3 | Modelled as the land after a change, and the least time between two changes. |
| Min observations | 6 | Least observations to fit a model. |
| Changes | loss | Only drops of the NDFI, as CODED, or rises too. |
| Max changes | 3 | Changes kept per pixel. |
| Forest NDFI | 0.5 | A model with a mean NDFI at least this is forest: before the change (forest or not), after it (degradation or deforestation). |
| Max cloud fraction | 0.05 | Observations with more unmixed cloud are left out. |
06The maps
Run over the visible area (14 s here; about 80 s for the whole 1.2 million pixels), CODED maps:
| Map | Meaning |
|---|---|
| Strata | Forest, non-forest, degradation, deforestation, or disturbance (a change outside forest). |
| First / last change date | The earliest and the latest change. |
| NDFI change at the first change | The NDFI after it minus before it. |
| Changes | How many changes. |
| Mean NDFI of the training period | What the land was before. |
07How strict
With only two years of training, about nine clear observations, the model of a forest pixel is tight, and ordinary variation from one dry season to the next crosses 3 RMSEs: above, much of the standing forest reads as degraded. At 5 RMSEs only the strong drops are left: the clearings, in red, and far less orange. There is no right threshold in general. Check it on pins over forest you know untouched and over logging you know of, and give CODED a longer training period when the series allows.
08What next
- Every band, every break: CCDC on the same series.
- The NDFI series in other tools: LandTrendr on yearly NDFI composites, BFAST on a regular NDFI series.
- Validate the strata: they are a map of classes with change in it; see the Validation guide.
- Script it:
zeit.unmixandzeit.codedin Python.
09References
- Bullock, E. L., Woodcock, C. E., Olofsson, P. (2020). Monitoring tropical forest degradation using spectral unmixing and Landsat time series analysis. Remote Sensing of Environment, 238, 110968.
- Souza, C. M., Roberts, D. A., Cochrane, M. A. (2005). Combining spectral and spatial information to map canopy damage from selective logging and forest fires. Remote Sensing of Environment, 98, 329–343.
- Zeit: the change detection library behind the tools of Janus.



