Skip to content

Commit

Permalink
Merge pull request #46 from ASFHyP3/add_rsc
Browse files Browse the repository at this point in the history
Add elevation.dem.rsc to Back-Projection Product
  • Loading branch information
AndrewPlayer3 authored Sep 6, 2024
2 parents fa0f180 + 43bf051 commit f9e8516
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
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).

## [0.7.1]

### Added
* The back-projection product now includes the elevation.dem.rsc file.

## [0.7.0]

### Changed
Expand Down
2 changes: 2 additions & 0 deletions src/hyp3_srg/back_projection.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def create_product(work_dir) -> Path:
gslc_path = list(work_dir.glob('S1*.geo'))[0]
product_name = gslc_path.with_suffix('').name
orbit_path = work_dir / f'{product_name}.orbtiming'
rsc_path = work_dir / 'elevation.dem.rsc'
zip_path = work_dir / f'{product_name}.zip'

parameter_file = work_dir / f'{product_name}.txt'
Expand All @@ -89,6 +90,7 @@ def create_product(work_dir) -> Path:
with zipfile.ZipFile(zip_path, 'w', compression=zipfile.ZIP_STORED) as z:
z.write(gslc_path, gslc_path.name)
z.write(orbit_path, orbit_path.name)
z.write(rsc_path, rsc_path.name)
z.write(parameter_file, parameter_file.name)

return zip_path
Expand Down

0 comments on commit f9e8516

Please sign in to comment.