ynsat logo

Expression-Based Insights (Custom Index Builder)

3 min read


Expression insights let you build your own spectral indices or RGB composites by combining bands through a mini-math language. If you can write the equation, the platform will execute it—no extra coding required.

How it works #

Band tokens. #

Each selected band is exposed as an uppercase token (e.g., G, R, S1). Use these tokens directly in the expression editor.

IdentifierFriendly nameλ (μm) ≈
AAerosol (Band 1)0.443
BBlue (Band 2)0.490
GGreen (Band 3)0.560
RRed (Band 4)0.665
RE1Red Edge 1 (Band 5)0.705
RE2Red Edge 2 (Band 6)0.740
RE3Red Edge 3 (Band 7)0.783
NNear-Infrared (Band 8)0.842
N2Near-Infrared 2 (Band 8A)0.865
WVWater Vapour (Band 9)0.945
S1Short-wave IR 1 (Band 11)1.610
S15Short-wave IR 1.5 ¹2.145
S2Short-wave IR 2 (Band 12)2.190
S3Short-wave IR 3 ²2.250
S4Short-wave IR 4 ²2.330
S5Short-wave IR 5 ²2.400
T / T1Thermal Infrared 110.6 – 11.3 (≈ 11 µm)
T2Thermal Infrared 211.5 – 12.5 (≈ 12 µm)
T3Thermal Infrared 3 ³8.6
T4Thermal Infrared 4 ³9.1
T5Thermal Infrared 5 ³9.6
VVVV polarisation (SAR)~0.056 m (C-band)
VHVH polarisation (SAR)~0.056 m (C-band)
HVHV polarisation (SAR)~0.056 m (C-band)
HHHH polarisation (SAR)~0.056 m (C-band)

¹ S15 is a project-specific convention to keep Sentinel-2 SWIR bands named as S1 and S2

² S3–S5 follow the common hyperspectral/SWIR naming used for sensors with multiple bands beyond Sentinel-2.

³ Thermal sub-bands follow ASTER-style numbering; exact centres depend on instrument.

How to use the table #

  • Identifier is what you type in the Expression editor (e.g. RE2 / N).
  • Friendly name helps users recognise the spectral region.
  • λ provides approximate centre wavelengths for reference when designing physics-based indices or ensuring band compatibility across instruments.

Polarisation channels VV, VH, HV, HH are C-band for Sentinel-1 but are equally valid for X- or L-band SAR instruments; only the carrier frequency changes

Band classNominal λ (cm)Nominal f (GHz)Example missions
X-band2.5 – 3.2 cm9.4 – 12 GHzTerraSAR-X, COSMO-SkyMed
C-band3.8 – 7.5 cm4 – 8 GHzSentinel-1, RADARSAT-2
L-band15 – 30 cm1 – 2 GHzALOS-PALSAR-2, SAOCOM

Supported operators & functions #

SyntaxDescriptionExample
+  –  *  /Add, subtract, multiply, divide(N – R) / (N + R)
^ExponentiationS1 ^ 2
SQRT(x)Square rootSQRT(B * G)
()Parentheses for precedence(A + WV) / 2

Note: Square roots must be wrapped in the SQRT() function; x^0.5 is not supported.

Evaluation pipeline #

User Expression ──► Parser & Validator
                           │
                           ▼
                   Pixel-wise Execution
                           │
                           ▼
                 New Band(s) Added to Image

Single-band vs RGB expressions #

ModeWhat you provideResulting insight
Single BandOne expression (e.g., NDVI)A gray-scale layer; palette & min/max are required for display
RGB CompositeThree expressions—one each for R, G, BA colour composite; no palette needed—values are linearly mapped to RGB

Normalisation hint #

Most indices naturally fall between 0 and 1 or −1 and 1. Set Absolute Min/Max to the theoretical limits (e.g., 0 / 1 for BDA, -1 / 1 for NDVI). The viewer will apply relative stretching so the map pops without manual tweaking.

Example snippets #

GoalExpression
NDVI(N – R) / (N + R)
Soil-adjusted NDVI1.5 * (N – R) / (N + R + 0.5)
Brightness (PCA-style)0.3 * R + 0.3 * G + 0.4 * N
Vegetation vigour compositeR = (N – R) / (N + R)
G = (G – R) / (G + R)
B = SQRT(S1 / S2)

Best-practice checklist #

  • Avoid divide-by-zero: add a small constant if the denominator can hit zero, e.g. /(denom + 1e-6).
  • Keep it concise: long formulas are harder to debug; break them into several insights if necessary.
  • Test on a sample pixel: the preview panel shows real-time values—handy for catching syntax errors.
  • Document units: in the insight description, note whether output is ratio, percentage, etc.

With Expression-Based Insights you can prototype new indices in seconds and visualise them immediately—no backend changes, no redeploy, just math.

Updated on June 19, 2025