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.
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/PKG-INFO +23 -13
- sarkit_convert-0.3.1/README.md +25 -0
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/pyproject.toml +21 -22
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/sarkit_convert/_utils.py +15 -18
- sarkit_convert-0.3.1/sarkit_convert/_version.py +1 -0
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/sarkit_convert/cosmo.py +172 -178
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/sarkit_convert/create_arp_poly.py +1 -1
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/sarkit_convert/iceye.py +196 -291
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/sarkit_convert/sentinel.py +284 -326
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/sarkit_convert/terrasar.py +179 -179
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/test_create_arp.py +2 -2
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/test_utils.py +10 -14
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/iceye/test_iceye.py +2 -1
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/sentinel/test_sentinel.py +2 -1
- sarkit_convert-0.2.0/README.md +0 -18
- sarkit_convert-0.2.0/sarkit_convert/_version.py +0 -1
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/LICENSE +0 -0
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/sarkit_convert/__init__.py +0 -0
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/sarkit_convert/sidd_metadata.py +0 -0
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/__init__.py +0 -0
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/data/README.md +0 -0
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/data/gdal_results.json +0 -0
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/data/generate_gdal_results.py +0 -0
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/data/sentinel_sicd_xml/LICENSE.txt +0 -0
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {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
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/test_dependencies.py +0 -0
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/core/test_sidd_metadata.py +0 -0
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/cosmo/__init__.py +0 -0
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/cosmo/test_cosmo.py +0 -0
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/cosmo/test_dependencies.py +0 -0
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/iceye/__init__.py +0 -0
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/iceye/test_dependencies.py +0 -0
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/sentinel/__init__.py +0 -0
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/sentinel/test_dependencies.py +0 -0
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/terrasar/__init__.py +0 -0
- {sarkit_convert-0.2.0 → sarkit_convert-0.3.1}/tests/terrasar/test_dependencies.py +0 -0
- {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
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: sarkit-convert
|
|
3
|
-
Version: 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
|
-
|
|
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>=
|
|
19
|
-
Requires-Dist: pyproj>=3.
|
|
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.
|
|
24
|
+
Requires-Dist: scipy>=1.13.0
|
|
22
25
|
Provides-Extra: iceye
|
|
23
|
-
Requires-Dist: h5py>=3.
|
|
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.
|
|
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.
|
|
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>=
|
|
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
|
+
[](https://pypi.org/project/sarkit-convert/)
|
|
50
|
+

|
|
51
|
+
[](./LICENSE)
|
|
52
|
+
[](https://scientific-python.org/specs/spec-0000/)
|
|
53
|
+
<br>
|
|
54
|
+
[](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
|
+
[](https://pypi.org/project/sarkit-convert/)
|
|
6
|
+

|
|
7
|
+
[](./LICENSE)
|
|
8
|
+
[](https://scientific-python.org/specs/spec-0000/)
|
|
9
|
+
<br>
|
|
10
|
+
[](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.
|
|
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>=
|
|
24
|
-
"pyproj>=3.
|
|
26
|
+
"numpy>=2.0.0",
|
|
27
|
+
"pyproj>=3.6.1",
|
|
25
28
|
"sarkit>=1.3.0",
|
|
26
|
-
"scipy>=1.
|
|
29
|
+
"scipy>=1.13.0",
|
|
27
30
|
]
|
|
28
|
-
version = "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.
|
|
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.
|
|
40
|
+
"h5py>=3.11.0",
|
|
41
41
|
"python-dateutil>=2.9.0",
|
|
42
|
-
"shapely>=2.0.
|
|
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>=
|
|
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.
|
|
76
|
-
"tifffile>=
|
|
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(
|
|
189
|
+
def _get_sigma0_noise(sicd_ew):
|
|
190
190
|
"""Calculate the absolute noise estimate, in sigma0 power units."""
|
|
191
191
|
|
|
192
|
-
if
|
|
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 =
|
|
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 =
|
|
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(
|
|
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 =
|
|
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(
|
|
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(
|
|
265
|
-
signal = _get_default_signal_estimate(
|
|
261
|
+
scp_noise = _get_sigma0_noise(sicd_ew)
|
|
262
|
+
signal = _get_default_signal_estimate(sicd_ew)
|
|
266
263
|
|
|
267
|
-
u_row =
|
|
268
|
-
u_col =
|
|
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 =
|
|
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
|
-
|
|
278
|
-
*
|
|
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'
|