Skip to content

Commit

Permalink
Add geometric Doppler Centroid estimation and RMS
Browse files Browse the repository at this point in the history
  • Loading branch information
alexamici committed Feb 10, 2025
1 parent 021fceb commit 99c3af6
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ build-backend = "setuptools.build_meta"
requires = ["setuptools>=64", "setuptools_scm>=8"]

[project]
authors = [{ "name" = "B-Open", "email" = "[email protected]" }]
authors = [{"name" = "B-Open", "email" = "[email protected]"}]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
Expand All @@ -14,15 +14,15 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering"
]
dependencies = [
"fsspec",
"numpy",
"pandas",
"rioxarray",
"xarray >= 0.18.0",
"xmlschema",
"xmlschema"
]
description = "Easily access and explore the SAR data products of the Copernicus Sentinel-1 satellite mission"
dynamic = ["version"]
Expand All @@ -35,9 +35,9 @@ keywords = [
"sentinel-1",
"sar",
"synthetic-aperture-radar",
"xarray",
"xarray"
]
license = { file = "LICENSE" }
license = {file = "LICENSE"}
name = "xarray-sentinel"
readme = "README.md"
requires-python = ">=3.9"
Expand All @@ -63,7 +63,7 @@ module = [
"rasterio",
"shapely",
"shapely.geometry",
"shapely.wkt",
"shapely.wkt"
]

[tool.ruff]
Expand All @@ -74,7 +74,7 @@ line-length = 88
[tool.ruff.lint]
ignore = [
# pydocstyle: Missing Docstrings
"D1",
"D1"
]
select = [
# pyflakes
Expand All @@ -85,7 +85,7 @@ select = [
# isort
"I",
# pydocstyle
"D",
"D"
]

[tool.ruff.lint.pycodestyle]
Expand Down
33 changes: 33 additions & 0 deletions xarray_sentinel/sentinel1.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,21 @@ def open_dc_estimate_dataset(
azimuth_time = []
t0 = []
data_dc_poly = []
geometry_dc_poly = []
data_dc_rms_error = []
data_dc_rms_error_above_threshold = []
fine_dce_azimuth_start_time = []
fine_dce_azimuth_stop_time = []
for dc_estimate in dc_estimates:
geometry_dc_poly.append(
[float(c) for c in dc_estimate["geometryDcPolynomial"]["$"].split()]
)
data_dc_rms_error.append(dc_estimate["dataDcRmsError"])
data_dc_rms_error_above_threshold.append(
dc_estimate["dataDcRmsErrorAboveThreshold"]
)
fine_dce_azimuth_start_time.append(dc_estimate["fineDceAzimuthStartTime"])
fine_dce_azimuth_stop_time.append(dc_estimate["fineDceAzimuthStopTime"])
azimuth_time.append(dc_estimate["azimuthTime"])
t0.append(dc_estimate["t0"])
data_dc_poly.append(
Expand All @@ -426,6 +440,25 @@ def open_dc_estimate_dataset(
data_vars={
"t0": ("azimuth_time", t0, attrs),
"data_dc_polynomial": (("azimuth_time", "degree"), data_dc_poly, attrs),
"geometry_dc_polynomial": (
("azimuth_time", "degree"),
geometry_dc_poly,
attrs,
),
"data_dc_rms_error": ("azimuth_time", data_dc_rms_error, attrs),
"data_dc_rms_error_above_threshold": (
"azimuth_time",
data_dc_rms_error,
attrs,
),
"fine_dce_azimuth_start_time": (
"azimuth_time",
[np.datetime64(at, "ns") for at in fine_dce_azimuth_start_time],
),
"fine_dce_azimuth_stop_time": (
"azimuth_time",
[np.datetime64(at, "ns") for at in fine_dce_azimuth_stop_time],
),
},
coords={
"azimuth_time": [np.datetime64(at, "ns") for at in azimuth_time],
Expand Down

0 comments on commit 99c3af6

Please sign in to comment.