osmose.engine.processes.salinity_gate

Salinity-dependent occupancy weighting for movement (prototype spike).

Pure helpers: a salinity -> [0,1] occupancy weight and its application to a 2D movement map with an all-zero guard. See docs/superpowers/specs/2026-07-04-salinity-gated-cod-occupancy-design.md.

Functions

salinity_weight(salinity, s_low, s_high)

Per-cell occupancy weight in [0,1]: clip((S - s_low)/(s_high - s_low), 0, 1).

salinity_weighted_map(map2d, weight_grid)

Apply a precomputed per-cell weight to a movement map.