# Vibe‑Coding a Gaea‑Driven Color Pipeline This document is a high‑level walkthrough of a four‑step pipeline that turns raw reflectance + landuse into georeferenced color tiles, with Gaea doing the heavy lifting on the aesthetic side. If you’re comfortable vibe‑coding, you’ll be able to rebuild it with the same behavior and avoid the gotchas. The pipeline stages: 1. Build masked reflectance (Step 1) 2. Blur/patch the color inputs + prep DEM (Step 2) 3. Run Gaea to generate a color render (Step 3) 4. Apply georeferencing, blend overlaps, and export (Step 4) Below I describe what each step does, the intent behind it, and the pitfalls it handles. --- ## Step 1 — Build masked reflectance **Goal:** create “reflectance tiles” where landuse masks (and manual masks) are already applied so downstream steps can treat masked areas as fill zones. **Inputs you’ll likely have:** - Surface reflectance tiles (10 m or similar). - A landuse mask raster (categorical classes like cropland, built‑up, water). - Optional manual polygons for “fix this region” or “always mask this out.” **What it does:** - For each reflectance tile, it paints masked pixels with a sentinel color (e.g., pure magenta `255,0,255`). This “pink” becomes the universal “please inpaint me” signal later. - It writes a new tile alongside the originals (or into a separate output folder). - It builds/updates a VRT so the whole set can be accessed as one mosaic. **Gotchas the code handles (and you should too):** - **Tile naming normalization:** `.tiff` vs `.tif` causes subtle mismatches; normalize names to avoid duplicate outputs. - **Manual mask layering:** manual mask polygons should be applied **after** the landuse mask and should override it. - **Selective rebuild:** it’s useful to rebuild only missing tiles by default, and offer a “force rebuild all” option. - **Mask types:** vector masks (GPKG) and raster masks should both work; if you support both, handle reprojection cleanly. - **Excluded landuse classes:** the default mask only targets `cropland`, `builtup`, `tree`, `water`, and `ocean`. Everything else is treated as “leave as‑is” (not masked), including: `earth` (0–18), `vegetation` (19–24), `unused` (97–239), `wetland` (100–196), `snow` (241–243), and `nodata` (255). Masked classes (for reference): `tree` (25–96), `water` (200–211), `cropland` (244–249), `builtup` (250–253), `ocean` (254). --- ## Step 2 — Blur/patch masked regions + prep DEM **Goal:** for a new tile extent, generate a cleaned reflectance image with masked regions softly filled, and also crop a scaled DEM for later steps. **Inputs you’ll likely have:** - The VRT of masked reflectance tiles (from Step 1). - A base tile to “step from” *or* an explicit lower‑left coordinate. - A DEM VRT (or equivalent) for the same region. **What it does:** - **Chooses the new tile bounds** by stepping from a base tile in a direction (north/south/east/west) with a fixed overlap. - Or uses a specified lower‑left coordinate to anchor the new bounds. - **Crops the reflectance VRT** to that tile extent at native resolution. - **Fills masked (pink) regions** by blending nearby unmasked colors: - First it computes a grid of local means so each masked area fills with nearby context, not a global average. - Then it blurs and blends the result so transitions are smooth. - **Values we settled on for best results:** - `blend_all = 0.8` — keep some global softening so the filled regions don’t read as patchwork. - `grid_size = 768` px — large enough to avoid speckle, small enough to keep local color character. - `overlap = 1024` px — generous seam overlap for later blending. - tile size is **8192×8192** px — big enough that local fills look natural before Gaea. - **How to implement `grid_size`:** - Divide the tile into a coarse grid (cell size = `grid_size` pixels). - For each cell, compute the mean RGB of **unmasked** pixels that fall inside it. - If a cell has no unmasked pixels, fall back to a global mean RGB (or nearest valid cell). - Upsample that coarse RGB grid back to full resolution (bilinear works) to get a smooth “fill color field.” - This gives you a locally aware color guess for masked areas that won’t look like a flat wash. - **How to implement `blend_all`:** - Create a “blurred fill” image (e.g., Gaussian blur or similar on the filled result). - Then blend **everything** toward the blurred image: `out = (1 - blend_all) * original_or_filled + blend_all * blurred` - Masked pixels still get fully replaced by the fill; `blend_all` just adds a global softness so the transition between filled and real pixels isn’t abrupt. - **Crops and scales the DEM** to the same extent, usually to a 0–1 range for easy downstream use. **Gotchas the code handles (and you should too):** - **Alignment matters:** bounds, pixel size, and projection must match the base tile exactly or you’ll drift over time. - **Overlap math:** overlap is in pixels, not meters — be consistent about resolution. - **Lower‑left parsing:** allow a human‑friendly format like `35.5E31N` so people can easily request a tile. - **Masked fill quality:** a single global fill color looks awful; a weighted grid of local means looks natural. - **Keep/cleanup temp files:** offer a debug mode to inspect intermediate files; default to cleanup. --- ## Step 3 — Run Gaea to generate color **Goal:** let Gaea synthesize a believable color render from the prepared inputs. **Inputs you’ll likely have:** - A Gaea `.terrain` file wired to read the outputs from Step 2. - A designated output folder for the color render. **What it does:** - Runs Gaea Swarm (CLI) with a specific profile (e.g., 8K), pointing `ColorOutputPath` to your working directory. - Produces a color raster (e.g., `working/Color.tif`) that has no georeferencing yet. **Gotchas the code handles (and you should too):** - **WSL/Windows path translation:** if you’re in WSL, Gaea is likely in Windows. Convert paths both ways. - **Profile mismatch:** Gaea profiles affect resolution; ensure your profile matches the expected tile size. - **Silent failure:** add checks to confirm the output file actually exists before continuing. --- ## Step 4 — Apply georeferencing + blend overlaps + export **Goal:** take the raw Gaea render, apply correct geodata, blend seams, and export a proper tile. **Inputs you’ll likely have:** - The georeferenced reflectance tile from Step 2 (used as the spatial authority). - The unreferenced Gaea output from Step 3. - Existing tiles for overlap blending (optional but recommended). **What it does:** - **Copies georeferencing** from the reflectance tile onto the color render (same bounds, projection, pixel size). - **Writes output tile** with a lon/lat name based on the lower‑left coordinate. - **Blends overlaps** with neighboring tiles so seams don’t show. - It can detect neighbors automatically or accept explicit `base` + `direction`. - **Converts to COG** and rebuilds the VRT for the output folder. **Gotchas the code handles (and you should too):** - **COG conversion:** do it late so your tile is production‑friendly without extra steps. - **Overlap detection:** neighbors must match size and alignment; reject mismatched tiles. - **Edge tolerance:** floating point rounding in geotransforms can cause “almost aligned” tiles — use a small tolerance. - **Fade naming:** store overlaps as `{base}-{overlay}-fade.tif` so they can be merged into the VRT predictably. --- ## Why this pipeline works The key idea is **separating responsibilities**: - Steps 15/25 create high‑quality, spatially correct inputs. - Step 3 lets Gaea focus on aesthetics without worrying about geodata. - Step 4 re‑attaches the spatial truth and makes the output reusable. This makes the system robust to changes: you can swap out reflectance sources, tweak blur logic, or upgrade the Gaea flow without breaking alignment. --- ## If you’re vibe‑coding this yourself Here’s the minimum you need to reproduce: 1) **A tile‑stepping system** that computes bounds with fixed overlaps. 2) **A masking + fill routine** that makes masked regions plausible. 3) **A Gaea execution wrapper** that runs a `.terrain` and writes to a known path. 4) **A georeference copier** that transfers bounds/projection to a new raster. 5) **A seam‑blending step** so overlaps don’t show. Everything else is optional, but these five parts are the core. --- ## Optional: build reflectance RGB from Sentinel‑2 There’s a helper utility in the repo that builds an RGB reflectance tile from Sentinel‑2 bands (B04/B03/B02). The core idea is: - **Start with unscaled S2 bands** (B04 red, B03 green, B02 blue). - **Apply a fixed LUT per band** to map raw values into an 8‑bit display range. - **Why these LUTs?** We tuned them to match NASA’s HLS quicklook/visualization scaling, so the colors feel consistent with HLS products instead of arbitrary contrast stretching. If you’re re‑implementing this: - Use B04/B03/B02 as the RGB stack. - Build per‑band lookup tables (or piecewise linear curves) based on HLS‑style scaling rather than ad‑hoc histogram equalization. - Keep the LUTs stable across tiles to avoid color “popping” between neighboring scenes. This step is optional if you already have a good reflectance RGB source, but it’s a nice way to stay aligned with HLS visual color conventions. Here are the LUTs we used (per‑band source values mapped to 8‑bit targets): ```python RED_LUT_SRC = [ -114.402908, -49.63862, -32.369705, -14.828683, 3.225826, 17.8257, 32.716239, 394.828423, 555.321767, 653.951198, 727.305775, 781.690298, 830.401212, 871.339423, 907.101905, 940.068101, 969.208288, 995.683191, 1021.097982, 1044.498469, 1067.145041, 1088.150013, 1108.359234, 1127.300276, 1145.410166, 1163.17222, 1179.594362, 1195.416839, 1210.717581, 1225.697653, 1240.09067, 1254.758031, 1268.777704, 1282.393986, 1295.841528, 1308.704367, 1321.642541, 1334.016672, 1346.162747, 1358.097461, 1370.066701, 1382.179281, 1394.128811, 1405.6093, 1416.879235, 1428.076301, 1439.211746, 1450.343728, 1461.262178, 1471.9992, 1482.557416, 1493.49436, 1503.936763, 1514.383024, 1524.813775, 1534.902997, 1545.216719, 1555.394593, 1565.553134, 1575.88198, 1585.732759, 1595.828073, 1605.89185, 1615.764972, 1625.768635, 1635.775757, 1645.735362, 1655.412967, 1665.147192, 1675.04567, 1684.869033, 1694.645018, 1704.429387, 1713.884309, 1723.592855, 1733.165197, 1742.992057, 1752.836822, 1762.518361, 1772.123186, 1782.039946, 1791.802966, 1801.611831, 1811.419402, 1821.184501, 1831.152832, 1841.238557, 1850.718654, 1860.915486, 1870.693621, 1880.779182, 1890.942143, 1901.119699, 1911.223985, 1921.47586, 1931.494658, 1941.654284, 1951.439463, 1961.773246, 1971.922237, 1982.168076, 1992.497093, 2002.876685, 2013.100643, 2023.389384, 2034.074829, 2044.520934, 2055.018649, 2065.785136, 2076.093983, 2086.80835, 2097.540717, 2108.38281, 2119.292555, 2130.097823, 2140.685274, 2151.564226, 2162.798001, 2174.117983, 2185.321875, 2196.413948, 2207.484372, 2218.517282, 2229.878226, 2241.239565, 2252.410257, 2263.646519, 2274.76794, 2286.420198, 2297.97664, 2309.463738, 2321.18451, 2332.853421, 2344.315639, 2356.029242, 2367.37938, 2379.553125, 2390.936693, 2402.432741, 2414.205923, 2426.101275, 2437.795743, 2449.576218, 2461.467532, 2473.609208, 2485.430822, 2497.604903, 2509.750761, 2521.403544, 2533.013729, 2544.850399, 2556.736638, 2568.602542, 2580.334375, 2592.489677, 2604.498463, 2616.684892, 2628.929188, 2641.423211, 2654.072742, 2666.576258, 2679.171611, 2691.418641, 2704.022808, 2717.023168, 2729.727022, 2742.724782, 2755.228754, 2768.158077, 2780.837595, 2793.945312, 2806.658712, 2819.530219, 2832.492153, 2845.814795, 2859.145163, 2872.029797, 2885.558677, 2898.68702, 2912.360533, 2926.033433, 2940.00943, 2953.553493, 2967.509286, 2981.452427, 2995.087115, 3009.172946, 3023.047607, 3037.124713, 3051.339513, 3065.963939, 3080.282138, 3094.240151, 3108.767075, 3122.796189, 3137.680018, 3151.864559, 3166.718744, 3181.302611, 3196.100319, 3211.181985, 3225.854248, 3241.013706, 3256.048759, 3271.219775, 3286.783002, 3302.143799, 3318.048995, 3334.100416, 3350.054843, 3365.65434, 3381.308881, 3397.65332, 3413.824075, 3430.404173, 3446.555248, 3462.573917, 3479.571065, 3496.204501, 3513.218928, 3529.947179, 3546.718408, 3563.693856, 3580.574922, 3597.525629, 3614.503217, 3632.060673, 3649.57355, 3667.176761, 3685.503384, 3703.763973, 3722.172561, 3740.82602, 3759.18935, 3778.02772, 3797.493193, 3816.619775, 3836.849675, 3857.829883, 3878.992443, 3900.991254, 3923.565774, 3947.542929, 3972.563212, 3998.09674, 4025.325641, 4055.374928, 4086.950365, 4121.859145, 4161.204733, 4208.40401, 4265.179509, 4342.403108, 4454.820847, 4685.961162, 8161.819824, ] RED_LUT_TGT = [ 0.0, 0.0, 0.0, 0.0, 1.0, 3.0, 5.0, 81.0, 100.0, 109.0, 115.0, 120.0, 123.0, 126.0, 128.0, 130.0, 132.0, 133.0, 135.0, 136.0, 137.0, 139.0, 140.0, 141.0, 142.0, 142.0, 143.0, 144.0, 145.0, 146.0, 146.0, 147.0, 148.0, 148.0, 149.0, 149.0, 150.0, 151.0, 151.0, 152.0, 152.0, 153.0, 153.0, 154.0, 154.0, 155.0, 155.0, 156.0, 156.0, 156.0, 157.0, 157.0, 158.0, 158.0, 159.0, 159.0, 159.0, 160.0, 160.0, 161.0, 161.0, 161.0, 162.0, 162.0, 163.0, 163.0, 163.0, 164.0, 164.0, 164.0, 165.0, 165.0, 165.0, 166.0, 166.0, 166.0, 167.0, 167.0, 167.0, 168.0, 168.0, 168.0, 169.0, 169.0, 169.0, 170.0, 170.0, 170.0, 171.0, 171.0, 171.0, 172.0, 172.0, 172.0, 173.0, 173.0, 173.0, 174.0, 174.0, 174.0, 175.0, 175.0, 175.0, 176.0, 176.0, 176.0, 177.0, 177.0, 177.0, 177.0, 178.0, 178.0, 178.0, 179.0, 179.0, 179.0, 180.0, 180.0, 180.0, 181.0, 181.0, 181.0, 182.0, 182.0, 182.0, 183.0, 183.0, 183.0, 183.0, 184.0, 184.0, 184.0, 185.0, 185.0, 185.0, 186.0, 186.0, 186.0, 186.0, 187.0, 187.0, 187.0, 188.0, 188.0, 188.0, 189.0, 189.0, 189.0, 189.0, 190.0, 190.0, 190.0, 191.0, 191.0, 191.0, 191.0, 192.0, 192.0, 192.0, 193.0, 193.0, 193.0, 193.0, 194.0, 194.0, 194.0, 194.0, 195.0, 195.0, 195.0, 196.0, 196.0, 196.0, 196.0, 197.0, 197.0, 197.0, 198.0, 198.0, 198.0, 198.0, 199.0, 199.0, 199.0, 199.0, 200.0, 200.0, 200.0, 201.0, 201.0, 201.0, 201.0, 202.0, 202.0, 202.0, 203.0, 203.0, 203.0, 203.0, 204.0, 204.0, 204.0, 204.0, 205.0, 205.0, 205.0, 206.0, 206.0, 206.0, 206.0, 207.0, 207.0, 207.0, 208.0, 208.0, 208.0, 208.0, 209.0, 209.0, 209.0, 210.0, 210.0, 210.0, 210.0, 211.0, 211.0, 211.0, 212.0, 212.0, 212.0, 212.0, 213.0, 213.0, 213.0, 214.0, 214.0, 214.0, 215.0, 215.0, 215.0, 216.0, 216.0, 216.0, 217.0, 217.0, 218.0, 218.0, 219.0, 219.0, 220.0, 221.0, 221.0, 223.0, 224.0, 227.0, 255.0, ] GREEN_LUT_SRC = [ 13.198872, 100.968779, 113.445886, 127.401383, 142.353332, 159.532543, 197.951686, 407.38761, 502.060372, 561.395777, 605.47788, 639.318719, 666.706051, 690.993414, 712.66092, 732.006506, 749.401593, 765.184692, 780.851274, 795.398729, 809.286944, 822.466542, 834.614695, 846.78178, 858.402967, 869.481061, 880.650275, 891.064491, 901.435851, 911.511987, 921.610571, 931.121704, 940.407821, 949.663304, 958.702881, 967.619022, 976.056449, 984.766171, 993.3706, 1001.850545, 1010.390848, 1018.54248, 1026.831705, 1034.623007, 1042.553928, 1050.246101, 1057.848127, 1065.597544, 1073.270534, 1081.052816, 1088.4144, 1096.154712, 1103.611307, 1111.175233, 1118.603564, 1126.096292, 1133.576321, 1140.974542, 1148.32345, 1155.579017, 1162.919771, 1170.152372, 1177.305941, 1184.693639, 1192.105134, 1199.515934, 1206.841586, 1214.013938, 1221.052441, 1228.090655, 1235.16468, 1242.289486, 1249.513428, 1256.6728, 1263.943563, 1271.06459, 1278.246006, 1285.290109, 1292.347941, 1299.278384, 1306.321964, 1313.378165, 1320.73429, 1327.829574, 1335.133689, 1342.546265, 1349.687669, 1357.056598, 1364.112756, 1371.576909, 1378.790046, 1386.134223, 1393.257616, 1400.773387, 1408.239084, 1415.545288, 1422.813317, 1430.272879, 1437.719691, 1445.179149, 1452.555485, 1460.120028, 1467.506055, 1475.18644, 1482.665991, 1490.271176, 1497.937448, 1505.515743, 1513.14341, 1520.854056, 1528.620526, 1536.679228, 1544.463877, 1552.298231, 1559.980362, 1567.824298, 1575.574281, 1583.258071, 1591.072531, 1598.92793, 1606.894876, 1615.014433, 1623.274401, 1631.21216, 1639.404372, 1647.556052, 1655.648238, 1663.86658, 1671.824128, 1679.786088, 1687.802584, 1695.966788, 1704.057423, 1712.211666, 1720.416182, 1728.496467, 1736.757446, 1744.785003, 1753.029663, 1761.135301, 1769.788804, 1778.449123, 1786.981148, 1795.74167, 1804.550503, 1812.962223, 1821.718698, 1830.381125, 1839.306799, 1848.354327, 1857.407255, 1866.484672, 1875.924908, 1884.92959, 1893.95572, 1903.013988, 1912.354482, 1921.503442, 1930.966064, 1940.472132, 1949.858126, 1959.244376, 1968.921496, 1978.515142, 1988.181405, 1997.793435, 2007.804069, 2017.813708, 2027.816271, 2037.875718, 2047.666626, 2057.936523, 2068.077717, 2078.404722, 2088.984392, 2099.388385, 2109.841498, 2120.204102, 2130.733453, 2141.679952, 2152.100155, 2162.894391, 2173.766817, 2184.23316, 2195.31626, 2206.654598, 2217.523934, 2228.779687, 2239.866332, 2251.233608, 2262.228932, 2273.917972, 2285.331741, 2297.151775, 2308.813663, 2320.858025, 2332.752364, 2344.454099, 2356.48877, 2368.667911, 2380.790326, 2393.169207, 2405.262101, 2417.163129, 2429.802051, 2442.003806, 2454.459547, 2466.980443, 2479.303857, 2491.800299, 2504.24786, 2517.225528, 2530.05249, 2543.007844, 2556.023702, 2568.854794, 2581.555885, 2594.535044, 2607.384668, 2620.184674, 2632.851203, 2645.99165, 2659.281962, 2672.528811, 2686.125362, 2699.597326, 2712.932359, 2726.719655, 2740.701985, 2755.113545, 2769.923455, 2784.760027, 2799.601574, 2815.002798, 2831.058815, 2847.29159, 2864.779515, 2882.163586, 2899.595361, 2918.067997, 2937.668285, 2957.361093, 2978.514648, 3001.456305, 3024.958393, 3050.460938, 3079.434975, 3111.244468, 3146.755216, 3188.18237, 3236.963192, 3299.467914, 3381.586047, 3503.088086, 3732.649437, 6208.591797, ] GREEN_LUT_TGT = [ 0.0, 4.0, 7.0, 14.0, 20.0, 27.0, 39.0, 77.0, 90.0, 98.0, 102.0, 106.0, 109.0, 111.0, 113.0, 115.0, 116.0, 118.0, 119.0, 120.0, 121.0, 122.0, 123.0, 124.0, 125.0, 126.0, 127.0, 127.0, 128.0, 129.0, 129.0, 130.0, 131.0, 131.0, 132.0, 132.0, 133.0, 133.0, 134.0, 134.0, 135.0, 135.0, 136.0, 136.0, 137.0, 137.0, 138.0, 138.0, 139.0, 139.0, 139.0, 140.0, 140.0, 141.0, 141.0, 141.0, 142.0, 142.0, 143.0, 143.0, 143.0, 144.0, 144.0, 144.0, 145.0, 145.0, 145.0, 146.0, 146.0, 147.0, 147.0, 147.0, 148.0, 148.0, 148.0, 149.0, 149.0, 149.0, 150.0, 150.0, 150.0, 151.0, 151.0, 151.0, 152.0, 152.0, 152.0, 153.0, 153.0, 153.0, 153.0, 154.0, 154.0, 154.0, 155.0, 155.0, 155.0, 156.0, 156.0, 156.0, 157.0, 157.0, 157.0, 158.0, 158.0, 158.0, 158.0, 159.0, 159.0, 159.0, 160.0, 160.0, 160.0, 161.0, 161.0, 161.0, 162.0, 162.0, 162.0, 162.0, 163.0, 163.0, 163.0, 164.0, 164.0, 164.0, 164.0, 165.0, 165.0, 165.0, 166.0, 166.0, 166.0, 167.0, 167.0, 167.0, 167.0, 168.0, 168.0, 168.0, 169.0, 169.0, 169.0, 169.0, 170.0, 170.0, 170.0, 171.0, 171.0, 171.0, 172.0, 172.0, 172.0, 172.0, 173.0, 173.0, 173.0, 174.0, 174.0, 174.0, 174.0, 175.0, 175.0, 175.0, 176.0, 176.0, 176.0, 177.0, 177.0, 177.0, 177.0, 178.0, 178.0, 178.0, 179.0, 179.0, 179.0, 180.0, 180.0, 180.0, 180.0, 181.0, 181.0, 181.0, 182.0, 182.0, 182.0, 183.0, 183.0, 183.0, 183.0, 184.0, 184.0, 184.0, 185.0, 185.0, 185.0, 186.0, 186.0, 186.0, 187.0, 187.0, 187.0, 187.0, 188.0, 188.0, 188.0, 189.0, 189.0, 189.0, 190.0, 190.0, 190.0, 191.0, 191.0, 191.0, 191.0, 192.0, 192.0, 192.0, 193.0, 193.0, 193.0, 193.0, 194.0, 194.0, 194.0, 195.0, 195.0, 195.0, 196.0, 196.0, 196.0, 197.0, 197.0, 197.0, 198.0, 198.0, 198.0, 199.0, 199.0, 199.0, 200.0, 200.0, 201.0, 201.0, 202.0, 202.0, 203.0, 204.0, 205.0, 206.0, 207.0, 209.0, 213.0, 247.0, ] BLUE_LUT_SRC = [ -174.534332, 73.254641, 88.310135, 101.537961, 115.082824, 130.82756, 153.464397, 215.417476, 277.933863, 318.251586, 349.460747, 374.06006, 395.094665, 413.78714, 429.910664, 444.444374, 457.490614, 469.774896, 481.061646, 492.105429, 502.157656, 512.026281, 521.051887, 529.796677, 538.044643, 546.326671, 554.167126, 561.730221, 569.202762, 576.335278, 583.397228, 590.242282, 596.931715, 603.395545, 609.722266, 616.001422, 622.112078, 628.221927, 634.348173, 640.207499, 645.956432, 651.624397, 657.483991, 663.191679, 668.774842, 674.371722, 679.845132, 685.316648, 690.776712, 696.143759, 701.523696, 706.637842, 711.884067, 717.175023, 722.494683, 727.664842, 732.952673, 738.04298, 743.202028, 748.380273, 753.421451, 758.357213, 763.512947, 768.671051, 773.866225, 778.78958, 783.828768, 788.766796, 793.813684, 798.816755, 803.893066, 808.936154, 813.890501, 818.795654, 823.764251, 828.722046, 833.653185, 838.529021, 843.361607, 848.346386, 853.314783, 858.264758, 863.104797, 868.000343, 872.989216, 878.006714, 882.921092, 887.901759, 892.833991, 897.818876, 902.82685, 907.783752, 912.667658, 917.838023, 922.785695, 927.854316, 932.691437, 937.7304, 942.925921, 948.053334, 953.149095, 958.0816, 963.031921, 968.06922, 972.939931, 977.873826, 982.827367, 987.879546, 992.903666, 997.872284, 1003.011453, 1007.93376, 1012.955595, 1017.989387, 1023.076939, 1028.082606, 1033.072267, 1038.124955, 1043.227871, 1048.365991, 1053.345308, 1058.4215, 1063.569816, 1068.535076, 1073.56193, 1078.819444, 1084.036311, 1089.262178, 1094.492636, 1099.606004, 1104.844289, 1110.001919, 1115.585846, 1120.908447, 1126.284262, 1131.674876, 1137.156934, 1142.566573, 1148.074184, 1153.333908, 1158.779476, 1164.417476, 1170.059389, 1175.523972, 1181.166704, 1186.845933, 1192.533746, 1198.197643, 1203.880398, 1209.56166, 1215.3695, 1221.138804, 1227.123535, 1233.128784, 1239.21395, 1245.207462, 1251.135834, 1257.034621, 1263.154446, 1269.473371, 1275.594159, 1281.642936, 1288.10192, 1294.314127, 1300.680983, 1307.158943, 1313.610474, 1320.234185, 1326.773944, 1333.407759, 1340.16748, 1346.891749, 1353.61031, 1360.337375, 1367.409947, 1374.196318, 1381.168993, 1387.985904, 1395.078708, 1402.159106, 1409.367855, 1416.696, 1423.965005, 1431.362233, 1438.875541, 1446.483449, 1454.299133, 1461.973706, 1469.659335, 1477.500844, 1485.569709, 1493.613932, 1502.016043, 1510.275144, 1518.738673, 1526.916963, 1535.327732, 1543.878234, 1552.510406, 1560.932313, 1569.788725, 1578.730045, 1587.618321, 1596.661821, 1605.65127, 1614.523244, 1623.310505, 1632.263903, 1641.49817, 1650.517113, 1659.572574, 1668.7304, 1677.739577, 1686.672918, 1695.945456, 1705.005299, 1714.144718, 1723.241571, 1732.571039, 1742.095014, 1751.647755, 1761.133179, 1770.944706, 1780.738685, 1790.820726, 1801.002212, 1811.307904, 1821.771763, 1832.440254, 1843.294877, 1854.498327, 1866.066508, 1877.962925, 1890.163583, 1902.542511, 1915.415865, 1928.899993, 1943.049654, 1957.814429, 1973.587687, 1990.555327, 2008.862191, 2028.320063, 2049.64456, 2072.596252, 2097.503906, 2124.82774, 2155.251433, 2189.52834, 2227.769672, 2273.681899, 2330.001448, 2404.02234, 2509.51011, 2707.046499, 4871.669922, ] BLUE_LUT_TGT = [ 0.0, 3.0, 4.0, 5.0, 9.0, 15.0, 25.0, 45.0, 59.0, 67.0, 73.0, 77.0, 80.0, 82.0, 84.0, 86.0, 88.0, 90.0, 91.0, 92.0, 94.0, 95.0, 96.0, 97.0, 98.0, 99.0, 99.0, 100.0, 101.0, 102.0, 102.0, 103.0, 104.0, 104.0, 105.0, 105.0, 106.0, 107.0, 107.0, 108.0, 108.0, 109.0, 109.0, 110.0, 110.0, 111.0, 111.0, 112.0, 112.0, 112.0, 113.0, 113.0, 114.0, 114.0, 115.0, 115.0, 115.0, 116.0, 116.0, 117.0, 117.0, 117.0, 118.0, 118.0, 119.0, 119.0, 119.0, 120.0, 120.0, 120.0, 121.0, 121.0, 121.0, 122.0, 122.0, 123.0, 123.0, 123.0, 124.0, 124.0, 124.0, 125.0, 125.0, 125.0, 126.0, 126.0, 126.0, 127.0, 127.0, 127.0, 128.0, 128.0, 128.0, 129.0, 129.0, 129.0, 130.0, 130.0, 130.0, 131.0, 131.0, 131.0, 131.0, 132.0, 132.0, 132.0, 133.0, 133.0, 133.0, 134.0, 134.0, 134.0, 135.0, 135.0, 135.0, 135.0, 136.0, 136.0, 136.0, 137.0, 137.0, 137.0, 138.0, 138.0, 138.0, 138.0, 139.0, 139.0, 139.0, 140.0, 140.0, 140.0, 140.0, 141.0, 141.0, 141.0, 142.0, 142.0, 142.0, 142.0, 143.0, 143.0, 143.0, 144.0, 144.0, 144.0, 144.0, 145.0, 145.0, 145.0, 146.0, 146.0, 146.0, 146.0, 147.0, 147.0, 147.0, 148.0, 148.0, 148.0, 149.0, 149.0, 149.0, 149.0, 150.0, 150.0, 150.0, 151.0, 151.0, 151.0, 152.0, 152.0, 152.0, 152.0, 153.0, 153.0, 153.0, 154.0, 154.0, 154.0, 155.0, 155.0, 155.0, 156.0, 156.0, 156.0, 157.0, 157.0, 157.0, 158.0, 158.0, 158.0, 159.0, 159.0, 159.0, 160.0, 160.0, 160.0, 161.0, 161.0, 161.0, 162.0, 162.0, 162.0, 163.0, 163.0, 163.0, 164.0, 164.0, 164.0, 165.0, 165.0, 165.0, 166.0, 166.0, 166.0, 167.0, 167.0, 167.0, 167.0, 168.0, 168.0, 168.0, 169.0, 169.0, 169.0, 170.0, 170.0, 170.0, 171.0, 171.0, 172.0, 172.0, 172.0, 173.0, 173.0, 174.0, 174.0, 174.0, 175.0, 176.0, 176.0, 177.0, 177.0, 178.0, 179.0, 180.0, 181.0, 182.0, 183.0, 184.0, 185.0, 187.0, 189.0, 193.0, 228.0, ] ```