Unwrapping error correction fails when "phase_closure" option is selected

243 views
Skip to first unread message

Rino Salman

unread,
Sep 1, 2023, 3:14:03 AM9/1/23
to MintPy
Hello everyone,

I have encountered the following error while running MintPy (version 1.5.0) with "phase_closure" selected as the unwrapError method in the "correct_unwrap_error" option. For your information, everything worked smoothly when I chose "bridging" as the unwrapError method. I have attached some figures based on the processing results using "bridging."

Do any of you have any clues on how to resolve this issue?

Regards,
Rino

refine common mask based on water mask file waterMask.h5

remove regions with area < 559

number of common regions: 8

number of samples per region: 100

solving the phase-unwrapping integer ambiguity for unwrapPhase

        based on the closure phase of interferograms triplets (Yunjun et al., 2019)

        using the L1-norm regularzed least squares approximation (LASSO) ...

Traceback (most recent call last):

  File "mtrand.pyx", line 940, in numpy.random.mtrand.RandomState.choice

TypeError: 'float' object cannot be interpreted as an integer


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/home/share/miniconda3/envs/isce2_v2.6.3/bin/smallbaselineApp.py", line 10, in <module>

    sys.exit(main())

  File "/home/share/miniconda3/envs/isce2_v2.6.3/lib/python3.9/site-packages/mintpy/cli/smallbaselineApp.py", line 208, in main

    run_smallbaselineApp(inps)

  File "/home/share/miniconda3/envs/isce2_v2.6.3/lib/python3.9/site-packages/mintpy/smallbaselineApp.py", line 1117, in run_smallbaselineApp

    app.run(steps=inps.runSteps)

  File "/home/share/miniconda3/envs/isce2_v2.6.3/lib/python3.9/site-packages/mintpy/smallbaselineApp.py", line 886, in run

    self.run_unwrap_error_correction(sname)

  File "/home/share/miniconda3/envs/isce2_v2.6.3/lib/python3.9/site-packages/mintpy/smallbaselineApp.py", line 355, in run_unwrap_error_correction

    mintpy.cli.unwrap_error_phase_closure.main(iargs_closure)

  File "/home/share/miniconda3/envs/isce2_v2.6.3/lib/python3.9/site-packages/mintpy/cli/unwrap_error_phase_closure.py", line 153, in main

    run_unwrap_error_phase_closure(inps)

  File "/home/share/miniconda3/envs/isce2_v2.6.3/lib/python3.9/site-packages/mintpy/unwrap_error_phase_closure.py", line 402, in run_unwrap_error_phase_closure

    common_regions = get_common_region_int_ambiguity(

  File "/home/share/miniconda3/envs/isce2_v2.6.3/lib/python3.9/site-packages/mintpy/unwrap_error_phase_closure.py", line 247, in get_common_region_int_ambiguity

    idx = sorted(np.random.choice(common_reg.area, num_sample, replace=False))

  File "mtrand.pyx", line 942, in numpy.random.mtrand.RandomState.choice

ValueError: a must be 1-dimensional or an integer







network.pdf
maskTempCoh.png
connectComponent.png
temporalCoherence.png
avgSpatialCoh.png
numTriNonzeroIntAmbiguity.png
maskConnComp.png
smallbaselineApp.cfg

Rino Salman

unread,
Sep 5, 2023, 6:50:39 AM9/5/23
to MintPy
Hi Yunjun,

For your information, I don't encounter the problem if I run MintPy version 1.4.1 (using the same input data and configurations). Probably there is a bug in unwrap_error_phase_closure.py version 1.5.1? 

Regards,
Rino

p.s. I meant version 1.5.1 in my previous posting.

Zhang Yunjun

unread,
Sep 5, 2023, 7:15:42 AM9/5/23
to MintPy
Hi Rino,

This is a known issue due to changes in numpy, and has been fixed (https://github.com/insarlab/MintPy/pull/989). The latest release of version 1.5.2 includes the fix.

Cheers,
Yunjun

Rino Salman

unread,
Sep 6, 2023, 8:57:49 PM9/6/23
to MintPy
I see, thanks Yunjun for your help.

Cheers,
Rino

Reply all
Reply to author
Forward
0 new messages