Skip to content

Commit

Permalink
delete oldest_granule_first
Browse files Browse the repository at this point in the history
  • Loading branch information
jtherrmann committed Aug 21, 2024
1 parent 4e252b2 commit 2490d7f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
6 changes: 0 additions & 6 deletions src/hyp3_isce2/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 0 additions & 7 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 2490d7f

Please sign in to comment.