MCPcopy Create free account
hub / github.com/bopen/xarray-sentinel / test_open_pol_dataset

Function test_open_pol_dataset

tests/test_30_xarray_backends.py:176–196  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

174
175
176def test_open_pol_dataset() -> None:
177 product_path = (
178 DATA_FOLDER
179 / "S1B_IW_SLC__1SDV_20210401T052622_20210401T052650_026269_032297_EFA4.SAFE"
180 )
181 expected_variables = {
182 "measurement",
183 "line",
184 "pixel",
185 "slant_range_time",
186 "azimuth_time",
187 }
188 res = xr.open_dataset(product_path, engine="sentinel-1", group="IW1/VV")
189
190 assert isinstance(res, xr.Dataset)
191 for attr_name in COMMON_ATTRIBUTES:
192 assert attr_name in res.attrs
193 assert res.attrs[attr_name] == COMMON_ATTRIBUTES[attr_name]
194
195 assert set(res.sizes) == {"line", "pixel"}
196 assert set(res.variables) == expected_variables
197
198
199def test_burst_id_attribute() -> None:

Callers

nothing calls this directly

Calls 1

open_datasetMethod · 0.80

Tested by

no test coverage detected