insarlab / MintPy

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

`view.py numInvIfgram.h5` error for `RidgecrestSenDT71` #1185

Closed yunjunz closed 2 months ago

yunjunz commented 2 months ago
          @yunjunz here is [a link](https://ffwilliams2-shenanigans.s3.us-west-2.amazonaws.com/mintpy/RidgecrestSenDT71.tar.xz) to a descending 71 track version of the data.

The main smallbaselineApp run works great, but I noticed that there is an issue running smallbaselineApp.py --plot at the end of processing that I haven't seen before. Running the sub-command:

view.py --dpi 150 --noverbose --nodisplay --update --memory 4.0 numInvIfgram.h5 --mask no

Results in an error within the matplotlib axis tick functionality:

  File "lib/python3.11/site-packages/matplotlib/ticker.py", line 799, in _set_format
    loc_range_oom = int(math.floor(math.log10(loc_range)))
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: cannot convert float NaN to integer

Have you come across this one before?

For now, I've disabled plotting in the configuration document, so we don't encounter the error when running the standard smallbaselineApp.py, but we may want to circle back to this at some point.

Originally posted by @forrestfwilliams in https://github.com/insarlab/MintPy/issues/1182#issuecomment-2072313785

yunjunz commented 2 months ago

Here is my full error msg:

(insar) yunjunz:~/data/test/RidgecrestSenDT71/mintpy>$ view.py numInvIfgram.h5 
run view.py in MintPy version 1.5.3.post34, date 2024-04-24
input file is mask file: /Users/yunjunz/data/test/RidgecrestSenDT71/mintpy/numInvIfgram.h5 in float32 format
file size in y/x: (1125, 1500)
num of datasets in file numInvIfgram.h5: 1
datasets to exclude (0):
[]
datasets to display (1):
['mask']
data   coverage in y/x: (0, 0, 1500, 1125)
subset coverage in y/x: (0, 0, 1500, 1125)
data   coverage in lat/lon: (389960.0, 4000040.0, 509960.0, 3910040.0)
subset coverage in lat/lon: (389960.0, 4000040.0, 509960.0, 3910040.0)
------------------------------------------------------------------------
colormap: jet
figure title: numInvIfgram
figure size : [10.0, 6.0]
reading data ...
masking pixels with NO_DATA_VALUE of 0.0
data has uniform and limited number (5 <= 20) of unique values --> discretize colormap
data    range: [8.0, 11.0] 1
display range: [7.5, 11.5] 1
display data in transparency: 1.0
plot in geo-coordinate
plotting data as image via matplotlib.pyplot.imshow ...
plot scale bar: [0.2, 0.2, 0.1]
plot reference point
showing ...
Traceback (most recent call last):
  File "/Users/yunjunz/tools/mambaforge/envs/insar/lib/python3.10/site-packages/matplotlib/backend_bases.py", line 1193, in _on_timer
    ret = func(*args, **kwargs)
  File "/Users/yunjunz/tools/mambaforge/envs/insar/lib/python3.10/site-packages/matplotlib/backends/backend_macosx.py", line 68, in callback_func
    callback()
  File "/Users/yunjunz/tools/mambaforge/envs/insar/lib/python3.10/site-packages/matplotlib/backends/backend_macosx.py", line 88, in _draw_idle
    self.draw()
  File "/Users/yunjunz/tools/mambaforge/envs/insar/lib/python3.10/site-packages/matplotlib/backends/backend_macosx.py", line 50, in draw
    super().draw()
  File "/Users/yunjunz/tools/mambaforge/envs/insar/lib/python3.10/site-packages/matplotlib/backends/backend_agg.py", line 405, in draw
    self.figure.draw(self.renderer)
  File "/Users/yunjunz/tools/mambaforge/envs/insar/lib/python3.10/site-packages/matplotlib/artist.py", line 74, in draw_wrapper
    result = draw(artist, renderer, *args, **kwargs)
  File "/Users/yunjunz/tools/mambaforge/envs/insar/lib/python3.10/site-packages/matplotlib/artist.py", line 51, in draw_wrapper
    return draw(artist, renderer)
  File "/Users/yunjunz/tools/mambaforge/envs/insar/lib/python3.10/site-packages/matplotlib/figure.py", line 3082, in draw
    mimage._draw_list_compositing_images(
  File "/Users/yunjunz/tools/mambaforge/envs/insar/lib/python3.10/site-packages/matplotlib/image.py", line 131, in _draw_list_compositing_images
    a.draw(renderer)
  File "/Users/yunjunz/tools/mambaforge/envs/insar/lib/python3.10/site-packages/matplotlib/artist.py", line 51, in draw_wrapper
    return draw(artist, renderer)
  File "/Users/yunjunz/tools/mambaforge/envs/insar/lib/python3.10/site-packages/matplotlib/axes/_base.py", line 3100, in draw
    mimage._draw_list_compositing_images(
  File "/Users/yunjunz/tools/mambaforge/envs/insar/lib/python3.10/site-packages/matplotlib/image.py", line 131, in _draw_list_compositing_images
    a.draw(renderer)
  File "/Users/yunjunz/tools/mambaforge/envs/insar/lib/python3.10/site-packages/matplotlib/artist.py", line 51, in draw_wrapper
    return draw(artist, renderer)
  File "/Users/yunjunz/tools/mambaforge/envs/insar/lib/python3.10/site-packages/matplotlib/axis.py", line 1304, in draw
    ticks_to_draw = self._update_ticks()
  File "/Users/yunjunz/tools/mambaforge/envs/insar/lib/python3.10/site-packages/matplotlib/axis.py", line 1191, in _update_ticks
    major_labels = self.major.formatter.format_ticks(major_locs)
  File "/Users/yunjunz/tools/mambaforge/envs/insar/lib/python3.10/site-packages/matplotlib/ticker.py", line 232, in format_ticks
    self.set_locs(values)
  File "/Users/yunjunz/tools/mambaforge/envs/insar/lib/python3.10/site-packages/matplotlib/ticker.py", line 718, in set_locs
    self._set_format()
  File "/Users/yunjunz/tools/mambaforge/envs/insar/lib/python3.10/site-packages/matplotlib/ticker.py", line 811, in _set_format
    loc_range_oom = int(math.floor(math.log10(loc_range)))
ValueError: cannot convert float NaN to integer