Skip to content

Commit

Permalink
Merge pull request #172 from ASFHyP3/develop
Browse files Browse the repository at this point in the history
Release 0.9.2
  • Loading branch information
cirrusasf authored Dec 20, 2023
2 parents 6216fc0 + 1d9ec10 commit 5713e16
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [PEP 440](https://www.python.org/dev/peps/pep-0440/)
and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.9.2]
### Fixed
* `No annotation xml file` error in `insar_tops_burst` when processing HH pairs. Fixes [#168](https://github.com/ASFHyP3/hyp3-isce2/issues/168).
### Added
* a warning that processing products over the Anti-Meridian is not currently supported.

## [0.9.1]
### Fixed
* Water Masking now pulls the global shapefile and clips it, rather than pulling a partitioned parque, due to issues around the partition boundaries.
Expand Down
1 change: 1 addition & 0 deletions src/hyp3_isce2/burst.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ def get_isce2_burst_bbox(params: BurstParams, base_dir: Optional[Path] = None) -

s1_obj = Sentinel1()
s1_obj.configure()
s1_obj.polarization = params.polarization.lower()
s1_obj.safe = [str(base_dir / f'{params.granule}.SAFE')]
s1_obj.swathNumber = int(params.swath[-1])
s1_obj.parse()
Expand Down
3 changes: 2 additions & 1 deletion src/hyp3_isce2/insar_tops.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def insar_tops(
config = topsapp.TopsappBurstConfig(
reference_safe=f'{reference_scene}.SAFE',
secondary_safe=f'{secondary_scene}.SAFE',
polarization=polarization,
orbit_directory=str(orbit_dir),
aux_cal_directory=str(aux_cal_dir),
dem_filename=str(dem_path),
Expand Down Expand Up @@ -95,7 +96,7 @@ def main():
parser.add_argument('--esa-password', default=None, help="Password for ESA\'s Copernicus Data Space Ecosystem")
parser.add_argument('--reference-scene', type=str, required=True)
parser.add_argument('--secondary-scene', type=str, required=True)
parser.add_argument('--polarization', type=str, default='VV')
parser.add_argument('--polarization', type=str, choices=['VV', 'HH'], default='VV')
parser.add_argument(
'--looks',
choices=['20x4', '10x2', '5x1'],
Expand Down
5 changes: 5 additions & 0 deletions src/hyp3_isce2/insar_tops_burst.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ def insar_tops_burst(

insar_roi = get_region_of_interest(ref_footprint, sec_footprint, is_ascending=is_ascending)
dem_roi = ref_footprint.intersection(sec_footprint).bounds

if abs(dem_roi[0] - dem_roi[2]) > 180.0 and dem_roi[0] * dem_roi[2] < 0.0:
raise ValueError('Products that cross the anti-meridian are not currently supported.')

log.info(f'InSAR ROI: {insar_roi}')
log.info(f'DEM ROI: {dem_roi}')

Expand All @@ -115,6 +119,7 @@ def insar_tops_burst(
config = topsapp.TopsappBurstConfig(
reference_safe=f'{ref_params.granule}.SAFE',
secondary_safe=f'{sec_params.granule}.SAFE',
polarization=ref_params.polarization,
orbit_directory=str(orbit_dir),
aux_cal_directory=str(aux_cal_dir),
roi=insar_roi,
Expand Down
2 changes: 2 additions & 0 deletions src/hyp3_isce2/templates/topsapp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
<property name="auxiliary data directory">{{ aux_cal_directory }}</property>
<property name="output directory">reference</property>
<property name="safe">{{ reference_safe }}</property>
<property name="polarization">{{ polarization.lower() }}</property>
</component>
<component name="secondary">
<property name="orbit directory">{{ orbit_directory }}</property>
<property name="auxiliary data directory">{{ aux_cal_directory }}</property>
<property name="output directory">secondary</property>
<property name="safe">{{ secondary_safe }}</property>
<property name="polarization">{{ polarization.lower() }}</property>
</component>
<property name="swaths">{{ swaths }}</property>
<property name="range looks">{{ range_looks }}</property>
Expand Down
2 changes: 2 additions & 0 deletions src/hyp3_isce2/topsapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def __init__(
self,
reference_safe: str,
secondary_safe: str,
polarization: str,
orbit_directory: str,
aux_cal_directory: str,
dem_filename: str,
Expand All @@ -60,6 +61,7 @@ def __init__(
):
self.reference_safe = reference_safe
self.secondary_safe = secondary_safe
self.polarization = polarization
self.orbit_directory = orbit_directory
self.aux_cal_directory = aux_cal_directory
self.roi = [roi[1], roi[3], roi[0], roi[2]]
Expand Down
2 changes: 2 additions & 0 deletions tests/test_topsapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ def test_topsapp_burst_config(tmp_path):
config = TopsappBurstConfig(
reference_safe='S1A_IW_SLC__1SDV_20200604T022251_20200604T022318_032861_03CE65_7C85.SAFE',
secondary_safe='S1A_IW_SLC__1SDV_20200616T022252_20200616T022319_033036_03D3A3_5D11.SAFE',
polarization='VV',
orbit_directory='orbits',
aux_cal_directory='aux_cal',
roi=[-118.0, 37.0, -117.0, 38.0],
Expand Down Expand Up @@ -53,6 +54,7 @@ def test_run_topsapp_burst(tmp_path, monkeypatch):
config = TopsappBurstConfig(
reference_safe='',
secondary_safe='',
polarization='',
orbit_directory='',
aux_cal_directory='',
roi=[0, 1, 2, 3],
Expand Down

0 comments on commit 5713e16

Please sign in to comment.