Skip to content

Fix bug in computing grid size #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 28, 2025
Merged

Fix bug in computing grid size #62

merged 2 commits into from
Feb 28, 2025

Conversation

Andreas-Piter
Copy link
Member

Often the computation did not stop when selecting a grid size smaller than 100m in step 1. This seems to have numerical reasons.

@Andreas-Piter Andreas-Piter added the bug Something isn't working label Feb 24, 2025
@Andreas-Piter Andreas-Piter self-assigned this Feb 24, 2025
@Andreas-Piter
Copy link
Member Author

@mahmud1, could you please check if it solves the problem that you reported? I tested it locally and seems to work fine.

mahmud1
mahmud1 previously approved these changes Feb 27, 2025
@mahmud1
Copy link
Member

mahmud1 commented Feb 27, 2025

@mahmud1, could you please check if it solves the problem that you reported? I tested it locally and seems to work fine.

@Andreas-Piter, Thank you. I ran the fix on a small dataset with grid_size=20, but it still didn't resolve the issue I had. The memory usage remains very high and the process is killed at some point in step 1.

ascending orbit -> flip up-down
2025-02-27 21:37:12,790 - INFO -     ---------------------------------------------------------------------------------
2025-02-27 21:37:12,790 - INFO -                          STEP 1:     CONSISTENCY CHECK
2025-02-27 21:37:12,791 - INFO -     ---------------------------------------------------------------------------------
2025-02-27 21:37:12,791 - INFO -                               Parameter           value         default
2025-02-27 21:37:12,791 - INFO -                               _________           _____         _______
2025-02-27 21:37:12,791 - INFO -                            coherence_p1             0.9             0.9
2025-02-27 21:37:12,791 - INFO -                               grid_size              20 <---        200
2025-02-27 21:37:12,791 - INFO -                            mask_p1_file            None <---           
2025-02-27 21:37:12,791 - INFO -                  num_nearest_neighbours              30              30
2025-02-27 21:37:12,791 - INFO -                          max_arc_length          999999 <---       None
2025-02-27 21:37:12,791 - INFO -                          velocity_bound             0.3 <---        0.1
2025-02-27 21:37:12,791 - INFO -                         dem_error_bound           500.0 <---      100.0
2025-02-27 21:37:12,791 - INFO -                num_optimization_samples             500 <---        100
2025-02-27 21:37:12,791 - INFO -                arc_unwrapping_coherence             0.6             0.6
2025-02-27 21:37:12,791 - INFO -                             min_num_arc               3               3
2025-02-27 21:37:12,791 - INFO - 
2025-02-27 21:37:12,796 - INFO - reading box None from file: ~/outputs/temporal_coherence.h5 ...
2025-02-27 21:37:13,363 - INFO - 990000 grid cells created.
2025-02-27 21:37:19,844 - INFO - No mask for area of interest given.
2025-02-27 21:37:21,627 - INFO - reading box None from file: ~/outputs/ifg_stack.h5 ...
2025-02-27 21:37:22,039 - INFO - write data to ~/outputs/p1_ifg_wr.h5...
2025-02-27 21:37:22,092 - INFO - create distance matrix between all points...
2025-02-27 21:38:39,485 - INFO - Triangulate points with 30-nearest neighbours.
[==================================================] 60909/60909 points triangulated    3s /     0s
2025-02-27 21:38:42,581 - INFO - Triangulate points with global delaunay.
2025-02-27 21:38:43,461 - INFO - remove arcs with length > 999999.
2025-02-27 21:42:09,012 - INFO - retrieve arcs from adjacency matrix.
2025-02-27 21:42:11,106 - INFO - no. arcs:	1015673
2025-02-27 21:42:25,806 - INFO - ifg arc observations created.
2025-02-27 21:42:25,806 - INFO - write data to ~/outputs/point_network.h5...
2025-02-27 21:42:25,918 - INFO - ########## TEMPORAL UNWRAPPING: AMBIGUITY FUNCTION ##########
2025-02-27 21:42:25,918 - INFO - start parallel processing with 5 cores.
2025-02-27 21:42:39,564 - INFO - Finished temporal unwrapping.
2025-02-27 21:42:39,577 - INFO - write data to ~/outputs/point_network_parameter.h5...
2025-02-27 21:47:22,168 - INFO - Detect points with low quality arcs (mean): < 0.6
2025-02-27 21:47:22,169 - INFO - Removal of points whose arcs are incoherent in average.
zsh: killed     sarvey -f config.json 0 2

@Andreas-Piter
Copy link
Member Author

The computational problem that you are reporting seems not to be an error in the software. However, the number of arcs that need to be checked is huge: >1mio.

2025-02-27 21:42:11,106 - INFO - no. arcs: 1015673

This arises due to

grid_size 20 <--- 200

combined with

num_nearest_neighbours 30 30

You could try again with a smaller number of num_nearest_neighbours, maybe even just 1 (I think 0 is not allowed - but should be implemented in future).

@Andreas-Piter Andreas-Piter merged commit f1b4a26 into main Feb 28, 2025
6 checks passed
@Andreas-Piter Andreas-Piter deleted the check-grid-size branch February 28, 2025 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants