--- viewer: false pretty_name: "NA-SAR" tags: - geospatial - remote-sensing - sar - earth-observation - self-supervised-learning - pretraining - webdataset - pytorch size_categories: - 1M 0.53`. `webdataset_summary.json` records the shard count and DEM storage policy. For this release, `dem_extended` is `"raw"` and `dem_arrays` is `["dem", "slope_deg"]`. ## Loading With Hugging Face Datasets The sharded release can be streamed with the WebDataset loader: ```python from io import BytesIO import numpy as np from datasets import load_dataset ds = load_dataset( "webdataset", data_files={"train": "data/nasar-train-*.tar"}, split="train", streaming=True, ) sample = next(iter(ds)) arrays = np.load(BytesIO(sample["npz"])) print(arrays.files) ``` ## Loading With PyTorch The release includes `nasar_dataset.py`, a lightweight PyTorch loader for the local shard layout: ```python from nasar_dataset import NASARWebRTCDataset, NASARWebInSARDataset rtc_ds = NASARWebRTCDataset("/path/to/NA-SAR-HF") insar_ds = NASARWebInSARDataset("/path/to/NA-SAR-HF", require_dem=True) ``` For InSAR, `NASARWebInSARDataset` returns SAR arrays plus DEM-derived channels: | Loader output key | Source array | Default normalization | | --- | --- | --- | | `dem_view_0/1` | `dem` | global elevation, `(-100 m, 4000 m) -> [0, 1]` | | `dem_relief_view_0/1` | `dem` | patch-local p5/p95 relief -> `[0, 1]` | | `slope_view_0/1` | `slope_deg` | slope degrees, `(0 deg, 45 deg) -> [0, 1]` | These normalization ranges can be changed through the loader constructor. ## Preprocessing Notes RTC arrays are stored as raw linear backscatter with invalid, non-finite, and negative values set to zero. The helper loader applies the pretraining-time RTC transform by default: ```python x = log1p(20.0 * x) co_pol = clip_and_rescale(co_pol, p1=0.15, p99=2.39) cross_pol = clip_and_rescale(cross_pol, p1=0.01, p99=1.09) ``` The co-pol and cross-pol RTC channels use separate normalization ranges because cross-pol backscatter is substantially darker. Fully missing polarizations remain zero-padded after preprocessing. InSAR phase is stored as cosine and sine channels instead of wrapped phase radians to avoid phase discontinuities at the wrap boundary. DEM arrays are static for the spatial patch and shared across both orbit views. `dem` is raw elevation in meters. `slope_deg` is raw terrain slope in degrees. Derived terrain features, including global-normalized DEM, patch-local relief, and normalized slope, are intentionally computed during loading rather than stored as processed arrays. ## Source and Scope The source SAR data comes from NASA OPERA products over North America. Terrain comes from aligned DEM patches. Users should follow the applicable terms and citation guidance for OPERA and DEM source products. ## Intended Use This dataset is intended for SAR and InSAR representation learning, especially self-supervised pretraining. It is not an evaluation benchmark by itself. ## Limitations - Coverage is geographically focused on North America. - Quality filtering removes lower-quality samples and can bias the corpus toward easier or cleaner acquisitions. - Missing RTC polarizations are represented by zero-padded channels. The metadata includes polarization availability flags so users can distinguish true zeros from missing channels. - DEM fields are aligned to the 128 x 128 patch grid and should not be treated as a standalone high-resolution terrain product.