dist-s1-enumerator 1.0.4__py3-none-any.whl → 1.0.6__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 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.4
3
+ Version: 1.0.6
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
@@ -125,6 +125,15 @@ There are two category of tests: unit tests and integration tests. The former ca
125
125
  The integration tests that are the most time consuming are represented by the notebooks and are run only upon a release PR.
126
126
  These notebook tests are tagged with `notebooks` and can be excluded from the other tests with `pytest tests -m 'not notebooks'`.
127
127
 
128
+ # Remarks about the Dateline/Dateline and Geometry
129
+
130
+ The antimeridian (or dateline) is the line at the -180 longitude mark that global CRS tiles are wrapped by standard global reference systems.
131
+ The geometries of the bursts and the MGRS tiles in this package are all in `epsg:4326` (standard lon/lat).
132
+ The geometries are all between -180 and 180 so those geometries that cross the antimeridian/dateline are generally wrapped.
133
+ For MGRS tiles, the statement that a geometry overlaps the antimeridian occurs if and only if the geometry is a Polygon.
134
+ The same is true for burst geometries.
135
+ See `test_antimeridian_crossing` in [`tests/test_mgrs_burst_data.py`](tests/test_mgrs_burst_data.py).
136
+
128
137
  # Contributing
129
138
 
130
139
  We welcome contributions to this open-source package. To do so:
@@ -1,5 +1,5 @@
1
1
  dist_s1_enumerator/__init__.py,sha256=L89uOLGobmF-ZsBA767RiGpKCDKVx6KOK6wJkjGQ69M,1766
2
- dist_s1_enumerator/asf.py,sha256=ijd83Mpyc4pK1dgM2-7ywusyxdggT6tWy9FllLYg1M8,12930
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
@@ -8,11 +8,11 @@ dist_s1_enumerator/param_models.py,sha256=DI2MgSxiPo7HiRKtXX8bxZnQtuoYAmtAcdYYrn
8
8
  dist_s1_enumerator/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  dist_s1_enumerator/rtc_s1_io.py,sha256=TPlgMdyjRYnGWCt7J1nQ1AY90lAPQoMy2BN0oFMw4gg,5267
10
10
  dist_s1_enumerator/tabular_models.py,sha256=OjsTg6fN9Mq-LHVKuz9klFD3DsG0WkfPmfDfdZYUJOw,3189
11
- dist_s1_enumerator/data/jpl_burst_geo.parquet,sha256=maST6onCUlYVaQozf-zl47VMTQ7nflLros8kLQG8ZDE,24736554
11
+ dist_s1_enumerator/data/jpl_burst_geo.parquet,sha256=G25W_P50JpnOANtwFIVI36Douw00axJClD3QmW-uh8o,36136927
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.4.dist-info/licenses/LICENSE,sha256=qsoT0jnoSQSgSzA-sywESwmVxC3XcugfW-3vctvz2aM,11346
15
- dist_s1_enumerator-1.0.4.dist-info/METADATA,sha256=8MlnyGUpUp679d_7rBQ5OCnc9mid4My0PrR8ql7DqT8,8794
16
- dist_s1_enumerator-1.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
17
- dist_s1_enumerator-1.0.4.dist-info/top_level.txt,sha256=5-RGu6oxsKKyhybZZSuUImALhcQT8ZOAnVv2MmrESDE,19
18
- dist_s1_enumerator-1.0.4.dist-info/RECORD,,
14
+ dist_s1_enumerator-1.0.6.dist-info/licenses/LICENSE,sha256=qsoT0jnoSQSgSzA-sywESwmVxC3XcugfW-3vctvz2aM,11346
15
+ dist_s1_enumerator-1.0.6.dist-info/METADATA,sha256=DDB2HbSGUQvCQSP6ytYsVEyE8N__VIiO-NyHkiCQBwE,9483
16
+ dist_s1_enumerator-1.0.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
17
+ dist_s1_enumerator-1.0.6.dist-info/top_level.txt,sha256=5-RGu6oxsKKyhybZZSuUImALhcQT8ZOAnVv2MmrESDE,19
18
+ dist_s1_enumerator-1.0.6.dist-info/RECORD,,