File size: 6,063 Bytes
35cb003
2ba388e
35cb003
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9d714b6
35cb003
 
 
 
 
 
 
 
 
 
9d714b6
35cb003
 
 
 
 
 
 
9d714b6
 
35cb003
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9d714b6
 
 
 
 
35cb003
 
 
9d714b6
 
35cb003
 
 
 
 
 
 
 
 
9d714b6
 
fd170b2
35cb003
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9d714b6
 
35cb003
 
9d714b6
35cb003
9d714b6
 
35cb003
 
9d714b6
 
 
 
 
 
 
 
 
35cb003
 
 
 
 
 
 
 
 
264984d
 
35cb003
 
d53f17b
 
 
 
35cb003
 
 
9d714b6
 
 
 
 
fd170b2
35cb003
 
9d714b6
 
 
35cb003
 
 
 
 
 
 
 
 
 
 
 
 
 
9d714b6
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
---
viewer: false
pretty_name: "NA-SAR"
tags:
- geospatial
- remote-sensing
- sar
- earth-observation
- self-supervised-learning
- pretraining
- webdataset
- pytorch
size_categories:
- 1M<n<10M
task_categories:
- image-feature-extraction
---

# NA-SAR

NA-SAR is a North America synthetic aperture radar pretraining dataset built
from NASA OPERA products. It is intended for self-supervised and masked-image
pretraining of SAR foundation models.

This release is an unsplit pretraining corpus. There are no train/validation/test
partitions because the dataset is not intended to define an evaluation protocol.
Downstream evaluations should define their own geographically and temporally
appropriate splits.

## Dataset Contents

- Samples: 1,099,604
- Shards: 91 WebDataset tar shards
- Patch size: 128 x 128 pixels
- RTC views: two spatial views per sample
- Temporal RTC acquisitions: prime and secondary
- RTC channels: co-pol and cross-pol, with missing polarization zero padded
- Incidence angle: one channel per spatial view
- InSAR phase: stored as cos(phi), sin(phi)
- Coherence: one channel per spatial view
- DEM elevation: raw elevation in meters
- DEM slope: raw terrain slope in degrees

Each tensor sample contains:

| Key | Shape | Description |
| --- | --- | --- |
| `prime_rtc_view_0` | `(2, 128, 128)` | Prime RTC view 0, co-pol/cross-pol |
| `secondary_rtc_view_0` | `(2, 128, 128)` | Secondary RTC view 0, co-pol/cross-pol |
| `prime_rtc_view_1` | `(2, 128, 128)` | Prime RTC view 1, co-pol/cross-pol |
| `secondary_rtc_view_1` | `(2, 128, 128)` | Secondary RTC view 1, co-pol/cross-pol |
| `inc_angle_view_0` | `(1, 128, 128)` | Incidence angle for view 0 |
| `inc_angle_view_1` | `(1, 128, 128)` | Incidence angle for view 1 |
| `ifg_view_0` | `(2, 128, 128)` | InSAR phase for view 0 as cos/sin |
| `coh_view_0` | `(1, 128, 128)` | Coherence for view 0 |
| `ifg_view_1` | `(2, 128, 128)` | InSAR phase for view 1 as cos/sin |
| `coh_view_1` | `(1, 128, 128)` | Coherence for view 1 |
| `dem` | `(1, 128, 128)` | Raw DEM elevation in meters |
| `slope_deg` | `(1, 128, 128)` | Raw terrain slope angle in degrees |

`dem_relief` and normalized `slope` are not stored in the WebDataset. They are
derived at loading time from the raw `dem` and `slope_deg` arrays.

## Metadata

`metadata.parquet` is the publishable metadata table for the sharded release. It
includes OPERA provenance, patch geometry, quality score, polarization
availability, and the following sharding columns:

- `sample_key`: sample key inside the WebDataset shard
- `shard_path`: relative path to the tar shard
- `shard_index`: integer shard id
- `sample_index_in_shard`: row order within that shard

The metadata is filtered to samples with `quality_score > 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.