Closed basaks closed 3 years ago
Merging #307 into develop will increase coverage by
0.23%
. The diff coverage is95.68%
.
@@ Coverage Diff @@
## develop #307 +/- ##
===========================================
+ Coverage 83.22% 83.45% +0.23%
===========================================
Files 27 28 +1
Lines 3845 3923 +78
Branches 588 599 +11
===========================================
+ Hits 3200 3274 +74
- Misses 522 526 +4
Partials 123 123
Impacted Files | Coverage Δ | |
---|---|---|
pyrate/core/phase_closure/mst_closure.py | 91.52% <91.52%> (ø) |
|
pyrate/core/mst.py | 96.61% <100.00%> (-0.12%) |
:arrow_down: |
pyrate/core/orbital.py | 93.65% <100.00%> (+0.20%) |
:arrow_up: |
pyrate/core/shared.py | 92.42% <100.00%> (ø) |
|
pyrate/core/prepifg_helper.py | 94.96% <0.00%> (+1.43%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update b423291...92160cc. Read the comment docs.
I too have done some initial testing with the cropA Mexico data. Turning coherence masking on and off has a big impact on the result of closure check. With cohmask: 0
I get:
15:09:34 closure_check 68 904571 INFO 0/0 Performing closure check on original set of 30 ifgs
15:09:37 closure_check 78 904571 INFO 0/0 After closure check 27 ifgs are retained
15:09:38 correct 92 904571 INFO 0/0 Found 13 unique epochs in the 27 interferogram network
i.e. 3 ifgs are dropped.
But with cohmask: 1
and cohthresh: 0.3
I get:
14:57:36 closure_check 68 823640 INFO 0/0 Performing closure check on original set of 30 ifgs
14:57:39 closure_check 78 823640 INFO 0/0 After closure check 23 ifgs are retained
14:57:39 correct 92 823640 INFO 0/0 Found 11 unique epochs in the 23 interferogram network
i.e. 7 ifgs are dropped, and 2 epochs are lost.
I wonder if coherence masking should be happening after phase closure checking has been applied... thoughts?
Regarding a strategy for reducing the number of loops used, @tfuhrmann , @basaks and I agreed on implementing:
We have agreed to close (merge) this PR once CI is passing in order to facilitate merging a bunch of backed-up features in to develop
. Despite this, review of the phase closure
functionality is not fully complete, and will be subject to a further PR and review prior to making it in to a PyRate release.
This PR adds phase closure correction in PyRate .
This
readme
can also be found here: https://github.com/GeoscienceAustralia/PyRate/tree/6dcac13d26d059101ac67ae54f69b3a8b32b64e6/pyrate/core/phase_closureUpdate the doc here to track changes in
pyrate
repo.Phase Closure
To use phase closure correction, simply add the string _phaseclosure in the list of
correct
ions as can be seen below:The following params are used from the pyrate config file:
Currently only max_loop_length: 3 produce repeatable results with Mexico CropA dataset.
Phase closure correction has the following main functionalities:
Compute the closed loops using
networkx
. Loops are assigned signs for each interferogram, and assigned a weight based on total weight of each loop, which is the sum of difference between the ifg second and first date. This is done in python file _mstclosure.py. We perform several steps in this stage:compute _sumclosure of each loop from stage 1 for each pixel. In addition, we perform the following steps in _sumclosure.py:
_closurecheck.py is used for orchestration of the functionalities above. After stage 2, we drop ifgs exceeding _threshold_to_removeifg and _loop_count_for_threshold_to_removeifg. See docstring in function _closure_check.drop_ifgs_exceedingthreshold.
Steps 1-3 are repeated until a stable list of interferograms are returned (see
_closure_check.filter_to_closure_checkedifgs).
Once a stable list of interferograms is found, in correct.py, write a new ifglist in the working directory, update params, and use the updated ifglist for further pyrate processing.
Also in correct.py, we detect persistent scatterers (pixels) breaching _phase_unwrap_errorthreshold.
Finally, we write the ifg phase data after assigning nulls to pixels breaching _phase_unwrap_errorthreshold. Phase closure correction is done at this stage.