From 4e252b2a6cb2256942628c3019f2374b54495b4c Mon Sep 17 00:00:00 2001 From: Jake Herrmann Date: Wed, 21 Aug 2024 10:36:56 -0800 Subject: [PATCH 1/3] delete references to separate `insar_tops_multi_burst` workflow --- README.md | 3 +-- pyproject.toml | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index dab03143..8f629431 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,6 @@ The HyP3-ISCE2 plugin provides a set of workflows (accessible directly in Python - `insar_stripmap`: A workflow for creating ALOS-1 geocoded unwrapped interferogram using ISCE2's Stripmap processing workflow - `insar_tops`: A workflow for creating full-SLC Sentinel-1 geocoded unwrapped interferogram using ISCE2's TOPS processing workflow - `insar_tops_burst`: A workflow for creating burst-based Sentinel-1 geocoded unwrapped interferogram using ISCE2's TOPS processing workflow -- `insar_tops_multi_burst`: A workflow for creating multi-burst Sentinel-1 geocoded unwrapped interferogram using ISCE2's TOPS processing workflow --- To run a workflow, simply run `python -m hyp3_isce2 ++process [WORKFLOW_NAME] [WORKFLOW_ARGS]`. For example, to run the `insar_tops_burst` workflow: @@ -27,7 +26,7 @@ python -m hyp3_isce2 ++process insar_tops_burst \ and, for multiple burst pairs: ``` -python -m hyp3_isce2 ++process insar_tops_multi_burst \ +python -m hyp3_isce2 ++process insar_tops_burst \ --reference S1_136231_IW2_20200604T022312_VV_7C85-BURST S1_136232_IW2_20200604T022315_VV_7C85-BURST \ --secondary S1_136231_IW2_20200616T022313_VV_5D11-BURST S1_136232_IW2_20200616T022316_VV_5D11-BURST \ --looks 20x4 \ diff --git a/pyproject.toml b/pyproject.toml index 7c75a677..1a573a03 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,6 @@ Documentation = "https://hyp3-docs.asf.alaska.edu" [project.scripts] insar_tops_burst = "hyp3_isce2.insar_tops_burst:main" -insar_tops_multi_burst = "hyp3_isce2.insar_tops_multi_burst:main" insar_tops = "hyp3_isce2.insar_tops:main" insar_stripmap = "hyp3_isce2.insar_stripmap:main" merge_tops_bursts = "hyp3_isce2.merge_tops_bursts:main" From 2490d7ff8f6d55cef5a2f7baf89beb6b9acb705f Mon Sep 17 00:00:00 2001 From: Jake Herrmann Date: Wed, 21 Aug 2024 10:42:28 -0800 Subject: [PATCH 2/3] delete `oldest_granule_first` --- src/hyp3_isce2/utils.py | 6 ------ tests/test_utils.py | 7 ------- 2 files changed, 13 deletions(-) diff --git a/src/hyp3_isce2/utils.py b/src/hyp3_isce2/utils.py index a8ebb94c..cfed3eb7 100644 --- a/src/hyp3_isce2/utils.py +++ b/src/hyp3_isce2/utils.py @@ -202,12 +202,6 @@ def make_browse_image(input_tif: str, output_png: str) -> None: ) -def oldest_granule_first(g1, g2): - if g1[14:29] <= g2[14:29]: - return g1, g2 - return g2, g1 - - def load_isce2_image(in_path) -> tuple[isceobj.Image, np.ndarray]: """Read an ISCE2 image file and return the image object and array. diff --git a/tests/test_utils.py b/tests/test_utils.py index 4b50687e..96db4e43 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -75,13 +75,6 @@ def test_gdal_config_manager(): assert gdal.GetConfigOption('OPTION4') == 'VALUE4' -def test_oldest_granule_first(): - oldest = 'S1_249434_IW1_20230511T170732_VV_07DE-BURST' - latest = 'S1_249434_IW1_20230523T170733_VV_8850-BURST' - assert utils.oldest_granule_first(oldest, latest) == (oldest, latest) - assert utils.oldest_granule_first(latest, oldest) == (oldest, latest) - - def test_make_browse_image(): input_tif = 'tests/data/test_geotiff.tif' output_png = 'tests/data/test_browse_image2.png' From 758112de83aa52d44ca9723a60d0b3f5f708e6c5 Mon Sep 17 00:00:00 2001 From: Jake Herrmann Date: Wed, 21 Aug 2024 11:09:23 -0800 Subject: [PATCH 3/3] typo and style changes --- src/hyp3_isce2/utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hyp3_isce2/utils.py b/src/hyp3_isce2/utils.py index cfed3eb7..8b685bd7 100644 --- a/src/hyp3_isce2/utils.py +++ b/src/hyp3_isce2/utils.py @@ -130,7 +130,7 @@ def write(self, out_path: Path): def check_older_granule_is_reference(reference: Union[str, Iterable], secondary: Union[str, Iterable]) -> None: """Checks that the reference granule(s) are older than the secondary granule(s). - This is a conventention which ensures that positive interferogram values represent motion away from the satellite. + This is a convention which ensures that positive interferogram values represent motion away from the satellite. Args: reference: Reference granule(s) @@ -142,12 +142,12 @@ def check_older_granule_is_reference(reference: Union[str, Iterable], secondary: if isinstance(secondary, str): secondary = [secondary] - ref_dates = list(set([g[14:29] for g in reference])) - sec_dates = list(set([g[14:29] for g in secondary])) + ref_dates = list(set([g.split('_')[3] for g in reference])) + sec_dates = list(set([g.split('_')[3] for g in secondary])) if len(ref_dates) > 1 or len(sec_dates) > 1: raise ValueError('Reference granules must be from one date and secondary granules must be from one date.') - if not ref_dates[0] < sec_dates[0]: + if ref_dates[0] >= sec_dates[0]: raise ValueError('Reference granules must be older than secondary granules.')