insarlab / MintPy

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

readfile.py cannot open extension .wbd #979

Closed bbuzz31 closed 1 year ago

bbuzz31 commented 1 year ago

I can't seem to geocode a water mask anymore. I see there's a forced check that prevents reading the .wbd file in readfile.py, but simply removing this doesn't solve the problem. My mintpy version is: '1.5.0.post8'

I believe you could reproduce using the example here: https://github.com/insarlab/MintPy-tutorial/blob/main/applications/water_mask.ipynb

Here is command:

geocode.py ./swbd_isce.wbd -l ./inputs/geometryRadar.h5 -o ./waterBody.h5 --geo2radar --fill 255

and output:


number of processor to be used: 1
resampling software: pyresample
read latitude / longitude from lookup table file: /u/leffe-data2/buzzanga/data/VLM/Sentinel1/NYC/MintPy_2alks_5rlks_11_5/inputs/geometryRadar.h5
input pixel size in (lat, lon) in degree: [-0.000277777777, 0.000277777777]
input area extent in (S, N, W, E) in degree: (40.529904445265004, 40.82296, -74.17, -73.756388890047)
--------------------------------------------------
resampling file: ./swbd_isce.wbd
Traceback (most recent call last):
  File "/u/leffe-data2/buzzanga/Miniconda3/envs/MintPy/bin/geocode.py", line 8, in <module>
    sys.exit(main())
  File "/u/leffe-data2/buzzanga/Software_InSAR/MintPy_git/src/mintpy/cli/geocode.py", line 243, in main
    run_geocode(inps)
  File "/u/leffe-data2/buzzanga/Software_InSAR/MintPy_git/src/mintpy/geocode.py", line 85, in run_geocode
    ds_unit_dict = readfile.get_hdf5_dataset_attrs(infile, key='UNIT')
  File "/u/leffe-data2/buzzanga/Software_InSAR/MintPy_git/src/mintpy/utils/readfile.py", line 883, in get_hdf5_dataset_attrs
    raise ValueError(f'input file ({fname}) does not end with .h5/he5!')
ValueError: input file (/u/leffe-data2/buzzanga/data/VLM/Sentinel1/NYC/masks/swbd_isce.wbd) does not end with .h5/he5!
yunjunz commented 1 year ago

This has been reported in the Google group user forum and fixed, if I remember it right. Could you confirm with the latest development version?

bbuzz31 commented 1 year ago

Ah sorry, forgot to check there. On 1.5.1 the issue is indeed fixed, thanks!