Skip to content
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

lookup_geo2radar.py error for subset dataset from Gamma #850

Open
yunjunz opened this issue Sep 18, 2022 · 2 comments
Open

lookup_geo2radar.py error for subset dataset from Gamma #850

yunjunz opened this issue Sep 18, 2022 · 2 comments
Assignees
Labels

Comments

@yunjunz
Copy link
Member

yunjunz commented Sep 18, 2022

Description of the problem

Hi @ymcmrs, the lookup_geo2radar.py does not seem working for me, as shown in the error message below. Are you actively using this script? If not, we should either move this script to mintpy/legacy folder or remove it from the repo?

This script is using tqdm for the progress bar. Is it possible to replace it usage with mintpy.utils.ptime.progressBar object instead, to avoid this extra dependency?

Full script that generated the error

wget https://zenodo.org/record/3952950/files/WellsEnvD2T399.tar.xz
tar -xvJf WellsEnvD2T399.tar.xz
cd WellsEnvD2T399/mintpy
smallbaselineApp.py ${MINTPY_HOME}/mintpy/data/input_files/WellsEnvD2T399.txt
lookup_geo2radar.py inputs/geometryGeo.h5 -w ./inputs/geometryRadar.h5 

Full error message

(insar) yunjunz:~/data/test/WellsEnvD2T399/mintpy>$ lookup_geo2radar.py inputs/geometryGeo.h5 -w ./inputs/geometryRadar.h5 
Traceback (most recent call last):
  File "/Users/yunjunz/tools/miniconda3/envs/insar/bin/lookup_geo2radar.py", line 8, in <module>
    sys.exit(main())
  File "/Users/yunjunz/tools/MintPy/mintpy/lookup_geo2radar.py", line 278, in main
    future = parallel_process(data_parallel, function, n_jobs= proNumb, use_kwargs=False, front_num=1)
  File "/Users/yunjunz/tools/MintPy/mintpy/lookup_geo2radar.py", line 96, in parallel_process
    front = [function(**a) if use_kwargs else function(a) for a in array[:front_num]]
  File "/Users/yunjunz/tools/MintPy/mintpy/lookup_geo2radar.py", line 96, in <listcomp>
    front = [function(**a) if use_kwargs else function(a) for a in array[:front_num]]
  File "/Users/yunjunz/tools/MintPy/mintpy/lookup_geo2radar.py", line 166, in function
    grid_lat0 = griddata(points, zz1, (grid_x0, grid_y0), method='nearest')
  File "/Users/yunjunz/tools/miniconda3/envs/insar/lib/python3.8/site-packages/scipy/interpolate/_ndgriddata.py", line 258, in griddata
    return ip(xi)
  File "/Users/yunjunz/tools/miniconda3/envs/insar/lib/python3.8/site-packages/scipy/interpolate/_ndgriddata.py", line 111, in __call__
    return self.values[i]
IndexError: index 0 is out of bounds for axis 0 with size 0

System information

  • Operating system: macOS
  • Python environment: conda + pip
  • Version of MintPy: 1.4.1-13
@ymcmrs
Copy link
Contributor

ymcmrs commented Oct 11, 2022 via email

@yunjunz yunjunz changed the title lookup_geo2radar.py is not working lookup_geo2radar.py error for subset dataset from Gamma Oct 11, 2022
@yunjunz
Copy link
Member Author

yunjunz commented Oct 11, 2022

Thank you @ymcmrs for the checking. This is very helpful: I thought the script is not working ;) Since you are using it, it is useful to keep it as it is then.

I would suggest either adding the support or printing out a message saying "subset dataset is NOT supported" in this scenario.

Regarding to tqdm, sure, we can replace it with ptim.progressBar if we want to keep using it.

Yes please, whenever you got a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants