insarlab / MintPy

Miami InSAR time-series software in Python
https://mintpy.readthedocs.io
Other
603 stars 257 forks source link

A problem about calculating the number of non-zero closure phase #1025

Closed jingqing129 closed 1 year ago

jingqing129 commented 1 year ago

Hi ALL, My dataset include 1430 interferograms, and can be loaded by Mintpy. A problem occurred ,when I call the module of unwrap_error_phase_closure.py. The error poped up as bellow: 1686891734286 The curious thing is no error occurred when I just use 1300 interferograms. Anybody know what is happening ? Thanks. Yingfeng

welcome[bot] commented 1 year ago

👋 Thanks for opening your first issue here! Please filled out the template with as much details as possible. We appreciate that you took the time to contribute! Make sure you read our contributing guidelines.

yunjunz commented 1 year ago

Among your 1466 pairs of interferograms, over 16k triplets are found, which is HUGE. My guess is it probably hit your computer's memory limit.

The over 10 times increase in number from pairs to triplets means you have a lot of redundant interferograms, I would reduce that in the modify_network step, which should result in fewer triplets as well.

Update: The code is supposed to use only a small amount of memory here, so I don't think this is a memory limit issue. Please follow the bug report template to provide more detailed information on the issue (to diagnose and reproduce your error).

Freedomance commented 1 year ago

@yunjunz hi, Mr.Zhang I have about 2100 interferograms in my dataset, and I have finished steps before "quick_overview" successfully, but when I run step "quick_overview", I encounter an error in the module of unwrap_error_phase_closure.py. The error message as follow :


open ifgramStack file: ifgramStack.h5
number of interferograms: 2102
number of triplets: 25050
Traceback (most recent call last):
  File "/home/wlj/tools/MintPy/src/mintpy/cli/smallbaselineApp.py", line 213, in <module>
    main(sys.argv[1:])
  File "/home/wlj/tools/MintPy/src/mintpy/cli/smallbaselineApp.py", line 208, in main
    run_smallbaselineApp(inps)
  File "/home/wlj/tools/MintPy/src/mintpy/smallbaselineApp.py", line 1117, in run_smallbaselineApp
    app.run(steps=inps.runSteps)
  File "/home/wlj/tools/MintPy/src/mintpy/smallbaselineApp.py", line 883, in run
    self.run_quick_overview(sname)
  File "/home/wlj/tools/MintPy/src/mintpy/smallbaselineApp.py", line 330, in run_quick_overview
    mintpy.cli.unwrap_error_phase_closure.main(iargs)
  File "/home/wlj/tools/MintPy/src/mintpy/cli/unwrap_error_phase_closure.py", line 153, in main
    run_unwrap_error_phase_closure(inps)
  File "/home/wlj/tools/MintPy/src/mintpy/unwrap_error_phase_closure.py", line 426, in run_unwrap_error_phase_closure
    out_file = calc_num_triplet_with_nonzero_integer_ambiguity(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/wlj/tools/MintPy/src/mintpy/unwrap_error_phase_closure.py", line 126, in calc_num_triplet_with_nonzero_integer_ambiguity
    num_loop = int(np.ceil(length / step))
                           ~~~~~~~^~~~~~
ZeroDivisionError: division by zero```

Can you help me about how to deal with this problem?  Thank you very much!
yunjunz commented 1 year ago

The error should be fixed by the PR above. Cheers.