Skip to content

Commit

Permalink
Merge pull request #223 from ASFHyP3/develop
Browse files Browse the repository at this point in the history
Release v1.1.2
  • Loading branch information
forrestfwilliams authored Jul 2, 2024
2 parents f0e523e + b09bfbb commit 9e58985
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 12 deletions.
3 changes: 0 additions & 3 deletions .flake8

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ 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).

## [1.1.2]
### Fixed
* Renamed `hyp3_isce2.logging` to `hyp3_isce2.logger` to avoid shadowing built-in.
* Source of product start times in `merge_tops_bursts` to use the `asf_search` umm record.

## [1.1.1]
### Fixed
* Upgraded to `dem_sticher>=2.5.6` to resolve geoid download errors. Fixes [#215](https://github.com/ASFHyP3/hyp3-isce2/issues/215)
Expand Down
2 changes: 1 addition & 1 deletion src/hyp3_isce2/insar_stripmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from hyp3_isce2 import stripmapapp_alos as stripmapapp
from hyp3_isce2.dem import download_dem_for_isce2
from hyp3_isce2.logging import configure_root_logger
from hyp3_isce2.logger import configure_root_logger

log = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion src/hyp3_isce2/insar_tops.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from hyp3_isce2 import slc
from hyp3_isce2 import topsapp
from hyp3_isce2.dem import download_dem_for_isce2
from hyp3_isce2.logging import configure_root_logger
from hyp3_isce2.logger import configure_root_logger
from hyp3_isce2.s1_auxcal import download_aux_cal
from hyp3_isce2.utils import get_esa_credentials

Expand Down
2 changes: 1 addition & 1 deletion src/hyp3_isce2/insar_tops_burst.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
validate_bursts,
)
from hyp3_isce2.dem import download_dem_for_isce2
from hyp3_isce2.logging import configure_root_logger
from hyp3_isce2.logger import configure_root_logger
from hyp3_isce2.s1_auxcal import download_aux_cal
from hyp3_isce2.utils import (
ParameterFile,
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions src/hyp3_isce2/merge_tops_bursts.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ def get_burst_metadata(product_paths: Iterable[Path]) -> Iterable[BurstProduct]:
burst_ids = [result.properties['burst']['relativeBurstID'] for result in results]
burst_indexes = [result.properties['burst']['burstIndex'] for result in results]
polarization = [result.properties['polarization'] for result in results]
start_utc = [
datetime.datetime.strptime(result.properties['startTime'], '%Y-%m-%dT%H:%M:%S.%fZ') for result in results
]

start_utc_strs = [result.umm['TemporalExtent']['RangeDateTime']['BeginningDateTime'] for result in results]
start_utc = [datetime.datetime.strptime(utc, '%Y-%m-%dT%H:%M:%S.%fZ') for utc in start_utc_strs]
relative_orbits = [result.properties['pathNumber'] for result in results]
n_lines = [int(meta['Radarnlines']) for meta in metas]
n_samples = [int(meta['Radarnsamples']) for meta in metas]
Expand Down
3 changes: 2 additions & 1 deletion src/hyp3_isce2/water_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def create_water_mask(input_image: str, output_image: str, gdal_format='ISCE', t
merged_warped_path,
f'--outfile={output_image}',
'--calc="numpy.abs((A.astype(numpy.int16) + 1) - 2)"', # Change 1's to 0's and 0's to 1's.
f'--format={gdal_format}'
f'--format={gdal_format}',
'--overwrite',
]
subprocess.run(flip_values_command, check=True)
6 changes: 4 additions & 2 deletions tests/test_merge_tops_bursts.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ def mock_asf_search_results(
path_number: int,
) -> asf_search.ASFSearchResults:
product = asf_search.ASFProduct()
product.umm = {'InputGranules': [slc_name]}
product.umm = {
'InputGranules': [slc_name],
'TemporalExtent': {'RangeDateTime': {'BeginningDateTime': '2020-06-04T02:23:13.963847Z'}},
}
product.properties.update(
{
'burst': {'subswath': subswath, 'burstIndex': burst_index, 'relativeBurstID': burst_id},
'polarization': polarization,
'url': f'https://foo.com/{slc_name}/baz.zip',
'startTime': '2020-06-04T02:23:13.963847Z',
'pathNumber': path_number,
}
)
Expand Down

0 comments on commit 9e58985

Please sign in to comment.