Skip to content

Commit 99c3af6

Browse files
committed
Add geometric Doppler Centroid estimation and RMS
1 parent 021fceb commit 99c3af6

File tree

2 files changed

+41
-8
lines changed

2 files changed

+41
-8
lines changed

pyproject.toml

+8-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ build-backend = "setuptools.build_meta"
33
requires = ["setuptools>=64", "setuptools_scm>=8"]
44

55
[project]
6-
authors = [{ "name" = "B-Open", "email" = "[email protected]" }]
6+
authors = [{"name" = "B-Open", "email" = "[email protected]"}]
77
classifiers = [
88
"Development Status :: 4 - Beta",
99
"Intended Audience :: Science/Research",
@@ -14,15 +14,15 @@ classifiers = [
1414
"Programming Language :: Python :: 3.10",
1515
"Programming Language :: Python :: 3.11",
1616
"Programming Language :: Python :: 3.12",
17-
"Topic :: Scientific/Engineering",
17+
"Topic :: Scientific/Engineering"
1818
]
1919
dependencies = [
2020
"fsspec",
2121
"numpy",
2222
"pandas",
2323
"rioxarray",
2424
"xarray >= 0.18.0",
25-
"xmlschema",
25+
"xmlschema"
2626
]
2727
description = "Easily access and explore the SAR data products of the Copernicus Sentinel-1 satellite mission"
2828
dynamic = ["version"]
@@ -35,9 +35,9 @@ keywords = [
3535
"sentinel-1",
3636
"sar",
3737
"synthetic-aperture-radar",
38-
"xarray",
38+
"xarray"
3939
]
40-
license = { file = "LICENSE" }
40+
license = {file = "LICENSE"}
4141
name = "xarray-sentinel"
4242
readme = "README.md"
4343
requires-python = ">=3.9"
@@ -63,7 +63,7 @@ module = [
6363
"rasterio",
6464
"shapely",
6565
"shapely.geometry",
66-
"shapely.wkt",
66+
"shapely.wkt"
6767
]
6868

6969
[tool.ruff]
@@ -74,7 +74,7 @@ line-length = 88
7474
[tool.ruff.lint]
7575
ignore = [
7676
# pydocstyle: Missing Docstrings
77-
"D1",
77+
"D1"
7878
]
7979
select = [
8080
# pyflakes
@@ -85,7 +85,7 @@ select = [
8585
# isort
8686
"I",
8787
# pydocstyle
88-
"D",
88+
"D"
8989
]
9090

9191
[tool.ruff.lint.pycodestyle]

xarray_sentinel/sentinel1.py

+33
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,21 @@ def open_dc_estimate_dataset(
415415
azimuth_time = []
416416
t0 = []
417417
data_dc_poly = []
418+
geometry_dc_poly = []
419+
data_dc_rms_error = []
420+
data_dc_rms_error_above_threshold = []
421+
fine_dce_azimuth_start_time = []
422+
fine_dce_azimuth_stop_time = []
418423
for dc_estimate in dc_estimates:
424+
geometry_dc_poly.append(
425+
[float(c) for c in dc_estimate["geometryDcPolynomial"]["$"].split()]
426+
)
427+
data_dc_rms_error.append(dc_estimate["dataDcRmsError"])
428+
data_dc_rms_error_above_threshold.append(
429+
dc_estimate["dataDcRmsErrorAboveThreshold"]
430+
)
431+
fine_dce_azimuth_start_time.append(dc_estimate["fineDceAzimuthStartTime"])
432+
fine_dce_azimuth_stop_time.append(dc_estimate["fineDceAzimuthStopTime"])
419433
azimuth_time.append(dc_estimate["azimuthTime"])
420434
t0.append(dc_estimate["t0"])
421435
data_dc_poly.append(
@@ -426,6 +440,25 @@ def open_dc_estimate_dataset(
426440
data_vars={
427441
"t0": ("azimuth_time", t0, attrs),
428442
"data_dc_polynomial": (("azimuth_time", "degree"), data_dc_poly, attrs),
443+
"geometry_dc_polynomial": (
444+
("azimuth_time", "degree"),
445+
geometry_dc_poly,
446+
attrs,
447+
),
448+
"data_dc_rms_error": ("azimuth_time", data_dc_rms_error, attrs),
449+
"data_dc_rms_error_above_threshold": (
450+
"azimuth_time",
451+
data_dc_rms_error,
452+
attrs,
453+
),
454+
"fine_dce_azimuth_start_time": (
455+
"azimuth_time",
456+
[np.datetime64(at, "ns") for at in fine_dce_azimuth_start_time],
457+
),
458+
"fine_dce_azimuth_stop_time": (
459+
"azimuth_time",
460+
[np.datetime64(at, "ns") for at in fine_dce_azimuth_stop_time],
461+
),
429462
},
430463
coords={
431464
"azimuth_time": [np.datetime64(at, "ns") for at in azimuth_time],

0 commit comments

Comments
 (0)