insarlab / MintPy

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

RuntimeError: No coresponding coordinate found for y/x: 28.7/101.7 #1026

Closed venjiehu closed 1 year ago

venjiehu commented 1 year ago

Hello, I have some trouble loading data using smallbaselineApp.py. By looking at the _get_lookup_row_col function of the coord.py file, I found that mask_yx matrix all False, but y, x, y_factor, x_factor not Null. I've seen someone run into the same problem before and fix it by updating numpy1.24, but I have the latest numpy version and installed the latest isce using cmak and the problem is still unresolved. I want to know why and how to fix it.

numpy version: 1.24.3 isce version: 2.6.3

Full script that generated the error

RuntimeError: No coresponding coordinate found for y/x: 28.7/101.7

Full error message

MintPy version 1.5.1, date 2023-01-03
--RUN-at-2023-06-17 14:01:05.898699--
Current directory: /mnt/f/Luding/topstack/Process/mintpy
Run routine processing with smallbaselineApp.py on steps: ['load_data']
Remaining steps: ['modify_network', 'reference_point', 'quick_overview', 'correct_unwrap_error', 'invert_network', 'correct_LOD', 'correct_SET', 'correct_troposphere', 'deramp', 'correct_topography', 'residual_RMS', 'reference_date', 'velocity', 'geocode', 'google_earth', 'hdfeos5']
--------------------------------------------------
Project name: LudingCfg
Go to work directory: /mnt/f/Luding/topstack/Process/mintpy
read custom template file: /mnt/f/Luding/topstack/Process/mintpy/LudingCfg.txt
update default template based on input custom template
No new option value found, skip updating /mnt/f/Luding/topstack/Process/mintpy/smallbaselineApp.cfg
copy LudingCfg.txt        to inputs   directory for backup.
copy smallbaselineApp.cfg to inputs   directory for backup.
copy LudingCfg.txt        to pic      directory for backup.
copy smallbaselineApp.cfg to pic      directory for backup.
read default template file: /mnt/f/Luding/topstack/Process/mintpy/smallbaselineApp.cfg

******************** step - load_data ********************

