sarkit-convert 0.2.0__tar.gz → 0.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/PKG-INFO +23 -13
  2. sarkit_convert-0.3.1/README.md +25 -0
  3. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/pyproject.toml +21 -22
  4. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/sarkit_convert/_utils.py +15 -18
  5. sarkit_convert-0.3.1/sarkit_convert/_version.py +1 -0
  6. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/sarkit_convert/cosmo.py +172 -178
  7. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/sarkit_convert/create_arp_poly.py +1 -1
  8. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/sarkit_convert/iceye.py +196 -291
  9. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/sarkit_convert/sentinel.py +284 -326
  10. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/sarkit_convert/terrasar.py +179 -179
  11. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/test_create_arp.py +2 -2
  12. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/test_utils.py +10 -14
  13. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/iceye/test_iceye.py +2 -1
  14. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/sentinel/test_sentinel.py +2 -1
  15. sarkit_convert-0.2.0/README.md +0 -18
  16. sarkit_convert-0.2.0/sarkit_convert/_version.py +0 -1
  17. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/LICENSE +0 -0
  18. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/sarkit_convert/__init__.py +0 -0
  19. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/sarkit_convert/sidd_metadata.py +0 -0
  20. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/__init__.py +0 -0
  21. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/data/README.md +0 -0
  22. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/data/gdal_results.json +0 -0
  23. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/data/generate_gdal_results.py +0 -0
  24. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/data/sentinel_sicd_xml/LICENSE.txt +0 -0
  25. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/data/sentinel_sicd_xml/S1A_IW_RAW__0SDV_20250602T135218_20250602T135250_059468_0761DC_3FC1_Channel_IW2_151224.sicd.xml +0 -0
  26. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/data/sentinel_sicd_xml/S1A_IW_RAW__0SDV_20250619T232444_20250619T232516_059722_076A87_E109_Channel_IW1_320291.sicd.xml +0 -0
  27. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/data/sentinel_sicd_xml/S1B_IW_RAW__0SDV_20210709T233156_20210709T233229_027724_034EFB_2B2D_Channel_IW3_101200.sicd.xml +0 -0
  28. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/data/sentinel_sicd_xml/S1B_IW_RAW__0SDV_20210711T135126_20210711T135158_027747_034FBD_708E_Channel_IW2_151224.sicd.xml +0 -0
  29. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/data/sentinel_sicd_xml/S1C_IW_RAW__0SDV_20250527T014921_20250527T014954_002510_0053AA_6A5F_Channel_IW2_135523.sicd.xml +0 -0
  30. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/data/sentinel_sicd_xml/S1C_IW_RAW__0SDV_20250527T135101_20250527T135133_002517_0053E1_EDEB_Channel_IW2_151224.sicd.xml +0 -0
  31. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/data/sentinel_sicd_xml/S1C_IW_RAW__0SDV_20250608T014922_20250608T014954_002685_0058B2_FC36_Channel_IW2_135523.sicd.xml +0 -0
  32. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/data/sentinel_sicd_xml/S1C_IW_RAW__0SDV_20250608T135101_20250608T135134_002692_0058EA_1F12_Channel_IW2_151224.sicd.xml +0 -0
  33. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/data/sentinel_sicd_xml/S1C_IW_RAW__0SDV_20250615T052352_20250615T052425_002789_005BB9_CA6D_Channel_IW2_359460.sicd.xml +0 -0
  34. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/data/sentinel_sicd_xml/S1C_IW_RAW__0SDV_20250618T233138_20250618T233210_002844_005D47_D58C_Channel_IW3_101200.sicd.xml +0 -0
  35. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/test_dependencies.py +0 -0
  36. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/test_sidd_metadata.py +0 -0
  37. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/cosmo/__init__.py +0 -0
  38. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/cosmo/test_cosmo.py +0 -0
  39. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/cosmo/test_dependencies.py +0 -0
  40. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/iceye/__init__.py +0 -0
  41. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/iceye/test_dependencies.py +0 -0
  42. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/sentinel/__init__.py +0 -0
  43. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/sentinel/test_dependencies.py +0 -0
  44. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/terrasar/__init__.py +0 -0
  45. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/terrasar/test_dependencies.py +0 -0
  46. {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/terrasar/test_terrasar.py +0 -0
@@ -1,37 +1,40 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: sarkit-convert
3
- Version: 0.2.0
3
+ Version: 0.3.1
4
4
  Summary: Python library for converting SAR data to standard formats.
5
5
  Author-Email: Valkyrie Systems Corporation <info@govsco.com>
6
- License: MIT
6
+ License-Expression: MIT
7
+ License-File: LICENSE
7
8
  Classifier: Development Status :: 2 - Pre-Alpha
8
9
  Classifier: Intended Audience :: Science/Research
9
- Classifier: License :: OSI Approved :: MIT License
10
10
  Classifier: Topic :: Scientific/Engineering
11
11
  Classifier: Programming Language :: Python
12
12
  Classifier: Programming Language :: Python :: 3
13
- Classifier: Programming Language :: Python :: 3.11
14
13
  Classifier: Programming Language :: Python :: 3.12
15
14
  Classifier: Programming Language :: Python :: 3.13
16
- Requires-Python: >=3.11
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Project-URL: Repository, https://github.com/ValkyrieSystems/sarkit-convert.git
17
+ Project-URL: Bug Tracker, https://github.com/ValkyrieSystems/sarkit-convert/issues
18
+ Project-URL: Changelog, https://github.com/ValkyrieSystems/sarkit-convert/blob/main/CHANGELOG.md
19
+ Requires-Python: >=3.12
17
20
  Requires-Dist: lxml>=5.1.0
18
- Requires-Dist: numpy>=1.26.3
19
- Requires-Dist: pyproj>=3.7.2
21
+ Requires-Dist: numpy>=2.0.0
22
+ Requires-Dist: pyproj>=3.6.1
20
23
  Requires-Dist: sarkit>=1.3.0
21
- Requires-Dist: scipy>=1.15.1
24
+ Requires-Dist: scipy>=1.13.0
22
25
  Provides-Extra: iceye
23
- Requires-Dist: h5py>=3.12.1; extra == "iceye"
26
+ Requires-Dist: h5py>=3.11.0; extra == "iceye"
24
27
  Requires-Dist: python-dateutil>=2.9.0; extra == "iceye"
25
28
  Provides-Extra: cosmo
26
29
  Requires-Dist: astropy>=6.0.0; extra == "cosmo"
27
- Requires-Dist: h5py>=3.12.1; extra == "cosmo"
30
+ Requires-Dist: h5py>=3.11.0; extra == "cosmo"
28
31
  Requires-Dist: python-dateutil>=2.9.0; extra == "cosmo"
29
- Requires-Dist: shapely>=2.0.2; extra == "cosmo"
32
+ Requires-Dist: shapely>=2.0.6; extra == "cosmo"
30
33
  Provides-Extra: terrasar
31
34
  Requires-Dist: python-dateutil>=2.9.0; extra == "terrasar"
32
35
  Provides-Extra: sentinel
33
36
  Requires-Dist: python-dateutil>=2.9.0; extra == "sentinel"
34
- Requires-Dist: tifffile>=2025.5.10; extra == "sentinel"
37
+ Requires-Dist: tifffile>=2024.7.2; extra == "sentinel"
35
38
  Provides-Extra: all
36
39
  Requires-Dist: sarkit-convert[iceye]; extra == "all"
37
40
  Requires-Dist: sarkit-convert[cosmo]; extra == "all"
@@ -43,6 +46,13 @@ Description-Content-Type: text/markdown
43
46
 
44
47
  <img src="https://raw.githubusercontent.com/ValkyrieSystems/sarkit/main/docs/source/_static/sarkit_logo.png" width=200>
45
48
 
49
+ [![PyPI - Version](https://img.shields.io/pypi/v/sarkit-convert)](https://pypi.org/project/sarkit-convert/)
50
+ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sarkit-convert)
51
+ [![PyPI - License](https://img.shields.io/pypi/l/sarkit-convert)](./LICENSE)
52
+ [![SPEC 0 — Minimum Supported Dependencies](https://img.shields.io/badge/SPEC-0-green?labelColor=%23004811&color=%235CA038)](https://scientific-python.org/specs/spec-0000/)
53
+ <br>
54
+ [![Tests](https://github.com/ValkyrieSystems/sarkit-convert/actions/workflows/test.yml/badge.svg)](https://github.com/ValkyrieSystems/sarkit-convert/actions/workflows/test.yml)
55
+
46
56
  </div>
47
57
 
48
58
  **sarkit-convert** is a Python library for converting SAR data to standard formats.
@@ -0,0 +1,25 @@
1
+ <div align="center">
2
+
3
+ <img src="https://raw.githubusercontent.com/ValkyrieSystems/sarkit/main/docs/source/_static/sarkit_logo.png" width=200>
4
+
5
+ [![PyPI - Version](https://img.shields.io/pypi/v/sarkit-convert)](https://pypi.org/project/sarkit-convert/)
6
+ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sarkit-convert)
7
+ [![PyPI - License](https://img.shields.io/pypi/l/sarkit-convert)](./LICENSE)
8
+ [![SPEC 0 — Minimum Supported Dependencies](https://img.shields.io/badge/SPEC-0-green?labelColor=%23004811&color=%235CA038)](https://scientific-python.org/specs/spec-0000/)
9
+ <br>
10
+ [![Tests](https://github.com/ValkyrieSystems/sarkit-convert/actions/workflows/test.yml/badge.svg)](https://github.com/ValkyrieSystems/sarkit-convert/actions/workflows/test.yml)
11
+
12
+ </div>
13
+
14
+ **sarkit-convert** is a Python library for converting SAR data to standard formats.
15
+
16
+ ## License
17
+ This repository is licensed under the [MIT license](./LICENSE).
18
+
19
+ A few tips for getting started using [PDM](https://pdm-project.org/en/latest/) are below:
20
+
21
+
22
+ ```shell
23
+ $ pdm install -G:all # install SARkit-convert with optional & dev dependencies
24
+ $ pdm run nox # run lint and tests
25
+ ```
@@ -4,49 +4,49 @@ description = "Python library for converting SAR data to standard formats."
4
4
  authors = [
5
5
  { name = "Valkyrie Systems Corporation", email = "info@govsco.com" },
6
6
  ]
7
- requires-python = ">=3.11"
7
+ requires-python = ">=3.12"
8
8
  readme = "README.md"
9
+ license = "MIT"
10
+ license-files = [
11
+ "LICENSE",
12
+ ]
9
13
  classifiers = [
10
14
  "Development Status :: 2 - Pre-Alpha",
11
15
  "Intended Audience :: Science/Research",
12
- "License :: OSI Approved :: MIT License",
13
16
  "Topic :: Scientific/Engineering",
14
17
  "Programming Language :: Python",
15
18
  "Programming Language :: Python :: 3",
16
- "Programming Language :: Python :: 3.11",
17
19
  "Programming Language :: Python :: 3.12",
18
20
  "Programming Language :: Python :: 3.13",
21
+ "Programming Language :: Python :: 3.14",
19
22
  ]
20
23
  dynamic = []
21
24
  dependencies = [
22
25
  "lxml>=5.1.0",
23
- "numpy>=1.26.3",
24
- "pyproj>=3.7.2",
26
+ "numpy>=2.0.0",
27
+ "pyproj>=3.6.1",
25
28
  "sarkit>=1.3.0",
26
- "scipy>=1.15.1",
29
+ "scipy>=1.13.0",
27
30
  ]
28
- version = "0.2.0"
29
-
30
- [project.license]
31
- text = "MIT"
31
+ version = "0.3.1"
32
32
 
33
33
  [project.optional-dependencies]
34
34
  iceye = [
35
- "h5py>=3.12.1",
35
+ "h5py>=3.11.0",
36
36
  "python-dateutil>=2.9.0",
37
37
  ]
38
38
  cosmo = [
39
39
  "astropy>=6.0.0",
40
- "h5py>=3.12.1",
40
+ "h5py>=3.11.0",
41
41
  "python-dateutil>=2.9.0",
42
- "shapely>=2.0.2",
42
+ "shapely>=2.0.6",
43
43
  ]
44
44
  terrasar = [
45
45
  "python-dateutil>=2.9.0",
46
46
  ]
47
47
  sentinel = [
48
48
  "python-dateutil>=2.9.0",
49
- "tifffile>=2025.5.10",
49
+ "tifffile>=2024.7.2",
50
50
  ]
51
51
  all = [
52
52
  "sarkit-convert[iceye]",
@@ -55,16 +55,15 @@ all = [
55
55
  "sarkit-convert[sentinel]",
56
56
  ]
57
57
 
58
+ [project.urls]
59
+ Repository = "https://github.com/ValkyrieSystems/sarkit-convert.git"
60
+ "Bug Tracker" = "https://github.com/ValkyrieSystems/sarkit-convert/issues"
61
+ Changelog = "https://github.com/ValkyrieSystems/sarkit-convert/blob/main/CHANGELOG.md"
62
+
58
63
  [dependency-groups]
59
64
  test = [
60
65
  "nox>=2025.2.9",
61
66
  ]
62
- doc = [
63
- "sphinx>=7.2.6",
64
- "numpydoc>=1.7.0",
65
- "sphinx-rtd-theme>=2.0.0",
66
- "sphinxcontrib-autoprogram>=0.1.9",
67
- ]
68
67
  dev-lint = [
69
68
  "ruff>=0.3.0",
70
69
  "mypy>=1.8.0",
@@ -72,8 +71,8 @@ dev-lint = [
72
71
  ]
73
72
  dev-test = [
74
73
  "pytest>=7.4.4",
75
- "smart-open[http]>=7.5",
76
- "tifffile>=2025.5.10",
74
+ "smart-open[http]>=7.1.0",
75
+ "tifffile>=2024.7.2",
77
76
  ]
78
77
 
79
78
  [build-system]
@@ -186,38 +186,35 @@ def broadening_from_amp(amp_vals, threshold_db=None):
186
186
  return width / fft_size * amp_vals.size
187
187
 
188
188
 
189
- def _get_sigma0_noise(xml_helper):
189
+ def _get_sigma0_noise(sicd_ew):
190
190
  """Calculate the absolute noise estimate, in sigma0 power units."""
191
191
 
192
- if xml_helper.element_tree.find("./{*}Radiometric/{*}SigmaZeroSFPoly") is None:
192
+ if "SigmaZeroSFPoly" not in sicd_ew["Radiometric"]:
193
193
  raise ValueError(
194
194
  "Radiometric.SigmaZeroSFPoly is not populated, so no sigma0 noise estimate can be derived."
195
195
  )
196
- if (
197
- xml_helper.load("./{*}Radiometric/{*}NoiseLevel/{*}NoiseLevelType")
198
- != "ABSOLUTE"
199
- ):
196
+ if sicd_ew["Radiometric"]["NoiseLevel"]["NoiseLevelType"] != "ABSOLUTE":
200
197
  raise ValueError(
201
198
  "Radiometric.NoiseLevel.NoiseLevelType is not `ABSOLUTE` so no noise estimate can be derived."
202
199
  )
203
200
 
204
- noisepoly = xml_helper.load("./{*}Radiometric/{*}NoiseLevel/{*}NoisePoly")
201
+ noisepoly = sicd_ew["Radiometric"]["NoiseLevel"]["NoisePoly"]
205
202
  scp_noise_db = noisepoly[0, 0]
206
203
  scp_noise = 10 ** (scp_noise_db / 10)
207
204
 
208
205
  # convert to SigmaZero value
209
- sigma_zero_sf = xml_helper.load("./{*}Radiometric/{*}SigmaZeroSFPoly")
206
+ sigma_zero_sf = sicd_ew["Radiometric"]["SigmaZeroSFPoly"]
210
207
  scp_noise *= sigma_zero_sf[0, 0]
211
208
 
212
209
  return scp_noise
213
210
 
214
211
 
215
- def _get_default_signal_estimate(xml_helper):
212
+ def _get_default_signal_estimate(sicd_ew):
216
213
  """Gets default signal for use in the RNIIRS calculation.
217
214
 
218
215
  This will be 1.0 for copolar (or unknown) collections, and 0.25 for cross-pole collections."""
219
216
 
220
- pol = xml_helper.load("./{*}ImageFormation/{*}TxRcvPolarizationProc")
217
+ pol = sicd_ew["ImageFormation"].get("TxRcvPolarizationProc", None)
221
218
  if pol is None or ":" not in pol:
222
219
  return 1.0
223
220
 
@@ -259,23 +256,23 @@ def _estimate_rniirs(information_density):
259
256
  return out
260
257
 
261
258
 
262
- def get_rniirs_estimate(xml_helper):
259
+ def get_rniirs_estimate(sicd_ew):
263
260
  """This calculates the value(s) for RNIIRS and information density for SICD, according to the RGIQE."""
264
- scp_noise = _get_sigma0_noise(xml_helper)
265
- signal = _get_default_signal_estimate(xml_helper)
261
+ scp_noise = _get_sigma0_noise(sicd_ew)
262
+ signal = _get_default_signal_estimate(sicd_ew)
266
263
 
267
- u_row = xml_helper.load("./{*}Grid/{*}Row/{*}UVectECF")
268
- u_col = xml_helper.load("./{*}Grid/{*}Col/{*}UVectECF")
264
+ u_row = sicd_ew["Grid"]["Row"]["UVectECF"]
265
+ u_col = sicd_ew["Grid"]["Col"]["UVectECF"]
269
266
  ipn = np.cross(u_row, u_col)
270
267
  u_ipn = ipn / np.linalg.norm(ipn)
271
268
 
272
- scp_llh = xml_helper.load("./{*}GeoData/{*}SCP/{*}LLH")
269
+ scp_llh = sicd_ew["GeoData"]["SCP"]["LLH"]
273
270
  u_gpn = sarkit.wgs84.up(scp_llh)
274
271
 
275
272
  bw_sf = np.dot(u_gpn, u_ipn)
276
273
  bw_area = abs(
277
- xml_helper.load("./{*}Grid/{*}Row/{*}ImpRespBW")
278
- * xml_helper.load("./{*}Grid/{*}Col/{*}ImpRespBW")
274
+ sicd_ew["Grid"]["Row"]["ImpRespBW"]
275
+ * sicd_ew["Grid"]["Col"]["ImpRespBW"]
279
276
  * bw_sf
280
277
  )
281
278
 
@@ -0,0 +1 @@
1
+ __version__ = '0.3.1'