Compositors.md
June 5, 2026 ยท View on GitHub
Compositors
This document lists compositors available for raster layers in rslearn. Set
compositing_method in a layer config to either:
- a built-in enum name (for example
"FIRST_VALID"), or - a custom compositor config (
class_path+init_args).
See Dataset Configuration for where this field appears.
Built-In Compositors
| Compositing Method | Notes |
|---|---|
| FIRST_VALID | Default. First non-nodata pixel in item order. |
| MEAN | Per-pixel mean across valid pixels. |
| MEDIAN | Per-pixel median across valid pixels. |
| SPATIAL_MOSAIC_TEMPORAL_STACK | Spatial first-valid per timestep, stacked along T. |
| TEMPORAL_MEAN | Temporal reduction over stacked timesteps. |
| TEMPORAL_MAX | Temporal reduction over stacked timesteps. |
| TEMPORAL_MIN | Temporal reduction over stacked timesteps. |
Custom Cloud-Aware Compositors
These compositors use cloud or classification signals inside each materialized item group to rank or select items.
| Class Path | Description |
|---|---|
| rslearn.dataset.hls_fmask.HlsFmaskFirstValid | Uses HLS Fmask QA bits to score cloudiness. |
| rslearn.dataset.omni_cloud_mask.OmniCloudMaskFirstValid | Uses OmniCloudMask model inference on R/G/NIR. |
| rslearn.dataset.sentinel2_scl.Sentinel2SCLBestClear | Selects the single Sentinel-2 item with highest SCL clear cover. |
| rslearn.dataset.sentinel2_scl.Sentinel2SCLFirstValid | Uses Sentinel-2 SCL classes to score cloudiness. |