load_data.py --template /mnt/f/Luding/topstack/Process/mintpy/smallbaselineApp.cfg /mnt/f/Luding/topstack/Process/mintpy/LudingCfg.txt --project LudingCfg
processor : isce
SAR platform/sensor : unknown from project name "LudingCfg"
--------------------------------------------------
prepare metadata files for isce products
prep_isce.py -m ../reference/IW1.xml -g ../merged/geom_reference -b ../baselines -f "../merged/interferograms/*/filt_*.unw" --geom-files hgt.rdr lat.rdr lon.rdr los.rdr los.rdr shadowMask.rdr
['../reference/data.rsc'] exists and is newer than ['../reference/IW1.xml'] --> skip.
preparing RSC file for geometry files
read perp baseline time-series from ../baselines
preparing RSC file for: ../merged/interferograms/*/filt_*.unw
[==================================================] 20220517_20220610 216/216    7s /     0s 
Done.
--------------------------------------------------
updateMode : True
compression: None
multilook x/ystep: 1/1
multilook method : nearest
/home/ven-j/anaconda3/envs/ARIA-tools/lib/python3.10/site-packages/numpy/core/fromnumeric.py:3464: RuntimeWarning: Mean of empty slice.
  return _methods._mean(a, axis=axis, dtype=dtype,
/home/ven-j/anaconda3/envs/ARIA-tools/lib/python3.10/site-packages/numpy/core/_methods.py:184: RuntimeWarning: invalid value encountered in divide
  ret = um.true_divide(
Traceback (most recent call last):
  File "/home/ven-j/anaconda3/envs/ARIA-tools/bin/smallbaselineApp.py", line 10, in <module>
    sys.exit(main())
  File "/home/ven-j/anaconda3/envs/ARIA-tools/lib/python3.10/site-packages/mintpy/cli/smallbaselineApp.py", line 208, in main
    run_smallbaselineApp(inps)
  File "/home/ven-j/anaconda3/envs/ARIA-tools/lib/python3.10/site-packages/mintpy/smallbaselineApp.py", line 1117, in run_smallbaselineApp
    app.run(steps=inps.runSteps)
  File "/home/ven-j/anaconda3/envs/ARIA-tools/lib/python3.10/site-packages/mintpy/smallbaselineApp.py", line 874, in run
    self.run_load_data(sname)
  File "/home/ven-j/anaconda3/envs/ARIA-tools/lib/python3.10/site-packages/mintpy/smallbaselineApp.py", line 176, in run_load_data
    mintpy.cli.load_data.main(iargs)
  File "/home/ven-j/anaconda3/envs/ARIA-tools/lib/python3.10/site-packages/mintpy/cli/load_data.py", line 123, in main
    load_data(inps)
  File "/home/ven-j/anaconda3/envs/ARIA-tools/lib/python3.10/site-packages/mintpy/load_data.py", line 800, in load_data
    iDict = read_subset_box(iDict)
  File "/home/ven-j/anaconda3/envs/ARIA-tools/lib/python3.10/site-packages/mintpy/load_data.py", line 200, in read_subset_box
    pix_box = coord.bbox_geo2radar(geo_box)
  File "/home/ven-j/anaconda3/envs/ARIA-tools/lib/python3.10/site-packages/mintpy/objects/coord.py", line 460, in bbox_geo2radar
    y, x, y_res, x_res = self.geo2radar(lat, lon, print_msg=print_msg)
  File "/home/ven-j/anaconda3/envs/ARIA-tools/lib/python3.10/site-packages/mintpy/objects/coord.py", line 324, in geo2radar
    az[i], rg[i] = self._get_lookup_row_col(
  File "/home/ven-j/anaconda3/envs/ARIA-tools/lib/python3.10/site-packages/mintpy/objects/coord.py", line 192, in _get_lookup_row_col
    raise RuntimeError(f'No coresponding coordinate found for y/x: {y}/{x}')
RuntimeError: No coresponding coordinate found for y/x: 28.7/101.7

System information

########## 1. Load Data (--load to exit after this step)
## load_data.py -H to check more details and example inputs.
mintpy.load.processor        = isce
##---------for ISCE only:
mintpy.load.metaFile         = ../reference/IW*.xml
mintpy.load.baselineDir      = ../baselines
##---------interferogram datasets:
mintpy.load.unwFile          = ../merged/interferograms/*/filt_*.unw
mintpy.load.corFile          = ../merged/interferograms/*/filt_*.cor
mintpy.load.connCompFile     = ../merged/interferograms/*/filt_*.unw.conncomp
##---------geometry datasets:
mintpy.load.demFile          = ../merged/geom_reference/hgt.rdr
mintpy.load.lookupYFile      = ../merged/geom_reference/lat.rdr
mintpy.load.lookupXFile      = ../merged/geom_reference/lon.rdr
mintpy.load.incAngleFile     = ../merged/geom_reference/los.rdr
mintpy.load.azAngleFile      = ../merged/geom_reference/los.rdr
mintpy.load.shadowMaskFile   = ../merged/geom_reference/shadowMask.rdr
mintpy.load.waterMaskFile    = None

mintpy.deramp                = linear
mintpy.subset.lalo = 28.7:30.2,101.7:102.7  #[31.5:32.5,130.5:131.0 / no], auto for no
welcome[bot] commented 1 year ago

👋 Thanks for opening your first issue here! Please filled out the template with as much details as possible. We appreciate that you took the time to contribute! Make sure you read our contributing guidelines.

venjiehu commented 1 year ago

I think I found the problem, I use study subset(mintpy.subset.lalo) same as isce toStack.app. I delete mintpy.subset.lalo value and run it agin. Later, it work!