Skip to content

Commit

Permalink
Merge pull request #39 from ASFHyP3/stable-patch
Browse files Browse the repository at this point in the history
apply a patch from autoRIFT to fix nan to int error
  • Loading branch information
jhkennedy authored Dec 10, 2020
2 parents 152b934 + ca33765 commit ccea7cf
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ 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).

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

### Changed
* Browse images and thumbnails will be generated using the [ITS_LIVE](https://its-live.jpl.nasa.gov/) colormap

## [0.3.0](https://github.com/ASFHyP3/hyp3-autorift/compare/v0.1.0...v0.2.0)
### Fixed
* Failures due to stable surface misclassification

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

### Added
* Installed autoRIFT v1.0.8 for processing optical scenes (in addition to v1.0.7 already installed as part of ISCE)
Expand Down
12 changes: 11 additions & 1 deletion hyp3_autorift/vend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,17 @@
This directory contains modules needed for the HyP3 autoRIFT plugin that couldn't
be easily incorporated from a package manager or installed appropriately.

## `testautoRIFT_ISCE.py` and `testautorRIFT.py`
## `testautoRIFT_ISCE.py` and `testautoRIFT.py`

---
*Note: A patch from autoRIFT was applied to these files to prevent failures due
to stable surface misclassification, which will be included in the next autoRIFT
release:*
```diff
- stable_count = np.sum(SSM & np.logical_not(np.isnan(DX)))
+ stable_count = np.sum(SSM & np.logical_not(np.isnan(DX)) & (DX-DXref > -5) & (DX-DXref < 5) & (DY-DYref > -5) & (DY-DYref < 5))
```
---

These modules were provided in the autoRIFT
[v1.0.8 release](https://github.com/leiyangleon/autoRIFT/releases/tag/v1.0.8),
Expand Down
2 changes: 1 addition & 1 deletion hyp3_autorift/vend/testautoRIFT.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ def main():
DXref = offset2vy_2 / (offset2vx_1 * offset2vy_2 - offset2vx_2 * offset2vy_1) * VXref - offset2vx_2 / (offset2vx_1 * offset2vy_2 - offset2vx_2 * offset2vy_1) * VYref
DYref = offset2vx_1 / (offset2vx_1 * offset2vy_2 - offset2vx_2 * offset2vy_1) * VYref - offset2vy_1 / (offset2vx_1 * offset2vy_2 - offset2vx_2 * offset2vy_1) * VXref

stable_count = np.sum(SSM & np.logical_not(np.isnan(DX)))
stable_count = np.sum(SSM & np.logical_not(np.isnan(DX)) & (DX-DXref > -5) & (DX-DXref < 5) & (DY-DYref > -5) & (DY-DYref < 5))

if stable_count == 0:
stable_shift_applied = 0
Expand Down
2 changes: 1 addition & 1 deletion hyp3_autorift/vend/testautoRIFT_ISCE.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ def main():
DXref = offset2vy_2 / (offset2vx_1 * offset2vy_2 - offset2vx_2 * offset2vy_1) * VXref - offset2vx_2 / (offset2vx_1 * offset2vy_2 - offset2vx_2 * offset2vy_1) * VYref
DYref = offset2vx_1 / (offset2vx_1 * offset2vy_2 - offset2vx_2 * offset2vy_1) * VYref - offset2vy_1 / (offset2vx_1 * offset2vy_2 - offset2vx_2 * offset2vy_1) * VXref

stable_count = np.sum(SSM & np.logical_not(np.isnan(DX)))
stable_count = np.sum(SSM & np.logical_not(np.isnan(DX)) & (DX-DXref > -5) & (DX-DXref < 5) & (DY-DYref > -5) & (DY-DYref < 5))

if stable_count == 0:
stable_shift_applied = 0
Expand Down

0 comments on commit ccea7cf

Please sign in to comment.