GeoscienceAustralia / PyRate

A Python tool for estimating velocity and time-series from Interferometric Synthetic Aperture Radar (InSAR) data.
https://geoscienceaustralia.github.io/PyRate/
Apache License 2.0
199 stars 69 forks source link

Investigate and fix test fails bypassed in PR 347 #355

Open mcgarth opened 2 years ago

mcgarth commented 2 years ago

PR https://github.com/GeoscienceAustralia/PyRate/pull/347 introduced a crucial bug fix to correct the way unit conversion is applied. However, these changes introduced test fails in the test_mpi_vs_multiprocess_vs_single_process module.

The tests were failing in the tests.common.assert_tifs_equal function. Some were failing when CVD_MAXVAR and/or CVD_ALPHA were not equivalent to 1.d.p. between mpi/multiprocess/serial jobs:https://github.com/GeoscienceAustralia/PyRate/blob/8893509268ae34a3464a07a8ce67f1219a326f8d/tests/common.py#L196. Others were failing where interferogram arrays were not equivalent to 3.d.p. as in the current test: https://github.com/GeoscienceAustralia/PyRate/blob/8893509268ae34a3464a07a8ce67f1219a326f8d/tests/common.py#L203 or even 1.d.p. when the threshold was relaxed.

To bring the unit conversion bug fix in to master ASAP, the test fail problem was bypassed in commit https://github.com/GeoscienceAustralia/PyRate/commit/0a5363ea6dda45d9c85acb95dd913b50c6735644 by switching these tests to use the old unit test data (gamma_conf) rather than the new Mexico "CropA" data (mexico_cropa_conf).

The reasons for the test fails using Mexico CropA data should be fully investigated and rectified.