--- viewer: false pretty_name: "NA-SAR" tags: - geospatial - remote-sensing - sar - earth-observation - self-supervised-learning - pretraining - webdataset - pytorch size_categories: - 1M 0.53`. ## 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 repository includes a lightweight PyTorch helper: ```python from nasar_dataset import NASARRTCDataset, NASARInSARDataset rtc_ds = NASARRTCDataset("/path/to/NA-SAR") insar_ds = NASARInSARDataset("/path/to/NA-SAR") ``` For streaming at scale, use the WebDataset tar shards under `data/`. Each tar member is a compressed `.npz` tensor file named `{sample_key}.npz`. ## 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. ## Source and Scope The source data comes from OPERA SAR products over North America. Users should follow the applicable terms and citation guidance for OPERA 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.