lib.fire¶
Fire detection algorithms: absolute threshold, contextual anomaly, day/night classification, and connected component zone analysis.
Fire detection algorithms: threshold, contextual, zone analysis, and ML.
- lib.fire.detect_fire_simple(T4, T11, T4_thresh=325.0, dT_thresh=10.0)[source]¶
Simple absolute fire detection (no contextual test, for speed on mosaics). Based on MODIS MOD14 / Giglio et al. approach.
- lib.fire.is_daytime(solar_zenith, threshold=85.0)[source]¶
Return boolean mask: True where pixel is daytime (SZA < threshold).
- lib.fire.detect_fire(T4, T11, daytime, T4_day_thresh=325.0, T4_night_thresh=310.0, delta_T_thresh=10.0, context_window=61, context_sigma=3.0)[source]¶
Run fire detection on a MASTER scene with contextual anomaly test.
- Parameters:
T4 (ndarray) – Brightness temperature at ~3.9 μm [K].
T11 (ndarray) – Brightness temperature at ~11.25 μm [K].
daytime (ndarray) – Boolean mask, True = daytime pixel.
T4_day_thresh (float) – Daytime absolute T4 threshold [K].
T4_night_thresh (float) – Nighttime absolute T4 threshold [K].
delta_T_thresh (float) – Minimum T4-T11 difference [K].
context_window (int) – Sliding window size [pixels].
context_sigma (float) – Number of std deviations above local mean for anomaly.
- Return type:
Returns dict with detection masks and intermediate arrays.
- lib.fire.detect_fire_zones(fire_mask)[source]¶
Find connected fire zones using 8-connectivity.
- Returns:
2D int array (0 = no fire, 1..N = zone ID) n_zones: number of zones zone_sizes: list of (zone_id, pixel_count) sorted largest-first
- Return type:
labels
- Parameters:
fire_mask (ndarray)