SatHDSS
Processing chain

How a satellite pass becomes a modelled number

Eleven decisions, each one a place where the pipeline could quietly produce a wrong answer. They are documented here because the difference between a defensible result and an artefact usually lives in these steps rather than in the model.

Extraction

Water masking 06/10_algae_*.py

Every algae index is computed OVER WATER ONLY. A chlorophyll index measured over a rice paddy is meaningless, so each sensor block builds a water mask first and applies it before reducing.

MNDWI = (Green - SWIR) / (Green + SWIR), threshold 0.10
Harmonised schema 10_algae_daily_3sites.py

Five sensors, one output schema. Without this you get five differently shaped files and the reconciliation is left to you.

date, site, sensor, res_m, chl_index, ndci, fai, phyco, turbidity, bloom_frac, water_px, cloud_frac

Filling and QC

Cross-sensor bias correction 11_algae_daily_fill.py

A Landsat green/blue ratio and a Sentinel-2 NDCI polynomial are not the same number. Blending them raw creates a fake step change in 2015 that surfaces in the model as a trend. Each sensor is regressed onto a reference on same-day overlaps.

y_ref = slope * x_sensor + intercept, fitted on same-day pairs, minimum 20
Resolution priority cascade 11_algae_daily_fill.py

Where several sensors observed the same day, the finest resolution wins.

s2 (20 m) > landsat (30 m) > s3 (300 m) > modis (250 m) > ocean (4 km)
Gap filling with provenance 11_algae_daily_fill.py

Short gaps by interpolation · long gaps from a smoothed day-of-year climatology anchored to the local level, so a filled monsoon day looks like a monsoon day. Every value carries its method.

fill_method in (observed, interp, climatology)
Water-pixel QC 09/11_algae_*.py

A chlorophyll value computed from three water pixels is not a measurement. Values below the pixel floor are nulled, not kept.

water_px >= 25 (configurable)

Aggregation

Ocean colour stays monthly 09_algae_merge.py

Jutla et al. 2012 measured lag-1 autocorrelation of 0.20 for daily 9 km coastal chlorophyll. It is white noise. Monthly values are forward-filled onto weeks only so the join works, and every filled week is flagged.

aggregate to calendar month before modelling
Regional forcing prefix 09_algae_merge.py

Coastal boxes attach to Chakaria as local exposure but to Matlab and Dhaka as regional forcing only. The reg_ prefix exists so ocean-colour chlorophyll cannot be misread as a Dhaka measurement.

reg_chl_ocean, reg_swm

Analysis

Distributed lag testing 05_lag_analysis.py

14 lag steps from same-week to a year. Pre-register the expected lag per variable - 34 variables x 14 lags x 3 sites is 1,428 cross-correlations and some will clear p<0.05 by chance.

0,1,2,3,4,6,8,10,12,16,20,26,39,52 ISO weeks
Model ladder M0 to M5 (analysis)

Each rung must beat the one before. The study's whole claim lives in the M3 to M4 step, where algae variables are added to a strong hydro-climate model.

M0 season, M1 +autoregressive, M2 +weather, M3 +hydrology, M4 +ALGAE, M5 +long lead
Rotavirus negative control (analysis)

The identical M4 specification run against rotavirus, which is winter-peaking, person-to-person and has no aquatic reservoir. If algae predicts cholera but not rotavirus, shared seasonality and shared care-seeking are excluded in one figure.

same predictors, outcome = rota (codebook row 292)

The model ladder

RungName Variables enteringWhat it testsMust beat
M0Seasonality onlyISO week harmonics + year trend How much of cholera is bare calendar?—
M1Autoregressive+ prior prevalence, immunity proxy How much is epidemic momentum?M0
M2Weather+ rainfall, anomaly, extremes, LST, air temperature The standard climate–cholera model. Your real competitor.M1
M3Hydrology+ open-water fraction, flood duration, discharge, stage Does inundation add over weather?M2
M4 ALGAE — the point of the study + NDCI, FAI, phycocyanin, bloom fraction, phenology, coastal chlorophyll, SWM Do algae variables add skill over a strong hydro-climate model? If M4 does not beat M3, that is the finding — report it.M3
M5Long lead+ ENSO, IOD, MJO, Himalayan winter temperature, SST, SSS Can lead time reach 6–11 months?M4
NC Negative controlM4 specification, rotavirus outcome Is the algae signal cholera-specific?should not work
The specificity check is already in your data. The hospital codebook carries rota, vco1tot, shigtot, totsalmo, campy and aerom1. Rotavirus is winter-peaking, person-to-person and has no aquatic reservoir. Run the identical M4 specification against it: if the algae terms predict cholera but not rotavirus, shared seasonality, shared care-seeking and shared surveillance artefacts are all excluded in one figure. If they predict both, you are modelling a season rather than a mechanism — better to learn that in week 20 than in peer review.
Evaluation. Hold out time, not space: fit 2000–2018, evaluate 2019–2026. Random k-fold on a temporally autocorrelated panel gives an optimistic number that will not survive review. Run the ladder separately at each site — the gradient hypothesis predicts the M3 → M4 gain is large at Chakaria, moderate at Matlab and small at Dhaka.