Skip to content

Commit a6608d4

Browse files
Merge pull request #104 from ASFHyP3/develop
Release v0.1.9
2 parents cfaab65 + 513153c commit a6608d4

4 files changed

Lines changed: 7 additions & 19 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [PEP 440](https://www.python.org/dev/peps/pep-0440/)
77
and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9+
## [0.1.9]
10+
11+
### Fixed
12+
- Removed unproductive `prep_rtc.validate_slc` function. Fixes https://github.com/ASFHyP3/hyp3-OPERA-RTC/issues/102.
13+
914
## [0.1.8]
1015

1116
### Fixed

requirements-static.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ruff==0.12.9
1+
ruff==0.12.11
22
mypy==1.17.1
33
lxml-stubs
44
types-shapely

src/hyp3_opera_rtc/prep_rtc.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -96,21 +96,6 @@ def parse_response_for_burst_params(response: dict) -> tuple[str, str]:
9696
return source_slc, f't{opera_burst_id.lower()}'
9797

9898

99-
def validate_slc(granule: str) -> str:
100-
pol = granule.split('_')[4][2:4]
101-
if pol in {'VH', 'HV'}:
102-
raise ValueError(f'{granule} has polarization {pol}, must be VV or HH')
103-
104-
response = query_cmr(
105-
(('short_name', 'SENTINEL-1*'), ('options[short_name][pattern]', 'true'), ('granule_ur', f'{granule}-SLC'))
106-
)
107-
granule_exists = bool(response['items'])
108-
if not granule_exists:
109-
raise ValueError(f'Granule does not exist: {granule}')
110-
111-
return granule
112-
113-
11499
def query_cmr(params: tuple) -> dict:
115100
response = requests.get(CMR_URL, params=params)
116101
response.raise_for_status()
@@ -157,7 +142,6 @@ def prep_rtc(
157142
if co_pol_granule.endswith('BURST'):
158143
source_slc, opera_burst_id = get_burst_params(co_pol_granule)
159144
else:
160-
validate_slc(co_pol_granule)
161145
source_slc, opera_burst_id = co_pol_granule, None
162146

163147
safe_path = download_file(get_download_url(source_slc), directory=str(input_dir), chunk_size=10485760)

tests/test_prep_rtc.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,5 @@ def test_get_cross_pol_name():
8989

9090

9191
@pytest.mark.skip
92-
def test_get_granule_params():
92+
def test_get_burst_params():
9393
prep_rtc.get_burst_params('S1_146160_IW1_20241029T095958_VV_592B-BURST')
94-
prep_rtc.validate_slc('S1A_IW_SLC__1SDV_20250704T124517_20250704T124544_059934_0771EA_C208')

0 commit comments

Comments
 (0)