dist-s1-enumerator 1.0.4__py3-none-any.whl → 1.0.5__py3-none-any.whl
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.
- dist_s1_enumerator/asf.py +23 -0
- {dist_s1_enumerator-1.0.4.dist-info → dist_s1_enumerator-1.0.5.dist-info}/METADATA +1 -1
- {dist_s1_enumerator-1.0.4.dist-info → dist_s1_enumerator-1.0.5.dist-info}/RECORD +6 -6
- {dist_s1_enumerator-1.0.4.dist-info → dist_s1_enumerator-1.0.5.dist-info}/WHEEL +0 -0
- {dist_s1_enumerator-1.0.4.dist-info → dist_s1_enumerator-1.0.5.dist-info}/licenses/LICENSE +0 -0
- {dist_s1_enumerator-1.0.4.dist-info → dist_s1_enumerator-1.0.5.dist-info}/top_level.txt +0 -0
dist_s1_enumerator/asf.py
CHANGED
|
@@ -12,6 +12,27 @@ from dist_s1_enumerator.mgrs_burst_data import get_burst_ids_in_mgrs_tiles, get_
|
|
|
12
12
|
from dist_s1_enumerator.tabular_models import reorder_columns, rtc_s1_resp_schema, rtc_s1_schema
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
def convert_asf_url_to_cumulus(url: str) -> str:
|
|
16
|
+
asf_base = 'https://datapool.asf.alaska.edu/RTC/OPERA-S1/'
|
|
17
|
+
cumulus_base = 'https://cumulus.asf.earthdatacloud.nasa.gov/OPERA/OPERA_L2_RTC-S1/'
|
|
18
|
+
|
|
19
|
+
if not (url.startswith(cumulus_base) or url.startswith(asf_base)):
|
|
20
|
+
warn(f'URL {url} is not a valid ASF datapool or cumulus earthdatacloud URL.')
|
|
21
|
+
return url
|
|
22
|
+
|
|
23
|
+
if not url.startswith(asf_base):
|
|
24
|
+
return url
|
|
25
|
+
|
|
26
|
+
filename = url.split('/')[-1]
|
|
27
|
+
granule_pol_parts = filename.rsplit('_', 1)
|
|
28
|
+
if len(granule_pol_parts) != 2:
|
|
29
|
+
raise ValueError(f'Could not extract granule name from filename: {filename}')
|
|
30
|
+
|
|
31
|
+
granule_name = granule_pol_parts[0]
|
|
32
|
+
new_url = f'{cumulus_base}{granule_name}/{filename}'
|
|
33
|
+
return new_url
|
|
34
|
+
|
|
35
|
+
|
|
15
36
|
def format_polarization(pol: list | str) -> str:
|
|
16
37
|
if isinstance(pol, list):
|
|
17
38
|
if ('VV' in pol) and len(pol) == 2:
|
|
@@ -167,6 +188,8 @@ def get_rtc_s1_ts_metadata_by_burst_ids(
|
|
|
167
188
|
|
|
168
189
|
df_rtc['url_copol'] = url_copol
|
|
169
190
|
df_rtc['url_crosspol'] = url_crosspol
|
|
191
|
+
df_rtc['url_copol'] = df_rtc['url_copol'].map(convert_asf_url_to_cumulus)
|
|
192
|
+
df_rtc['url_crosspol'] = df_rtc['url_crosspol'].map(convert_asf_url_to_cumulus)
|
|
170
193
|
df_rtc = df_rtc.drop(columns=['all_urls'])
|
|
171
194
|
|
|
172
195
|
# Ensure the data is sorted by jpl_burst_id and acq_dt
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dist-s1-enumerator
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.5
|
|
4
4
|
Summary: Enumeration and ops library for the OPERA DIST-S1 project
|
|
5
5
|
Author-email: "Richard West, Charlie Marshak, Talib Oliver-Cabrera, and Jungkyo Jung" <charlie.z.marshak@jpl.nasa.gov>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
dist_s1_enumerator/__init__.py,sha256=L89uOLGobmF-ZsBA767RiGpKCDKVx6KOK6wJkjGQ69M,1766
|
|
2
|
-
dist_s1_enumerator/asf.py,sha256=
|
|
2
|
+
dist_s1_enumerator/asf.py,sha256=m0LHIBM6OSeoNi2Htin5oeeyGjsWecFgyKeqUXNcbDo,13850
|
|
3
3
|
dist_s1_enumerator/dist_enum.py,sha256=VJxoCZenrwwmLvOZZ-Roq-pc6jfGrlX9AnlD_oiWuJg,21188
|
|
4
4
|
dist_s1_enumerator/dist_enum_inputs.py,sha256=KxGZNQYEsN2KNPcrHnh8Zi5e84dBdbtyeVV-aA8XI5o,6732
|
|
5
5
|
dist_s1_enumerator/exceptions.py,sha256=JhT8fIEmW3O2OvUQADkEJkL8ZrUN5pkKNzCCSt33goQ,82
|
|
@@ -11,8 +11,8 @@ dist_s1_enumerator/tabular_models.py,sha256=OjsTg6fN9Mq-LHVKuz9klFD3DsG0WkfPmfDf
|
|
|
11
11
|
dist_s1_enumerator/data/jpl_burst_geo.parquet,sha256=maST6onCUlYVaQozf-zl47VMTQ7nflLros8kLQG8ZDE,24736554
|
|
12
12
|
dist_s1_enumerator/data/mgrs.parquet,sha256=P2jY4l2dztz_wdzZATBwgooa5mIZSC8TgJbHUjR5m0c,601482
|
|
13
13
|
dist_s1_enumerator/data/mgrs_burst_lookup_table.parquet,sha256=RjrgwRKn2Ac2q4_8mk9DpkX5FXPYPBReiNbqT0iFp5A,3364657
|
|
14
|
-
dist_s1_enumerator-1.0.
|
|
15
|
-
dist_s1_enumerator-1.0.
|
|
16
|
-
dist_s1_enumerator-1.0.
|
|
17
|
-
dist_s1_enumerator-1.0.
|
|
18
|
-
dist_s1_enumerator-1.0.
|
|
14
|
+
dist_s1_enumerator-1.0.5.dist-info/licenses/LICENSE,sha256=qsoT0jnoSQSgSzA-sywESwmVxC3XcugfW-3vctvz2aM,11346
|
|
15
|
+
dist_s1_enumerator-1.0.5.dist-info/METADATA,sha256=DQRz-rCezmqUrzstZbm86W8fySTjf6trDa5v0RWutmI,8794
|
|
16
|
+
dist_s1_enumerator-1.0.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
17
|
+
dist_s1_enumerator-1.0.5.dist-info/top_level.txt,sha256=5-RGu6oxsKKyhybZZSuUImALhcQT8ZOAnVv2MmrESDE,19
|
|
18
|
+
dist_s1_enumerator-1.0.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|