Skip to content

Commit

Permalink
Merge pull request #54 from ASFHyP3/changelog
Browse files Browse the repository at this point in the history
Address pre-release review feedback
  • Loading branch information
jhkennedy authored Jan 22, 2021
2 parents 3e2de34 + 221deee commit 7e3be52
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.4.0](https://github.com/ASFHyP3/hyp3-autorift/compare/v0.3.3...v0.4.0)

**HyP3 v1 is no longer supported as of this release.**

### Added
* Added support for global processing (previously only Greenland and Antarctica)
by pointing at the new autoRIFT parameter files provided by JPL
Expand All @@ -18,9 +20,14 @@ and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### Changed
* Sentinel-2 support now targets level-1c products instead of level-2a products to
remove baked in slope correction
* `hyp3_autorift` entrypoint point now kicks off HyP3 v2 processing (options have changed! see `--help`)

### Fixed
* 1/2 pixel offset in netCDF file due to gdal and netCDF using different pixel reference points.
* 1/2 pixel offset in netCDF file due to gdal and netCDF using different pixel reference points

### Removed
* The `autorift` entrypoint and HyP3 v1 support has been removed
* The `hyp3_autorift_v2` entrypoint has been removed (now just `hyp3_autorift`)

## [0.3.1](https://github.com/ASFHyP3/hyp3-autorift/compare/v0.3.0...v0.3.1)

Expand Down
2 changes: 1 addition & 1 deletion docs/api_example.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ definitions. A minimal job list for a single Sentinel-1 autoRIFT job would look

The job list may contain up to 200 job definitions.

### Sentinel-1, Sentinel-2, and (soon!) Landsat-8
### Sentinel-1, Sentinel-2, and Landsat-8

For each supported satellite mission, the granule (scene) pairs to process are
provided by ID:
Expand Down
2 changes: 1 addition & 1 deletion hyp3_autorift/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def find_jpl_dem(polygon: ogr.Geometry) -> dict:

def subset_jpl_tifs(polygon: ogr.Geometry, buffer: float = 0.15, target_dir: Union[str, Path] = '.'):
dem_info = find_jpl_dem(polygon)
log.info(f'Subsetting {dem_info["name"]} tifs from s3://{ITS_LIVE_BUCKET}/{AUTORIFT_PREFIX}/')
log.info(f'Subsetting {dem_info["name"]} tifs: {dem_info["tifs"]["h"].replace("_h.tif", "_*")}')

min_x, max_x, min_y, max_y = poly_bounds_in_proj(polygon.Buffer(buffer), in_epsg=4326, out_epsg=dem_info['epsg'])
output_bounds = (min_x, min_y, max_x, max_y)
Expand Down
4 changes: 2 additions & 2 deletions hyp3_autorift/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,14 @@ def process(reference: str, secondary: str, polarization: str = 'hh', band: str
reference_url = reference_metadata['assets'][band]['href']
# FIXME: This is only because autoRIFT can't handle /vsis3/
reference_url = reference_url.replace(f's3://{bucket}/', '')
reference_path = Path.cwd() / f'{reference}_{Path(reference_url).name}'
reference_path = Path.cwd() / f'{reference}_{Path(reference_url).name}' # file names are just band.jp2
io.download_s3_file_requester_pays(reference_path, bucket, reference_url)

secondary_metadata = get_s2_metadata(secondary)
secondary = secondary_metadata['properties']['sentinel:product_id']
secondary_url = secondary_metadata['assets'][band]['href']
# FIXME: This is only because autoRIFT can't handle /vsis3/
secondary_url = secondary_url.replace(f's3://{bucket}/', '')
secondary_url = secondary_url.replace(f's3://{bucket}/', '') # file names are just band.jp2
secondary_path = Path.cwd() / f'{secondary}_{Path(secondary_url).name}'
io.download_s3_file_requester_pays(secondary_path, bucket, secondary_url)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_get_bucket():
def test_get_lc2_metadata_not_found():
responses.add(
responses.GET, f'{process.LC2_SEARCH_URL}/foo',
body='{"message": "Item not found"}', status=400,
body='{"message": "Item not found"}', status=404,
)
with pytest.raises(HTTPError):
process.get_lc2_metadata('foo')
Expand Down

0 comments on commit 7e3be52

Please sign in to comment.