detect_fire.py

Single-file MOD14-inspired fire detection with absolute threshold and contextual anomaly tests.

detect_fire.py - Fire detection in MASTER L1B HDF4 data.

Implements a MOD14-inspired fire detection algorithm using:
  • Absolute brightness temperature thresholds (T4 > 325K daytime)

  • Contextual anomaly detection (T4 exceeds local background by N sigma)

Usage:

python detect_fire.py

detect_fire.load_master_file(filepath)[source]

Load key datasets from a MASTER L1B HDF4 file.

Returns dict with radiance (only Ch 31 and 48), lat, lon, solar zenith, effective wavelengths, and temp correction coefficients.

detect_fire.apply_temp_correction(T_planck, slope, intercept)[source]

Apply MASTER post-Planck temperature correction: T = slope*T + intercept.

detect_fire.compute_fire_channels(data)[source]

Compute corrected brightness temperatures for T4 (~3.9um) and T11 (~11.25um).

Returns (T4, T11) arrays in Kelvin.

detect_fire.print_summary(filepath, result)[source]

Print fire detection summary to console.

detect_fire.plot_detection(data, result, filepath, suffix='')[source]

Plot 2x2 panel: T4, T11, delta-T, fire overlay.

detect_fire.plot_map(data, result, filepath)[source]

Plot georeferenced fire pixel map.

detect_fire.plot_comparison(data_pre, result_pre, data_burn, result_burn)[source]

Side-by-side pre-burn vs burn comparison.

detect_fire.main()[source]