Fail in step modify_network: Axis limits cannot be NaN or Inf

106 views
Skip to first unread message

Rino Salman

unread,
Oct 11, 2023, 5:02:48 AM10/11/23
to MintPy
Hi Yunjun,

My MintPy processing fail in early step modify_network:

Traceback (most recent call last):

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

    sys.exit(main())

  File "/home/share/miniconda3/envs/isce2_v2.6.3_MP1.5.2/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_MP1.5.2/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_MP1.5.2/lib/python3.9/site-packages/mintpy/smallbaselineApp.py", line 877, in run

    self.run_network_modification(sname)

  File "/home/share/miniconda3/envs/isce2_v2.6.3_MP1.5.2/lib/python3.9/site-packages/mintpy/smallbaselineApp.py", line 258, in run_network_modification

    mintpy.cli.plot_network.main(iargs)

  File "/home/share/miniconda3/envs/isce2_v2.6.3_MP1.5.2/lib/python3.9/site-packages/mintpy/cli/plot_network.py", line 170, in main

    plot_network(inps)

  File "/home/share/miniconda3/envs/isce2_v2.6.3_MP1.5.2/lib/python3.9/site-packages/mintpy/plot_network.py", line 172, in plot_network

    ax = pp.plot_perp_baseline_hist(

  File "/home/share/miniconda3/envs/isce2_v2.6.3_MP1.5.2/lib/python3.9/site-packages/mintpy/utils/plot.py", line 791, in plot_perp_baseline_hist

    ax = auto_adjust_yaxis(ax, pbaseList, fontsize=p_dict['fontsize'])

  File "/home/share/miniconda3/envs/isce2_v2.6.3_MP1.5.2/lib/python3.9/site-packages/mintpy/utils/plot.py", line 503, in auto_adjust_yaxis

    ax.set_ylim([ymin, ymax])

  File "/home/share/miniconda3/envs/isce2_v2.6.3_MP1.5.2/lib/python3.9/site-packages/

matplotlib/_api/deprecation.py", line 454, in wrapper

    return func(*args, **kwargs)

  File "/home/share/miniconda3/envs/isce2_v2.6.3_MP1.5.2/lib/python3.9/site-packages/matplotlib/axes/_base.py", line 3882, in set_ylim

    return self.yaxis._set_lim(bottom, top, emit=emit, auto=auto)

  File "/home/share/miniconda3/envs/isce2_v2.6.3_MP1.5.2/lib/python3.9/site-packages/matplotlib/axis.py", line 1184, in _set_lim

    v0 = self.axes._validate_converted_limits(v0, self.convert_units)

  File "/home/share/miniconda3/envs/isce2_v2.6.3_MP1.5.2/lib/python3.9/site-packages/matplotlib/axes/_base.py", line 3570, in _validate_converted_limits

    raise ValueError("Axis limits cannot be NaN or Inf")

ValueError: Axis limits cannot be NaN or Inf



I plotted the input files (samples are attached), nothing wrong based on visual inspection. Please could you help me on how to solve this issue?

os: linux
installation method: conda (isce2.6.3 and mintpy1.5.2 are in the same environment)

Regards,
Rino



filt_230131-230314_10rlks_56alks.unw.conncomp.png
filt_230131-230314_10rlks_56alks.unw-phase.png
230131-230314_10rlks_56alks.cor.png

Zhang Yunjun

unread,
Oct 11, 2023, 9:50:37 PM10/11/23
to MintPy
Hi Rino,

Could you 1) run smallbaselineApp.py --plot to generate the pic folder from the currently available files and 2) attach the following files here for diagnosis?
coherenceSpatialAvg.txt
pic/coherence*.png
pic/connectComponent*.png

Regards,
Yunjun

Rino Salman

unread,
Oct 11, 2023, 10:01:30 PM10/11/23
to MintPy
Hi Yunjun,

I found the problem, there is a nan in file coherenceSpatialAvg.txt.
Thanks for the response, really appreciate it.

Regards,
Rino

Zhang Yunjun

unread,
Oct 12, 2023, 9:17:10 AM10/12/23
to MintPy
Hi Rino,

I would still like to catch this issue in the code, and report a meaningful msg for future diagnosis. Could you show me here what your coherenceSpatialAvg.txt file looks like?

Yunjun

Rino Salman

unread,
Oct 12, 2023, 10:42:53 AM10/12/23
to MintPy
Hi Yunjun,

I attach the screenshot of coherenceSpatialAvg.txt file. To solve this issue, inside folder pairs produced by ISCE, I excluded all pairs that pair up with 20220927 then re-run MintPy from step load_data, it went through until the last MintPy step.

Cheers,
Rino
Screenshot 2023-10-12 at 21.35.51.png

Zhang Yunjun

unread,
Oct 12, 2023, 9:58:34 PM10/12/23
to MintPy
Hi Rino,

I am happy to hear your problem is solved. I am now able to re-produce your error as well, which should now also be caught in the code by (https://github.com/insarlab/MintPy/pull/1108).

Thank you for reporting this.
Cheers,
Yunjun
Reply all
Reply to author
Forward
0 new messages