
Dequantize signed-power embedding codes.
dequantize_signed_power.RdThe decode sign(x) * (|x| / scale)^power: per-value, nonlinear and
sign-preserving. Geo-embedding products store float vectors as Int8
codes this way, spending more codes near zero where most values sit;
with the usual scale = 127.5 the code range [-127, 127] maps to
about [-1, 1]. The signed_power method of the Embeddings Zarr
Convention's geoemb:quantization metadata names the two parameters.
dequantize_aef() and dequantize_olmoearth() are this decode with
power = 2.
Details
Written in the g_* vocabulary, so applying it with lazy_map() after
lazy_dataset() fuses the decode onto the read, on the device rather
than as a separate decode pass. A nodata code (-128 in both
products) must reach the decode as NaN: lazy_dataset() does that
whenever the source declares it (a GeoTIFF nodata value, a Zarr fill
value), and NaN passes through the decode unchanged.